Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / 2D Maps - aka Zelda

Author
Message
ChaosNet
20
Years of Service
User Offline
Joined: 16th Jan 2004
Location: United Kingdom
Posted: 9th Feb 2004 19:35
Hi. I'm currently in the progress in making a zelda type rpg game. I've learnt how to move sprites about, but i was wondering if there was any way to load up a bmp image and then make a kinda overlay for it that would restrict where my sprite could go - i.e not walking through trees in the bmp image, stopping at the edge of rivers. Kinda like this...

Any help is really appreciated.
Gjl
20
Years of Service
User Offline
Joined: 28th Dec 2003
Location:
Posted: 9th Feb 2004 21:30 Edited at: 9th Feb 2004 21:41
You should make the maps as ASCII files rather than bitmap especially since you want a 2d grid based map. Bitmaps are good for creating heightmaps for 3d terrains but this is not what you want.

See this tutorial:
http://files.thegamecreators.com/developer/dbpro/DBPro_Tutorial_6_Huge_Dungeons.zip
It's for a 3d map but the concepts are the same so it wouldn't be difficult to convert it to 2d. Just program it so it makes a 2d world based on the map file.

For trees which are more than one tile big, you will have to split the tree into different sections and build up a tree in the game by piecing together all the bits on the map.

say a tree is 6 squares big it will look like this:
1 2
3 4
5 6
Basically each symbol loads a different tile. You'll understand when you read the example and have a look at how maps are made in this way.

This is pretty much how maps are made in Zelda and a tile based level will give your game more of a classic feel to it as well as making level designing much easier. It would be much more easier to make a map maker for your game if you wished. Also bitmaps use up much more space than ascii files and would take longer to load.
Kentaree
22
Years of Service
User Offline
Joined: 5th Oct 2002
Location: Clonmel, Ireland
Posted: 9th Feb 2004 21:59 Edited at: 9th Feb 2004 22:00
Another, more accurate but slower way would be to load a second black & white bitmap which is an overlay of the other one, where all the parts you cant walk through are coloured white ( or black, whatever you prefer ) and test it using the point command. Then, according on the colour value, you can either move that direction or not.

I would be unstoppable if I could just get started...
ChaosNet
20
Years of Service
User Offline
Joined: 16th Jan 2004
Location: United Kingdom
Posted: 10th Feb 2004 00:03
Thanks guys - I'll try both and see which works best for my game.

Login to post a reply

Server time is: 2024-11-26 03:45:42
Your offset time is: 2024-11-26 03:45:42