Corruption in SoA - long boring posting, brace yourself

Discussions of various Star Trek ships and mods for Homeworld

Moderators: Redragon, TheStressPuppy, Dolphoenix

Post Reply
Dolphoenix
Posts: 1498
Joined: Wed Feb 21, 2001 1:00 pm
Location: Altus,OK,USA
Contact:

Corruption in SoA - long boring posting, brace yourself

Post by Dolphoenix » Sat Apr 07, 2007 5:00 pm

I thought I'd take a moment to address the subject of graphical corruption, commonly refered to as simply corruption.
I'm not sure what everyone knows about this. Basically HW has a file called textures.ll. The purpose of the file is basically to act as a master list of all the textures used - name, size, and memory used. I know alot of times it's seemed almost a magical file, and in many ways it is.
Basically whenever you load a game of HW up, on the loading screen with the progress bar, the game is loading ships into it's memory. It's refering to the textures.ll during this time.. To a degree, if the size of the textures is too large you'll get corruption. But that's not the real issue!
Let's say you have a Galaxy class loading. say 20 textures per LOD, with 4 LOD's. that's 80 textures for this ship, which is actually not that unusual. One problem faced in the past is every getting a version of Soa, and saying OH look here's corruption, posting a screenshot of say, the Galaxy.. All of a sudden SoA has corruption. This, as it turns out isn't really true. WHat would be the problem in this case is one of the textures used in the generation of the textures.ll for the Galaxy isn't the exact same texture in the actual folder for the ship. What happens is, The game loads.. get's to the entry for say Galaxytexture1.lif.. well the textures.ll says it's 256x128, and uses X amount of memory. But the actualy texture used is 256x256 and uses Y amount of memory. Suddenly the game has loaded the wrong parameters for that texture. game starts and you get to looking at the ship.. well here on the underside of the ship, it's all screwed up, corruption! In this case, it's actually the ship that is corrupted, not the whole mod.
And considering the thousands of textures used, with updates all the time this was always a problem.
I also should point out that if you have several textures like this, listed incorrectly in the textures.ll, it CAN cause the entire mod to become corrupt. THink of having just 4-5 ships wrong. 4 lod's each. suddenly you have 20 textures not correctly listed, and it totally blows memory usage.
This also applies to textures that somehow don't get listed at all which is even worse than an incorrect listing.
Now then another issue with corruption, which actually will exist for all mods and actually exists with the current buil we're working on.
The maps! Yeah that's right, the maps in the game can cause corruption. Quite easily as a matter of fact. Basicaly a map tells the game, the size of the universe, lighting to use, what ships are where blah blah blah.
But in the map.level file is where we're looking right now. in this section you tell the game which races or individual ships to load or not to load. The game doesn't automatically load everything in everytime you play. It goes by the map file you're playing. Let's say you have a map with 3 Traders ships, but in the .level file you specifiy to exlude all traders. Well, when the game is loading, it goes, ok, no traders so skips their textures.ll entry.. but then trader ships get loaded because the other map scripts call for them. Now you have 3 ships.. say 20 textures each, 4 lods...that's 240 textures loaded into the game that the game hasn't properly allocated to memory.. which causes.. you guessed it, corruption. Also keep in mind the reverse can be true to. in every single map file you HAVE to make sure you specifiy to include or exclude ships. if you say put NO entry for Traders, because there's none on your map, the game will load them! So now you have an entire race of ships loaded that are unnecessary.

Basically I wanted to get the word out on some of the issues here, especially the part about the maps. When we release SoA again, if you load up a map, and suddenly you have corruption, remember, odds are it's the map you're using and not the mod itself.

User avatar
TheOneNamedViper
Posts: 6859
Joined: Sat Dec 30, 2000 1:00 am
Location: Denmark
Contact:

Post by TheOneNamedViper » Sat Apr 07, 2007 9:28 pm

