PDA

View Full Version : bitmap vs geometric shapes?



zzapatista
02-20-2001, 10:34 AM
If i were to make some kinda of moving block, tetris flavored game, would it be better/faster/easier to draw the blocks using geometric rectangle functions...or to use bitmaps?

Also is there some sort of timer function that can be used to make function calls every so many time units?

zed
02-20-2001, 05:07 PM
using textures will be the fastest way.
source to tetris is on my site.
for glut u can setup a timer with glutTimerFunc

zzapatista
02-20-2001, 05:20 PM
Thanx man. I'll check out ur code and see what i can learn from it.

zzapatista
02-20-2001, 05:21 PM
Hrm...i'm getting an error on the tetris.html. Says it does not exist

mango
02-20-2001, 06:32 PM
I do not think that textures is the fastest way. Tetris is made up of colored blocks so you do not need bitmaps. You can do it both ways and if you have hardware acceleration is speed certainly not a problem.

It should also be easier to delay after each frame. If you are using GLUT is the easiest to use glutGet(GLUT_ELAPSED_TIME), see: http://www.fatech.com/tech/opengl/glut/index.php3?fps

zed
02-21-2001, 01:37 AM
the page is there but the server tends to go siesta quite often