Computer Science Canada Help with RPG please! Tiling ~_~ |
Author: | seymournexus [ Fri Dec 17, 2004 12:08 pm ] |
Post subject: | 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 ~_~ |
Author: | zylum [ Fri Dec 17, 2004 4:00 pm ] | ||
Post subject: | |||
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:
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 |
Author: | seymournexus [ Wed Dec 22, 2004 11:05 am ] |
Post subject: | |
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? (As I don't think I understand it) |
Author: | Hikaru79 [ Wed Dec 22, 2004 12:40 pm ] |
Post subject: | |
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 |
Author: | Drakain Zeil [ Wed Dec 22, 2004 5:22 pm ] |
Post subject: | |
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. |
Author: | seymournexus [ Thu Dec 23, 2004 10:19 am ] |
Post subject: | |
Hikaru79 wrote: 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! <3 |
Author: | Hikaru79 [ Thu Dec 23, 2004 10:26 am ] |
Post subject: | |
Enjoy It doesn't seem that you're averse to doing a bit of reading and learning on your own, and that's a good thing. If you have any questions or something that's not explained well in the tuts, PM me or post it here and I'll help you out pronto |
Author: | seymournexus [ Wed Dec 29, 2004 9:49 am ] |
Post subject: | |
thanks, when i was about to go on compsci for the past couple of days, it was down =( I figured i won't even bother using arrays just set the default potions := 2 and than when user uses it goes potions : = potion - 1 and if user buys one, potions := potion + 1 |
Author: | Hikaru79 [ Mon Jan 03, 2005 11:06 pm ] |
Post subject: | |
seymournexus wrote: thanks, when i was about to go on compsci for the past couple of days, it was down =(
I figured i won't even bother using arrays just set the default potions := 2 and than when user uses it goes potions : = potion - 1 and if user buys one, potions := potion + 1 Yes, but what we're saying is that you can use arrays for your first question as well-- the world map. Having a 2-dimensional array store the logic information for the map is a good approach. Also, if you plan to go further ahead in programming, you'll have to wrap your mind around arrays. It's a fundamental concept you really can't do without later on. |