I think it's also worth mentioning that even Relic didn't have this issue totally under control. There is a level or two in the single player campaign where corruption regularly occurs. It's in one of the later levels with lots of extra stuff loaded.

Dasher42
Junior Member
Posts: 892
Joined: Thu Feb 22, 2001 1:00 pm
Contact:

Post by Dasher42 » Sat Apr 07, 2007 10:42 pm

The good news is that with this being fixed, you can get all the players in you want on a map without corruption, with all these new and beautiful ships.

The gameplay is great, and that's why we're releasing a mod for a game that's almost seven years old.

User avatar
Crook
Posts: 3900
Joined: Thu Nov 02, 2000 1:00 pm
Location: Oxfordshire, UK
Contact:

Post by Crook » Mon Apr 09, 2007 8:06 pm

Dasher might know more about this that anyone else here - where in the source code can we assign more memory to HW? Back in the day 32MB was a lot on a GFX card, but these days we can assign 128MB or more and maybe have enough room for all of HW mods with a simple new exe. The homesource chaps might have some easy solution to this. They've already fixed avi playing at the start. They're not so much interested in mods as porting, so this might be an easy fix that they haven't considered yet?
<a href="http://www.andrewcrook.co.uk/empire/Empire_home.shtml" target="_blank">Empire - an online multiverse game</a>


<a href="http://www.c-digital-art.co.uk" target="_blank">www.c-digital-art.co.uk</a>
<img src="http://www.andrewcrook.co.uk/images/c-d ... _trans.gif" border="0" alt="" />

Dolphoenix
Posts: 1498
Joined: Wed Feb 21, 2001 1:00 pm
Location: Altus,OK,USA
Contact:

Post by Dolphoenix » Mon Apr 09, 2007 11:23 pm

ermmm... hehh heh we've already been discussing that, among other things.. I'm sure Dasher will have alot more info than me :)

Dasher42
Junior Member
Posts: 892
Joined: Thu Feb 22, 2001 1:00 pm
Contact:

Post by Dasher42 » Mon Apr 09, 2007 11:48 pm

Crook wrote:Dasher might know more about this that anyone else here - where in the source code can we assign more memory to HW? Back in the day 32MB was a lot on a GFX card, but these days we can assign 128MB or more and maybe have enough room for all of HW mods with a simple new exe. The homesource chaps might have some easy solution to this. They've already fixed avi playing at the start. They're not so much interested in mods as porting, so this might be an easy fix that they haven't considered yet?
The problem with Homeworld SDL is that it lacks multiplayer support, and implementing that is a major project given that the terms of using the source code means that all your work belongs to Relic.

It might still be worth looking into as a quick way to spiff up single-player releases.

TheStressPuppy
Posts: 2869
Joined: Sat Dec 23, 2000 1:00 pm
Location: Earth
Contact:

Post by TheStressPuppy » Thu Apr 19, 2007 6:22 am

Yea the corruption has always been the "Achilles heel" of hw1 modding. That, and getting imported sound to work right. Tho im not sure if you, and Dolph made any progress in those areas. Im glad to see you guys alive, well, and modding again :)

Ive been semi-retired from the modding scene lately tho i still do build the occasional ship. If theres anything u guys need like old files, or some model tweaking let me know.

AFAIK Homesource hasn't been able to change texture memory, or been able work around the amount that can be used. However its been a long time since i last checked so i could be wrong. I think delphy made some headway but im not sure how far he got.

HW1 is still a viable engine. Most games of this genre don't look much different, and have far worse gameplay. The 1 exception i have seen is "Sins of a Solar Empire" in which i am currently a beta tester for. Its a damn good game but it still isnt Homeworld.

Dolphoenix
Posts: 1498
Joined: Wed Feb 21, 2001 1:00 pm
Location: Altus,OK,USA
Contact:

Post by Dolphoenix » Thu Apr 19, 2007 7:02 am

heh heh oh yes progress.. music and weapon sound effects for SoA....

oh my, I've said too much..

Post Reply

Return to “Homeworld Trek”