Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Help with RPG please! Tiling ~_~
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
seymournexus




PostPosted: 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 Wink

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 ~_~
Sponsor
Sponsor
Sponsor
sponsor
zylum




PostPosted: Fri Dec 17, 2004 4:00 pm   Post subject: (No 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:

code:

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




PostPosted: Wed Dec 22, 2004 11:05 am   Post subject: (No 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? Razz (As I don't think I understand it)
Hikaru79




PostPosted: Wed Dec 22, 2004 12:40 pm   Post subject: (No 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 Smile
Drakain Zeil




PostPosted: Wed Dec 22, 2004 5:22 pm   Post subject: (No 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.
seymournexus




PostPosted: Thu Dec 23, 2004 10:19 am   Post subject: (No 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 Smile

Cheers! <3
Hikaru79




PostPosted: Thu Dec 23, 2004 10:26 am   Post subject: (No subject)

Enjoy Smile 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 Smile
seymournexus




PostPosted: Wed Dec 29, 2004 9:49 am   Post subject: (No 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 Wink
just set the default potions := 2 and than when user uses it goes potions : = potion - 1 and if user buys one, potions := potion + 1
Sponsor
Sponsor
Sponsor
sponsor
Hikaru79




PostPosted: Mon Jan 03, 2005 11:06 pm   Post subject: (No 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 Wink
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.
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 9 Posts ]
Jump to:   


Style:  
Search: