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 / Scrolling Maze Type Games

Author
Message
Dean Sharples
1
Years of Service
User Offline
Joined: 10th Mar 2016
Location: Manchester, England
Posted: 12th Mar 2016 06:15
I want to write a maze type game like Pacmania where I can use an editor to build a map that scrolls in all directions. Does DB Pro have commands and a map creator to do this?
Dean Sharples
smerf
12
Years of Service
User Offline
Joined: 24th Feb 2005
Location: nm usa
Posted: 13th Mar 2016 14:50
dbp has the commands to do nearly anything. There is no map creator but if your willing to learn the language a map creator can be built in just a few minutes to few hours depending on the complexity you want.
A child's dream never dies.
Dean Sharples
1
Years of Service
User Offline
Joined: 10th Mar 2016
Location: Manchester, England
Posted: 14th Mar 2016 19:55
Thanks for the info. When I used STOS Basic on the Atari ST there were a command called MAP which allowed me to display a map on screen over three screens deep and allow me to scroll to any position. For example.

if jstick(1)=1 and MAPPOS>0 then MAPPOS=MAPPOS-4 : rem When Joystick Left move map left four pixels.
if jstick(1)=1 and MAPPOS<3000 then MAPPOS=MAPPOS+4 : rem When Joystick Right move map right four pixels.
map(BLOCKS,X,0)

I think it was MAP but I may be wrong, been over 20 years since my ST (and Amiga) coding days.

Dean Sharples
LBFN
10
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 15th Mar 2016 00:48
Hi Dean Sharples,

The Atari ST was an awesome computer back in the day. I used to program it using 68000 Assembly Language, which was a chore because you needed 100 lines of code to do anything.

Anyway, creating a '2D map maker' of sorts takes a little time and effort. I have written one that works for me, but it is definitely customized to my preferences, and may not work for you. I'm currently making a map of the land in the NES classic Zelda. I've attached a screenshot of what it looks like. If you are interested and you have WinRar, I can put all of the needed files in a folder of it's own, zip it up and email it back to you.



So many games to code.....so little time.

Attachments

Login to view attachments
smerf
12
Years of Service
User Offline
Joined: 24th Feb 2005
Location: nm usa
Posted: 15th Mar 2016 03:19 Edited at: 15th Mar 2016 03:24
made a short 3d example for you granted its very very sloppy code and not memory efficient. you could just as easily add your own images make them into sprites and designate the black areas as said collision sprites other then objects like I used. just wanted to show you how easy dbpro is.
took about 2 hours for me to do it all. Would have been much easier to just add media and make sprites but Im a difficult person I guess. just press arrow key once you make a map. Also there lots of ways to scroll a map in dbro.
ive got a small game attached that I made that's a bit of a side scroller, its bar basic because I was trying to use 200 lines of code for a full game.




+ Code Snippet
game instructions
+ Code Snippet
A child's dream never dies.

Attachments

Login to view attachments
LBFN
10
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 15th Mar 2016 14:12
Hey smerf, that is pretty cool.



So many games to code.....so little time.
Dean Sharples
1
Years of Service
User Offline
Joined: 10th Mar 2016
Location: Manchester, England
Posted: 16th Mar 2016 09:06 Edited at: 16th Mar 2016 09:15
Nice routine but not quite what I am looking for. I am looking to build a 2D game world out of tiles and be able to have my sprite move along with the map. Basically this is the game I want to create - a pacman clone with vertical and horizontal scrolling.

https://www.youtube.com/watch?v=pM0IVnEFST0

Sorry if I didn't make myself clear.
Dean Sharples
Dean Sharples
1
Years of Service
User Offline
Joined: 10th Mar 2016
Location: Manchester, England
Posted: 16th Mar 2016 09:17
LBFN, thanks for the offer of the Map Maker. Once I work out how to do the scrolling I could probably write a map maker in DB Pro. Nice to meet a fellow ST programmer
Dean Sharples
CSL
8
Years of Service
User Offline
Joined: 22nd Mar 2009
Location: USA
Posted: 10th Apr 2016 14:49
I think that a quick and dirty way to accomplish a "proof of concept" of your idea is by creating a screen-sized sprite of the maze image, use it as the background and scroll it by using the SET SPRITE TEXTURE COORD statement.
CSL
seppgirty
FPSC Reloaded Backer
7
Years of Service
User Offline
Joined: 3rd Jul 2009
Location: pittsburgh, pa.
Posted: 10th Apr 2016 16:31
That is a sweet little game smerf. You did this in only 2 hours? Good going.
gamer, lover, filmmaker
WickedX
8
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 11th Apr 2016 03:49 Edited at: 15th Apr 2016 23:22
This snippet should get you started. I could probably come up with something better. But, it's getting late.

+ Code Snippet

Login to post a reply

Server time is: 2017-04-24 16:07:54
Your offset time is: 2017-04-24 16:07:54