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.

2D All the way! / How do I read DATA numbers?

Author
Message
Mudbud Productions
12
Years of Service
User Offline
Joined: 1st May 2011
Location: Cloud 9
Posted: 24th May 2011 07:44 Edited at: 25th May 2011 23:12
EDIT: NEVERMIND I finally GOT IT!! woohoo!! Thanks for the help ya'll

using DBPro 7.7
Ok, so I am trying to make a tile-based 2D map and have the following:


How do I read this so that say 1 = grass; 0 = sky??
I also have a variable that holds the tile amount: dim FMap(40,15)
any help will be appreciated!

EDIT: NEVERMIND I finally GOT IT!! woohoo!! Thanks for the help ya'll

Your signature has been erased by a mod - no affiliate links thanks
Kevin Picone
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Australia
Posted: 24th May 2011 17:13
A nested FOR/NEXT loop would do. Something like this..

(untested)


Mudbud Productions
12
Years of Service
User Offline
Joined: 1st May 2011
Location: Cloud 9
Posted: 24th May 2011 20:34 Edited at: 25th May 2011 23:12
i'm a total noob, how do I assign a sprite to the number? like 1 = grass; 0 = sky?

heres my code so far:



EDIT: Ok so I have a semi Working map thingy:


But how do I make it so that multiple tiles come in without overlapping eachother? so that the 1's look like their in the same place when put together in the DATA functions?

EDIT: NEVERMIND I finally GOT IT!! woohoo!! Thanks for the help ya'll

Your signature has been erased by a mod - no affiliate links thanks

Login to post a reply

Server time is: 2024-04-19 11:14:52
Your offset time is: 2024-04-19 11:14:52