# 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! / RPG Engine - how do I get more then 9 diffrent tiles? (read for clarification)

Message
Posted: 26th Jun 2003 04:13
I'm using a very simple type of RPG engine that reads from a file 1 digit. I can't figure out how to make it read into an array all the digits UNTIL it finds a ,.

Please tell me if I'm not clear enough...
~Morph
Owner of MultiCode.NET and Multi2k.NET.
Nothing is something, and something is then nothing. Life is an illusion.
Posted: 26th Jun 2003 06:24
Maybe you could use negative numbers. -9 to 9 will give you a grand total of 19 tiles. Or you could read symbols using strings like "!" "@" "#". The ASCII tabels will probably be your best friend in the second suggestion, but I may still be in the dark on what you're trying to do.

"I need gopher-chucks!!"
Posted: 26th Jun 2003 06:27 Edited at: 26th Jun 2003 06:32
Thats a great idea, except it currently reads only digits into a Number Only variable @_@. Thankx though. I didn't think of doing it that way..256..hmm..

Here is my current code.

==================================================
dim Map(4,4)

mapname\$="map.txt"

for x=1 to 4
for y=1 to 4
Map(y,x)=a-48
next y
next x
close file 8

for x=1 to 4 : for y=1 to 4
paste image Map(y,x),x*32+210,y*32+120
next y : next x

==================================================

If I want to read ascii characters through that method..would I just find the SCANCODE for each letter??

~Morph
Owner of MultiCode.NET and Multi2k.NET.
Nothing is something, and something is then nothing. Life is an illusion.
Posted: 26th Jun 2003 17:56
Meh, screw it all. I'll just create an array, save it to the map.txt file, then use LOAD ARRAY to get all the map objects and ect...

~Morph
Owner of MultiCode.NET and Multi2k.NET.
Nothing is something, and something is then nothing. Life is an illusion.
Posted: 29th Jun 2003 20:14
erm... you're using bytes to store data values? A single byte can be anywhere in the range 0-255. How many tiles do you need?

Posted: 29th Jun 2003 20:27
Yeah, just use a '0' instead of a ','. Then you still have 254 different tiles available.

cuRant PRogekt: a three-de map editer
Why the hell'd you ask me for crying out loud!?!
Athelon XP 1400 Plus - Nvidia Geforce MX400 - 256mb RAM
Posted: 29th Jun 2003 22:34
Nah, like I said I'm using SAVE ARRAY and LOAD ARRAY...Easier, and also easier for users to edit files if need be.

~Morph
Owner of MultiCode.NET and Multi2k.NET.
Nothing is something, and something is then nothing. Life is an illusion.