OXPShipRegulator

Discussion and information relevant to creating special missions, new ships, skins etc.

Moderators: winston, another_commander

User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Post by Svengali »

Ahruman wrote:
Hmm. Flashers shouldn’t be using much memory. Interesting…
A single FLASHER (or a few of them) is absolutely no problem and while testing I saw that it's using ~300KB. That's not really much. But >250 of them is another thing :-)

I'm not so sure if we can get similiar effects for all of these ships, because a FLASHER is a 3-dimensional object, so the result would be different. But it would help a lot to reduce the amount of used declarations.
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Post by JensAyton »

Hmm. A flasher should be taking about 5 KiB. I just noticed that 1280 bytes of that is completely unused (and most of the rest is for fields only used by exhaust entities). ParticleEntity really needs to be refactored…

However, 300 KiB per particle sounds like the texture isn’t being shared. (The texture is 256 KiB.) That would indicate a rather fundamental problem in texture caching. I’ll definitely look into that soon. (Gotta finish this whitelisting stuff first.)
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

Svengali wrote:
Most of these ships were made long before shader-support was available, but this has changed.
Not for everyone it hasn't... :evil:
User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Post by Svengali »

Ahruman wrote:
However, 300 KiB per particle sounds like the texture isn’t being shared. (The texture is 256 KiB.) That would indicate a rather fundamental problem in texture caching. I’ll definitely look into that soon. (Gotta finish this whitelisting stuff first.)
Thanks Ahruman.
Thargoid wrote:
Not for everyone it hasn't... :evil:
Yes, you're right. We still have users without shader-support, but probably this will change some day too .-)
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

I can but hope, or failing that my employer sees sense and gives me admin rights so I can drag the graphics drivers on my company laptop out of the dark ages...

OK, I'll just go back to hoping :roll:
User avatar
Lestradae
---- E L I T E ----
---- E L I T E ----
Posts: 3095
Joined: Tue Apr 17, 2007 10:30 pm
Location: Vienna, Austria

Post by Lestradae »

Ahruman wrote:
However, 300 KiB per particle sounds like the texture isn’t being shared. (The texture is 256 KiB.) That would indicate a rather fundamental problem in texture caching. I’ll definitely look into that soon.
Thanks for that, Ahruman :D

Hey! Via OSE, a bug was found. Due to is extremeness in some ways it might not be such a bad thing to find other things out via that? :wink:

Cheers & relieved a bit that the cause or the memory problem issue of OSE is probably found now

L
User avatar
_ds_
Deadly
Deadly
Posts: 180
Joined: Thu Jan 22, 2009 5:34 pm
Location: In a cloaked ship behind you

Post by _ds_ »

Svengali wrote:
Ahruman wrote:
However, 300 KiB per particle sounds like the texture isn’t being shared. (The texture is 256 KiB.) That would indicate a rather fundamental problem in texture caching. I’ll definitely look into that soon. (Gotta finish this whitelisting stuff first.)
Would be good. I might even have a poke around there myself (get my head around some more Objectionable C :twisted:). I did wonder about that a bit when fiddling with my compression patch. I got some noticeable slowdown whenever something exploded…
Svengali wrote:
We still have users without shader-support, but probably this will change some day too .-)
Me, for one. (X300, xf86-video-ati 6.10.0, mesa 7.3-rc3. The hw's capable; the driver isn't – at least, not yet…?)

And something odd which I noticed on another computer to which I sometimes have access: running Vasti, I see no shaders support, but booting from a convenient Debian live CD, I see shaders support. (i965, recent oolite build on Vasti and a local snapshot build on Linux.)

(Edit) Looks like it was flare256.png being loaded a lot and discarded quickly. Might be worth locking that one in memory, perhaps?

Code: Select all

diff --git a/src/Core/Entities/ParticleEntity.m b/src/Core/Entities/ParticleEntity.m
--- a/src/Core/Entities/ParticleEntity.m
+++ b/src/Core/Entities/ParticleEntity.m
@@ -691,9 +691,10 @@ FAIL:
 {
 	if (name != nil)
 	{
-		const uint32_t options = kOOTextureNeverCompress;
-		[texture autorelease];
-		texture = [[OOTexture textureWithName:name inFolder:@"Textures" options:options] retain];
+//		const uint32_t options = kOOTextureNeverCompress;
+		OOTexture *oldtexture = texture;
+		texture = [[OOTexture textureWithName:name inFolder:@"Textures" /*options:options*/] retain];
+		[oldtexture release];
 	}
 }
 
User avatar
Cholmondely
Archivist
Archivist
Posts: 5365
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
Contact:

Re: OXPShipRegulator

Post by Cholmondely »

I think that this belongs here:
Svengali wrote: Sat May 11, 2013 8:50 pm
spara wrote:
Thanks guys for setting me straight. :mrgreen:
Oumpf, sorry. This wasn't the intention.

btw: I've made the same 'mistake' a whole while ago with the OXPShipRegulator. A dead-end as well :mrgreen:
Search for "OXPShipRegulator" to find other posts relevant to this.
Comments wanted:
Missing OXPs? What do you think is missing?
Lore: The economics of ship building How many built for Aronar?
Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
Post Reply