
-----------------------------------
seymournexus
Fri Dec 17, 2004 12:08 pm

Help with RPG please!  Tiling ~_~
-----------------------------------
Hello fellow members of CompSci, I need help!  LOL, ok, i'll get to the main point now ;)

I am coding an RPG for my computer programming class and i was wondering, how can I make the "world map" screen using tiles?  Thanks in advance

P.S. I also need help with my Potion Arrays ~_~

-----------------------------------
zylum
Fri Dec 17, 2004 4:00 pm


-----------------------------------
basically you need a bunch of drawn tiles named something like tile1, tile2, tile3... this makes it easy to load all you the tiles into an array. then you need a text file which holds the data for the map and it would look something like:


1 1 1 2 1 1 1 1
1 1 1 2 1 1 1 1
1 1 1 2 1 1 1 1
1 1 1 2 1 1 1 1 
1 1 2 2 2 2 1 1
1 1 2 3 3 2 1 1 
1 1 2 2 2 2 1 1
1 1 1 1 2 1 1 1
1 1 1 1 2 1 1 1


where 1 would be a grass tile and 2 would be a path tile and 3 would be water... you would store all your pictures in an array. then when you go to draw your map, you'd simply draw the pic which coorisponds to that element of the tile array

-----------------------------------
seymournexus
Wed Dec 22, 2004 11:05 am


-----------------------------------
yes, i saw something like that on my friend's screen.  But I still have no clue how to do it :S

Also, can you explain Arrays to me? :P (As I don't think I understand it)

-----------------------------------
Hikaru79
Wed Dec 22, 2004 12:40 pm


-----------------------------------
There's several tutorials on arrays in the Turing Tutorials section: 
http://www.compsci.ca/v2/viewtopic.php?t=1117
http://www.compsci.ca/v2/viewtopic.php?t=366
http://www.compsci.ca/v2/viewtopic.php?t=3248

It can probably do a better job explaining than we can :)

-----------------------------------
Drakain Zeil
Wed Dec 22, 2004 5:22 pm


-----------------------------------
Somthing I wanted to do for a game was save it to an outside text file, and instead of loading number, just use hex. Well yes you can only use base options in a few selective functions, sure, and most of these can't be used really... ok. However,  ascii is hex, you can just use the ord/chr to swap between these. This makes files smaller, and better.

Just tossing this out there.

-----------------------------------
seymournexus
Thu Dec 23, 2004 10:19 am


-----------------------------------
There's several tutorials on arrays in the Turing Tutorials section: 
http://www.compsci.ca/v2/viewtopic.php?t=1117
http://www.compsci.ca/v2/viewtopic.php?t=366
http://www.compsci.ca/v2/viewtopic.php?t=3248

It can probably do a better job explaining than we can :)
Cheers! 