Archived

This topic is now archived and is closed to further replies.

which do you prefer/which is faster?

This topic is 6569 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I personally think that one single bitmap is a good idea as long as your not doing any filtering. It's easier to keep track of the art. There are comprimises that I think should be made though. For instance, one file might have all the walking animations, and another all the firing animations, then maybe yet another with swimming animations.

--TheGoop

Share this post


Link to post
Share on other sites

OK, another question then: Based on your example would something like this work? (VERY rough example)
============================================

case JOY_LEFT:
WalkLeft();
case JOY_RIGHT:
WalkRIght();
case JOY_UP:
WalkUp();
case JOY_DOWN:
WalkDown();


WalkLeft()
{
// Walkleft bmp filename
// Set Up rect for the bmp file
while(JOY_LEFT == TRUE)
{
if(framecounter >= number_of_frames)
{
framecounter = 0;
}
Blt(etc etc etc);
framecounter++;

}
}
=========================================
Does this look anything like what you might do? Thanks, friz

------------------
Still Learning...

Share this post


Link to post
Share on other sites
I don't know what your experience is in programing so don't flame me, but you will need to stick in a break; statement or all of those functions will be called everytime.

code:

case JOY_LEFT:
WalkLeft();
break;
case JOY_RIGHT:
WalkRIght();
break;
case JOY_UP:
WalkUp();
break;
case JOY_DOWN:
WalkDown();
break;


Sorry if you already knew that but didn't write it in here. But if you didn't then this might help you out.

Share this post


Link to post
Share on other sites
I prefere differnt bitmaps. Not one bitmap that has all the animations,screens,ect for the whole game. Now a bitmap that has all the animation for one thing sure. For the whole world no. Reason why VIDEO MEMORY!!!!!
You might not need that pic untill a differnt level,further into the level,ect. I mean there is a limit to video memory (im trying to program for 2mb cards(the standerd for 2d i belive)). So basicly try an fit as many things you are going to be using in video memory and not just all the pics in system memory.

Share this post


Link to post
Share on other sites

My groovy Santa icon has a sprite question. Do you prefer putting all of you sprites on one bitmap or would you rather use individual bitmaps? Is there a speed difference? If you use individual bitmaps do you use a linked list or is there another way I'm overlooking?

PS- Anyone read the new Game Arch/Development book yet?

------------------
Still Learning...

Share this post


Link to post
Share on other sites

Thanks for the input everyone. I did figure I would load the surfaces for each level with only the bitmaps needed for that level and release them after the level so its good to hear someone else say that. At least I know I'm on the right track.

Don't worry Gromit, no flames here! I appreciate any advice. I have an MCP but I seem to have trouble translating that lovely MFC knowledge into game knowledge

A Christmas wish: A great big fat FAQ so we can limit the questions on the message boards to those who have really important Q's and keep the rest of us occupied reading.

------------------
Still Learning...

Share this post


Link to post
Share on other sites