Sign in to follow this  
TheCrow

BlitzBasic Maps

Recommended Posts

I've been writing myself a 2D RPG game engine, as of right now its very simple and has very little in it. I got to thinking the other day instead of this loading a new map each time I go past the edge of the screen why dont I have the player in the center the whole time, and have 1 or 2 huge maps. My only problem that I seem to have run across is that the program I want to use to make the map seems to not be able to save the map as a bitmap if it is that big. I haven't actually made the map yet I rather used one from a disc (came with a Copy of MAPPY which i got from a visual basic programming book), the map is rather large... I believe about 100X100 tiles that are 32X32 pixels. So I open up the map with MAPPY then goto save as and check the little box that says something about save as *scn.bmp, Then I get the error that says something along the lines of 'The file may not have been saved correctly'. The file is there just doesn't work, can't open it with anything. So my question is... Since BlitzBasic2D can only load .png and .bmp image files, how have you guys loaded maps? Now I have looked around and found the Mappy BB fmp to bmp converter, but I found that completely complicated to understand and I'd like to be able to write my own movement functions. Thanks in advanced for any help. TheCrow

Share this post


Link to post
Share on other sites
So basically you store your map as a single, big, bitmap file?

Most games use a tile system: instead of storing the whole level as a single image, they split it up in tiles, and use a level file to tell the game what tiles to display where. This saves a lot of memory.

Such a level file can be as simple as this:

000100011212331
011344112134415
157751199100232
111718888888777
117788886888888
888886888886888
886688688688886

Where each number refers to an image file. Of course, telling what number refers to what file is usefull to store in the level file. You can get more complex than that, by also storing player and enemy start positions in that file, after the tile data, or just about anything that you need to know about that level. But the above is just the basic idea.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this