? Map to DATA ● SmileBASIC Source

Sign In

Register
*Usernames are case-sensitive
Forgot my password
[Help Wanted] SmileBASIC Documentation Project

Map to DATA

Submitted
Updated
Author
kitesinpowerlines
Public Key
5KTXN28V
Min. Compat.
New 3DS
Version
1.0
Rating
2 votes
Description If you use the default Smile Tool map editor, you'll know it saves large files. This program aims to take individual map layers and export them into PRG3 as DATA instructions with the "WriteMap" function and redraw the entire map with that DATA in the "DrawMap" function. This saves half as much space of SC saves from the Smile Tool and produces the same results. All layer data can be exported into one file as well. In the future, I wish to add a map editor integrated with these functions to reduce the amount of manual work to write DATA from map files. Instructions 1. Copy DAT:SC_ saves from the Smile Tool into this program folder. 2. Run the program READMAP 3. You will be prompted to first name the layer (the name creates the @label in PRG3). 4. Select the DAT:SC_ file that you copied into this program folder. 5. The map data will be written to PRG3 and you may choose to export another layer or quit. 6. You will have to manually save the file in PRG3 if you wish to use it later. 1. Copy READMAP file and the newly saved map file into your program folder. 2. Open READMAP and set value of CONVERT (line 8) to 0 and save the file. 3. At the beginning of your program, typeEXEC "PRG1:READMAP":LOAD "PRG3:NEWMAPFILE" 4. You may now create maps by using this function/arguments:DrawMap "@label", layer number, 64 I've included sample map files for you to test these functions if you wish, but in order for it to work, you must follow these steps. 1. Run EX file from the MAP_TO_DATA folder. 2. Run through the steps seen from WriteMap spoiler above, except name each layer as "LAYER_"+layer number as shown in the DAT:SC_ files. 3. Repeat step 2 until you have exported all 4 layers and then press B to quit when prompted. 4. The map will draw and you can use the left stick to scroll around. Note: You can use this file to test your own exported maps but will need to rename the "@label" arguments in the DrawMap function of EX file. Notes The DrawMap function is a little slow and I have not tested this on O3DS. However, I imagine using transitions like FADE, etc. will cover the map as it draws.
Categories
Keywords
15 Comment(s) IAmRalsei IAmRalsei Forum Leader Hidden Achievements First Year My account is over 1 year old Website Expert Programmer Programming no longer gives me any trouble. Come to me for help, if you like! Programming Strength This doesn't work for me. i tried to convert a file with no water tiles in it but it got changed to ONLY be water tiles. kitesinpowerlines kitesinpowerlines Avatar Block I didn't change my avatar for 30 days. Website Avatar Embargo I didn't change my avatar for 90 days Website Avatar Taboo I didn't change my avatar for 180 days Website I will look into it kitesinpowerlines kitesinpowerlines Avatar Block I didn't change my avatar for 30 days. Website Avatar Embargo I didn't change my avatar for 90 days Website Avatar Taboo I didn't change my avatar for 180 days Website I didn't realize this before, but the "WriteMap" function also exports empty spaces which can significantly increases the size of the file. I will experiment with exporting tile data, x location, y location for all used space. If this method further reduces the file size from the exported example map, I will make this update before the map editor update. random_god random_god Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Zelda Is Awesome! I love The Legend Of Zelda! Express Yourself Video Games I like to play video games! Hobbies Wow... 27 minutes ago... this is completely irrelevant. random_god random_god Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Zelda Is Awesome! I love The Legend Of Zelda! Express Yourself Video Games I like to play video games! Hobbies When I looked at the third picture, I though "INSTANT GAME INSPIRATION!" Cool. kitesinpowerlines kitesinpowerlines Avatar Block I didn't change my avatar for 30 days. Website Avatar Embargo I didn't change my avatar for 90 days Website Avatar Taboo I didn't change my avatar for 180 days Website Wait did someone else release something like this because I missed it GreedyGoat8 GreedyGoat8 Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Avatar Block I didn't change my avatar for 30 days. Website Disguised Hidden Website It was definitely 43 minutes ago. This is a smart concept. It could save a lot of room and memory. It will be cool when you implement a map editor. kitesinpowerlines kitesinpowerlines Avatar Block I didn't change my avatar for 30 days. Website Avatar Embargo I didn't change my avatar for 90 days Website Avatar Taboo I didn't change my avatar for 180 days Website Yes. I am currently looking at other map editor code to learn more about creating one myself. But it’s going to be a while before it is complete, so in the meantime, existing map editors will have to be used and the manual process from the listed steps followed. It is inconvenient but I’ve gotten some use of these functions in their current state and figured someone else may too. IAmRalsei IAmRalsei Forum Leader Hidden Achievements First Year My account is over 1 year old Website Expert Programmer Programming no longer gives me any trouble. Come to me for help, if you like! Programming Strength Hopefully you aren't planning on stealing my up to this point unannounced game, Arctic Adventure because I've decided to revive it after my 3DS Data was essentially wiped (only got as far as the title screen anyway) In fact, i'm calling creative commons right now (Just kidding, someone's probably used the name Arctic Adventure before) GreedyGoat8 GreedyGoat8 Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Avatar Block I didn't change my avatar for 30 days. Website Disguised Hidden Website Coo, coo. Woah. Toad we posted at the same time. IAmRalsei IAmRalsei Forum Leader Hidden Achievements First Year My account is over 1 year old Website Expert Programmer Programming no longer gives me any trouble. Come to me for help, if you like! Programming Strength Cool, cool. kitesinpowerlines kitesinpowerlines Avatar Block I didn't change my avatar for 30 days. Website Avatar Embargo I didn't change my avatar for 90 days Website Avatar Taboo I didn't change my avatar for 180 days Website Lol no worries, the sample map included is actually from an RPG I’m working on and the image here just shows the top left corner of the continent (however, you can see the whole continent in the example file provided) IAmRalsei IAmRalsei Forum Leader Hidden Achievements First Year My account is over 1 year old Website Expert Programmer Programming no longer gives me any trouble. Come to me for help, if you like! Programming Strength I was actually talking to random_guy. kitesinpowerlines kitesinpowerlines Avatar Block I didn't change my avatar for 30 days. Website Avatar Embargo I didn't change my avatar for 90 days Website Avatar Taboo I didn't change my avatar for 180 days Website Well this is awkward random_god random_god Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Zelda Is Awesome! I love The Legend Of Zelda! Express Yourself Video Games I like to play video games! Hobbies Nah, I'm working on Ruebled. I will probably add an arctic part of the world map. I might be an idiot and make the overworld maps huge. Yes, I said maps, I'm planning on having 3 overworlds split into sections. The amount of sections in each overworld will be a perfect square (4,9,16,ect.) so that the overworld will be a square (duh.) I should probably be saying this in my thread. I'll copy it to the thread.