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 / How do i use the data command to construct a map formy game?

Author
Message
Blue Shadow
20
Years of Service
User Offline
Joined: 6th Feb 2004
Location:
Posted: 11th Apr 2004 21:06 Edited at: 11th Apr 2004 21:06
I am making a 2d platform game and i wondered how to use the data command to read the map. I read ScouseKnight's tutorial on 3d pacman and it had a lot about 3d data commands. Including making the matrix and positioning the tiles. I just wondered how you do this in 2d.Any help would be greatly apreciated.

Cheers,

Michael

Visit the Code Monkey's website at http://www.freewebs.com/codemonkeystudios
Bishop
21
Years of Service
User Offline
Joined: 18th Dec 2002
Location: In my favorite chair...
Posted: 11th Apr 2004 23:04
hey michael,
i don't know if it will help, but here is a quick data textureing program.....i use data to texture the tiles.....you could use something like this when making sprites, but that is really not my department....hope it helps

cheers,
bishop

"When you were born, you cried and the world rejoiced. Live so when you die, the world cries and you rejoice."
Blue Shadow
20
Years of Service
User Offline
Joined: 6th Feb 2004
Location:
Posted: 11th Apr 2004 23:12
Thanks for your help. Thats the kind of thing i was looking for except in 2d. Do you know how to split the scren up into equal segments and then use this to position the tiles.

eg. 1 is a grass tile 0 is air. So you read accross the data and it fills in the spaces with the correct sprites.

Thanks in advance,

Michael

Visit the Code Monkey's website at http://www.freewebs.com/codemonkeystudios
ReD_eYe
21
Years of Service
User Offline
Joined: 9th Mar 2003
Location: United Kingdom
Posted: 12th Apr 2004 14:18
easy


hope it helps

In the beginning, the universe was created...
This made alot of people very angry and it has been widely regarded as a bad idea...
Visit http://redeye.dbspot.com
Blue Shadow
20
Years of Service
User Offline
Joined: 6th Feb 2004
Location:
Posted: 12th Apr 2004 14:41
Red eye thats brilliant thanks. Just one more small thing; could you please explain this bit of code.Then i'll be well away. Thankyou!



Cheers,

Michael

Visit the Code Monkey's website at http://www.freewebs.com/codemonkeystudios
Chaos
21
Years of Service
User Offline
Joined: 8th Feb 2003
Location: United Kingdom
Posted: 12th Apr 2004 14:59
I would not use this techneque in a platform gake to make the levels. If you want to make levels which contain complex situations it will be hard to implement them in a data map without the code becoming ridden with data commands.

Construct a small level editor. It will only take you a day or two to get a basic one working and it will be good experience,

Chaos

Nothing is True
Everything is Permitted
comando 300
20
Years of Service
User Offline
Joined: 23rd Nov 2003
Location:
Posted: 12th Apr 2004 16:38
@ReD_eYe

Thanks!,now I understand that

CURRENT PROJECT: RETRO PAC-MAN
ReD_eYe
21
Years of Service
User Offline
Joined: 9th Mar 2003
Location: United Kingdom
Posted: 12th Apr 2004 18:19 Edited at: 12th Apr 2004 18:22
here you go, thats as best as i can explain it


chaos is right, data commands aren't that great for complex levels. It would be better to use a level editor which wrote a grid of numbers to a text file which your program read in and made the tiles from that.

In the beginning, the universe was created...
This made alot of people very angry and it has been widely regarded as a bad idea...
Visit http://redeye.dbspot.com
Chaos
21
Years of Service
User Offline
Joined: 8th Feb 2003
Location: United Kingdom
Posted: 12th Apr 2004 18:22
I have an old basic platform level editor available if you want the source code monkey?

Chaos

Nothing is True
Everything is Permitted
ReD_eYe
21
Years of Service
User Offline
Joined: 9th Mar 2003
Location: United Kingdom
Posted: 12th Apr 2004 18:26
just found a problem with the code, it didn't read it like you'd expect it to, a simple fix but here it is again:


i'm gonna add in a little controllable character some collision now, so if you need more help just say.

In the beginning, the universe was created...
This made alot of people very angry and it has been widely regarded as a bad idea...
Visit http://redeye.dbspot.com
Blue Shadow
20
Years of Service
User Offline
Joined: 6th Feb 2004
Location:
Posted: 12th Apr 2004 18:30
Yes please that would be great.

What exactly is a level editor. What i was going to do was make the tiles and then put a number on them. Then i was going to use a free program like gamemaker or the games factory and draw out my level. Then write the numbers down into a data segment.

Cheers,

Michael

Visit the Code Monkey's website at http://www.freewebs.com/codemonkeystudios
Chaos
21
Years of Service
User Offline
Joined: 8th Feb 2003
Location: United Kingdom
Posted: 12th Apr 2004 18:54
A level editor would allow you two place the tiles on a grid. Add collsions, triggers etc and then import the map into the game. Creating a map in Game maker would be waste of time.

you will need to write a map editor in DB/DBPRO if your game is going to have multiple levels

I am going to write short tutorial on platform games after i find my old editor and re write it in pro.

Chaos

Nothing is True
Everything is Permitted

Login to post a reply

Server time is: 2024-09-22 04:31:41
Your offset time is: 2024-09-22 04:31:41