which do you prefer/which is faster?

Started by
4 comments, last by frizb 24 years, 4 months ago
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

Advertisement

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...

Still Learning...
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.

William Reiach - Human Extrodinaire

Marlene and Me


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.

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...

Still Learning...

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...

Still Learning...

This topic is closed to new replies.

Advertisement