please help =) tilebased map ...

Started by
11 comments, last by _Hybrid_ 22 years, 8 months ago
Forgot to mention too that nehe.gamedev.net has really good OpenGl tutorials and it explains the code real well also after the first couple lessons on there you should start getting the hang of it also Opengl isn''t the "best" api its just a nice one and direct 3d is comparable...its all a matter of preference really. theres a D3d sight nexe.gamedev.net if ya wanna give D3d a go see which one you prefer!
Advertisement
hmmm, thx for those hints...

but i wont use any of your compilers, cause i have been programming with it for a while now and its executable size is 1/8th of the size of microsoft i think...

cheers
If you still want that code, here it is... I haven''t tried it... I don''t have a compiler here, but this is basically what you want to do...
  BITMAP *graphics[4]; //four different tilesgraphics[0] = load_bitmap("grass.bmp");graphics[1] = load_bitmap("stone.bmp");//And so on...//All tiles have same width and heightint tilew = graphics[0]->w;int tileh = graphics[0]->h;for(int x=0;x<5;x++)for(int y=0;y<5;y++){	blit(graphics[map[x][y]],screen,0,0,tilew*x,tileh*y,tilew,tileh);}  

//Ksero

This topic is closed to new replies.

Advertisement