Big bitmap tile engine help

Started by
6 comments, last by Programmer16 20 years, 3 months ago
I''m going to use the "big bitmap tile engine" (using large tiles (i.e.: 256 x 256) for my maps) like Baldur''s Gate. My problem is how do I do collision detection, and also making the player "move under" stuff like a bridge. Thanks in advance. /* I use DirectX 8.1 and C++ (Microsoft Visual C++ 6.0 Professional edition) */
Advertisement
I believe the way it works in those actually 2D but seemingly 3D games is that the tiles are actually just rendered images of 3D worlds and then they use extremely simplified meshes for the z-buffer handling (moving under bridges) and collision detection. Sorry, but I don''t think there''s any nice or pretty solution. If you want a better explanation, I''d recommend Jim Adam''s Programming Role Playing Games With DirectX. It has an entire section on doing just this.
Thats the book where I got this information. Its in the "Big Bitmap Engine" section.
I would do this...

use bounding boxes for collision around objects and certain scenery on your bitmap

and use overlays for areas that you can go under (behind)


render loop...

draw large bitmap (background)
draw player
draw overlays (bridge)

check for collision with bounding boxes

end render loop

also if you have a bounding box in the same position as the object like the bridge, then you can not display the bridge when the player enters the bounding box. This will allow you to see inside of houses when the player enters them, but not when he is outside.

hope this helps
Thats a great idea. Thanks!
I have another question. If I make the maps like this, then I''m going to have 16 textures for each map. That''ll make each map to be about 3 MB. Is there any way I can change this?
Thats the one problem with big bitmap games, is that you get nice picture background, but have to deal with large size images.

I would only load the backgrounds for the area that im in, and surrounding areas, then as the player moves to another area, load surrounding areas for his new position, freeing the old ones up.

So that way you only have 9 areas in memory loaded at any one time

1 2 3
4 5 6
7 8 9

player is located at position 5

I have heard that you can save the pictures in a .jpeg format and load from that. But I cant find any links for source for a loader from .jepg pictures. But that would help dramatically with hard drive space.

Alright, I''ll try that. Thanks again!

This topic is closed to new replies.

Advertisement