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! / Map Read Function

Author
Message
Saiochi
18
Years of Service
User Offline
Joined: 17th Sep 2006
Location: Under your bed
Posted: 3rd May 2007 03:54 Edited at: 3rd May 2007 08:11
This isn't a question, just posting a fixed version of a map reader I was working on about a week ago. The problem I had that I didn't realize I had was removal of CR and LF ASCII Characters from the map format files.



This is the main code, It reads bytes from a file, checks if they are CR or LF Characters, if not then they are saved to an array and displayed. If they are, we read until we find a character that isn't, thus "weeding" them out.



Sample Map, you can really use anything for those numbers (Alphabetic, or Numeric characters). Save that as Map_t-1.txt (Or a custom name, just remember to change the filename in the main program). Then run the program and see what it does

This is useful for setting up solid and walkable tiles for RPGs, layers, event tiles, whatever else you can think of. Hope this helps some of the people wondering how to make a basic (Very BASIC) Map Reader.

Cheers!

If you have X-ray vision, can you see through your own eyelids?

Login to post a reply

Server time is: 2025-08-09 02:15:25
Your offset time is: 2025-08-09 02:15:25