This site is no longer active and is available for archival purposes only. Registration and login is disabled.

Dynamic calculation of resource IDs


Postby dan.p » Jan 31, 2005 @ 6:16am

Actually I'm about the same stage in my development as you (or so it seems), so I was just curious. Right now I do what you do: throw everything in as a resource and flop in a few lines of code to load it up. So I was curious as to anyones opinions on VFS more than anything. :)
dan.p
pm Member
 
Posts: 89
Joined: Jan 6, 2005 @ 6:49am


Postby fzammetti » Jan 31, 2005 @ 6:22am

Well, let me know what you find out if you do use it, if you wouldn't mind :) I wouldn't rule it out for the final release.

If you are doing what I did, which basically means three lines of code per image, I highly suggest going the "one large image with all the animation cells on it" route. That has made my life a lot easier, to the point that I'm hitting myself for not doing it sooner :)

Also, if you want, I could provide you the function I wrote to populate an array with the cells. It's nice in that you don't need to supply it the number of frames, so you can change your animation sequences without changing any code. Very handy early on in development.
...and so I said to Mr. Gates: "$640 billion should be enough for anyone!"
User avatar
fzammetti
pm Insider
 
Posts: 1496
Joined: Jun 4, 2002 @ 6:21pm
Location: Omnytex Technologies


Postby dan.p » Jan 31, 2005 @ 9:56am

Isn't that exactly what I suggested above? :) The code from my Graphic class that I pasted above does exactly what you describe. Although I do have my Animation class seperate. It sounds like your approach (although handled basically the same) is quite different. Your graphic and animation class appear to be all in one. Although I am curious, how are you changing animation sequences without altering code? Animation sequence to me means, from running to walking, or dying, etc. Do you mean something else?

Creating a graphic is actually only one line of code for me: gGraphicManager->Register(new Graphic(...)); Although I do split it up into two for readability.

I'll have a few different types of graphics for my game. One will contain all tiles for individual maps environments. Like if I have a level with snow type environment, a map graphic will contain all tiles for it, including buildings, etc.

The other type are things like special effects and characters (including monsters). A single character/monster will have it's own graphic, which will contain all animations (walking, running, dying, etc.). The special effect graphics will be in categories. I'll have one for spells, for example, and another for projectiles.

Or did you mean something different? If so, could you be more specific? I honestly can't imagine having all the graphics for the game in a single graphic file, which is the only other thing that you might be talking about.
dan.p
pm Member
 
Posts: 89
Joined: Jan 6, 2005 @ 6:49am


Previous

Return to Windows Mobile


Sort


Forum Description

A discussion forum for mobile device developers on the Windows Mobile platform. Any platform specific topics are welcome.

Moderators:

Dan East, sponge, Digby, David Horn, Kevin Gelso, RICoder

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum