#31
So, for this to work, we'd make a text file for the explosion, it'd specify the name of the first image, how many images there are, and also the format, and the game will display them on the fly?
Simpler that that. All the text file has is the image type (DDS, PCX, TGA, JPG) and the number of frames. I'm using EFF as the format extension just because I don't have anything better, but it's basically like this:

The animation name you call, Maxim_Particle.eff, is just:

Code: Select all

$Type: TGA $Frames: 12
Then you would just have the image files in the same directory:
Maxim_Particle_0000.tga
Maxim_Particle_0001.tga
...
Maxim_Particle_0011.tga

And that's it. Every image has to be the same format and there has to be less than 254 frames. Those are the only restrictions. To the rest of the game all you've done is load an animation called Maxim_Particle.eff that has 12 frames. The game handles ANIs this same way already. The additional filename and file type are saved and used for the functions that actually lock the data into memory. As far as the rest of the code is concered, or most of bmpman for that matter, it's just an ANI with an EFF extension. No big deal.

#33
Ahh. tres cool. When can we expect a build?
I've just got to get the file parsing to work right. The rest of the code is done and that one bug fixed (don't know if it was the original bmpman corruption though). I think I'm just going to pull some of the regular parsing code into bmpman for a public test until I get something more permanent working. I'll probably release a test build in the morning with this and a couple of small bug fixes.

#35
I don't really want to post this under a new topic so here:
http://icculus.org/~taylor/fso/willrobi ... -win32.zip

It has a few small bmpman fixes and the EFF stuff. Other than that it's pretty much the same as my 20041022 build. EFF files, if in a VP, are only used from the data/maps & data/effects directories. Format of the EFF and the file numbering are just as I listed earlier. Accepted formats for $Type are: DDS, TGA, JPG, PCX. PNG isn't actually supported anywhere in the game at the moment but they also wouldn't use any less memory than TGAs do anyway. The total size of the EFF can't exceed 50 bytes (arbitrary number, may change) so don't use comments or a bunch of spaces in them.

I realize now that I probably should have added a fps count to the EFF and will probably do that later but for now it's not accepted. It will use a default of 30 fps for every EFF. If the people who actually make use of this think a specific fps count or different default is needed then I'll add/change it.

#38
I updated the build at the link I posted earlier. The link is the same but the actual binary name is different so be sure you're using the right one in the launcher.

Added an extra check to make sure that EFFs that contain TGAs or JPGs don't get used unless you are using the -jpgtga command line option. Also added an optional fps setting ($FPS:) to the EFF. If it's not there then the default of 30 used. The fps option has to come after the "$Frames:" option in the EFF.

Also made a slight change to the page in stuff. Before it would unload everything and then start paging stuff in. Now it will reset what's supposed to get preloaded but not unload anything until page in is complete. This should reduce time wasted when it unloads an image just to load it right back. I've set it to flush the video texture memory first but it would be much faster still without that step. I think it's safer that way and even with it the load times of subsequent missions is cut by about 30%. If there are new load problems or bad stuttering let me know.

#39
Ok just came back from my little vacation and will test this build as soon as possible.

The build from Taylor Build 20041029 as ZIP
Here the to-do-list

1) Making the ani in any format I like
2) Putting the single frames into the effect folder
3) making a textfile with an *.eff extention
4) Adding the data to the eff
$Type: [TGA, JPG, PNG, PCX]
$Frames: [Filename_0000]
$FPS: [optional, use only if you are using others then 30FPS]
5) Put the eff file into the effect folder
6) Adding the eff dataname into the tbl for the weapon/effect I desire

!!!
A quick note on memory usage too, the formula is: (width * height * (bpp/8) * frames)/1024/1024. So if you've got a 50 frame 512x512 32-bit TGA animation it's going to use 50megs of memory. Just keep that in mind whenever you're making an EFF since it's going to be pretty easy to eat a lot of memory.
!!!

@Taylor
Thanks for the extra work and time you have invested into this and for the correction, adds to the things above.
Last edited by gevatter Lars on Mon Nov 01, 2004 5:50 pm, edited 2 times in total.

#40
Just to get it right about the what to do.
Yep, that's it.

It should work in the maps folder as well for ship textures though I haven't actually tested that myself. The "$FPS:" is optional so if you don't specify it there is no harm done. Also remember for the frame filenames that you have a "_" between the filename and the 4 digit frame number since the code will add that when loading.

A quick note on memory usage too, the formula is: (width * height * (bpp/8) * frames)/1024/1024. So if you've got a 50 frame 512x512 32-bit TGA animation it's going to use 50megs of memory. Just keep that in mind whenever you're making an EFF since it's going to be pretty easy to eat a lot of memory.

#41
Ok I have now completed the list above, including the link..hope its the right one...and addet the things Taylor mentioned so that everyone just need to read that instead of searching the entire thread for what to do.

Thanks again @ Taylor.

#42
Gevatter Lars, can you test my frames? It doesn't work for me somehow. Perhaps I did something wrong...


Do I have to add the effect to the weapons_expl.tbl? And do I have to write (in my case) "shockwave.eff" in the tables, or is "shockwave" enogh?

I tired some combinations, but it didn't work.
Visit: http://starfoxmod.proboards32.com/

-UPDATE: 'The Starfox mod' is now called 'Starfox: Shadows of Lylat'

#43
I was joking yesterday that I may have made this too easy, makes it kind of hard to explain :)

Using DaBrain's question as an example here are the steps to making this thing work for a fictitious 5 frame TGA shockwave animation:
(NOTE that the shockwave animation filename is hardcoded to "shockwave01" and not specified in a tbl)

1 - Create all of the frames for the animation as one of TGA, PCX, JPG or DDS
2 - Name the frames as so (if TGA):
shockwave01_0000.tga
shockwave01_0001.tga
shockwave01_0002.tga
shockwave01_0003.tga
shockwave01_0004.tga

3 - Copy the frames to your data/effects directory.
4 - In the data/effects directory create a text file named "shockwave01.eff" with the following in it:
$Type: TGA
$Frames: 5
$FPS: 15

5 - ???
6 - Profit!!

If you manage how to accomplish 5 & 6 I'd like to know but for the sake of EFFs all you need is 1-4. Run the game and they should work. If you don't use the "$FPS:" option it will default to 30. The EFF is about as basic as it can be and you don't need to list the individual filenames for the frames. The only real important thing is that all of the individual frames are of the same "$Type:" (image format), and the the filename is the same as the EFF (without the extension) plus the frame number starting at zero (<eff filename>_0000.<type>).

For the shockwave frames that DaBrain posted earlier you have to rename them to have the correct name "shockwave0000.jpg" to "shockwave01_0000.jpg" and so on. Please note though that what DaBrain posted is 101 512x512x32bpp frames which means it takes 101megs of memory when loaded.

#44
Wow, more than 100 MB....
And renaming 101 frames is also no fun. :(


Thanks for re-explaining taylor. I think I'll have much fun with this feature.

You might think about some sort of "container" for the frames though, as several animations will cause chaos in my /effects folder. ;)


I'll try what you told me tomorrow. I'll test how DDS and PCX (each frame has it's own palette) will do in animations.


Using TGA/JPG is crazy!
Visit: http://starfoxmod.proboards32.com/

-UPDATE: 'The Starfox mod' is now called 'Starfox: Shadows of Lylat'

#45
Wow, more than 100 MB....
And renaming 101 frames is also no fun. :(
I do have a VP of the shockwave you posted if you want me to e-mail or upload it somewhere (2.9meg). I used it to test with so I know that it works.
You might think about some sort of "container" for the frames though, as several animations will cause chaos in my /effects folder. ;)
Yeah I thought of that and Kazan brought up the subject yesterday after I added the code the CVS. I wanted this to be easy to make on all platforms so right now all you need is a text editor. I really want to avoid making a conversion tool of any kind cause, being me, it has to work on every platform the game runs on. The current way is also a deterent against misuse, if you have too many frames then you are definitely abusing the format and wasting memory. Remember that this isn't meant as a replacement for the old ANI format, it's only for things that really need more colors or a particular effect that requires another file format.

That's not to say that it won't ever be made into a wrapper so that everything would be contained in one file. I want to see how people make use of this and if everyone thinks that a wrapper format would be better then I'll code something up, supporting both formats for a while. I always put things like this in a VP for testing so it doesn't bother me that much. The other concern that I originally had was that as individual files I can use the preexisting file loaders for each format. If it was all together in one file then a lot more modifications would need to be made to handle the data.
Locked

Who is online

Users browsing this forum: No registered users and 93 guests

cron