? Loading Map files into your programs ● SmileBASIC Source

Sign In

Register
*Usernames are case-sensitive
Forgot my password

Loading Map files into your programs

Introduction

So I noticed that a lot of people have no clue onto how to use the files that you get from the map editing program. So I decided to write about it. It is very nice and has advantages over just making them in the program. To begin, make sure that you have used "SCSAVE" and not the MAP save, MAP saves are just useful for loading it to work on it again, but not really necessary.

Loading the files

So to begin you are going to want to load the files. They should be "SC_MAPNAME_Lx". So first we are going to make an array. The command that we will use will automatically expand the array, so you can just say 0 elements DIM MAP[0] Then what use is it if we don't do anything with it? First, set the BGSCREEN size to 64x64, then put the loading in a FOR loop to have it be simpler. FOR I=0 TO 3 BGSCREEN I,64,64 LOAD "DAT:SC_MAPNAME_L"+STR$(I),MAP,FALSE NEXT If you actually ran this, you will have noticed that nothing really happened. This is because we did not use a vital command: BGLOAD. Basically just put "BGLOAD I,MAP" between the LOAD and the NEXT and it should work.

Challenge

You can read as much as you want, but you're not going to be able to use this unless you put it into practice! So here's the challenge: either create a map for a game and use this or just do it for a map you already have. Or even change the map a game you downloaded uses, just use it! Tell me how it works. Feel free to ask any questions.
Author
Mariominer
Updated
Rating
20 votes
Categories
Keywords
  • maps
20 Comment(s) the_squat1115 the_squat1115 Minecraft Is Awesome! I love Minecraft! Express Yourself Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Video Games I like to play video games! Hobbies Very useful! liknzelda liknzelda Zelda Is Awesome! I love The Legend Of Zelda! Express Yourself Video Games I like to play video games! Hobbies Beginner Programmer I'm just starting out! I'm still trying to grasp the basics. Programming Strength kldck_hul thank you so much. I didn't realize that on mobile you have to scroll to see the rest of the code box. Sorry for posting this as a new comment. For whatever reason, the reply and quote buttons are gone for me. http://m.imgur.com/PHHkupY 12Me21 12Me21 Syntax Highlighter Received for creating the code syntax highlighter on SBS Night Person I like the quiet night and sleep late. Express Yourself There's an option on the user page I think liknzelda liknzelda Zelda Is Awesome! I love The Legend Of Zelda! Express Yourself Video Games I like to play video games! Hobbies Beginner Programmer I'm just starting out! I'm still trying to grasp the basics. Programming Strength Gives me a syntax error when ran: http://imgur.com/ZvJPgcc kldck_hul kldck_hul First Month Joined in the very first month of SmileBASIC Source Website Scholar Received for knowing a great deal about programming topics Achievements Zelda Is Awesome! I love The Legend Of Zelda! Express Yourself You forgot to finish the line ;) LOAD "DAT:SC_HS_L"+STR$(I),MAP,FALSE Mariominer Mariominer First Day Joined on the very first day of SmileBASIC Source Website Promoted Page My page was promoted on SmileBASIC Source! Achievements Expert Programmer Programming no longer gives me any trouble. Come to me for help, if you like! Programming Strength *Sees my map tutorial on front page *Looks to see what's up >2 comments Guzzler Guzzler First Week Joined in the very first week of SmileBASIC Source Website Drawing I like to draw! Hobbies Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Thank you! I didn't have a clue of how it worked until now. 16bitcoder 16bitcoder Thanks! That is really helpful. 12Me21 12Me21 Syntax Highlighter Received for creating the code syntax highlighter on SBS Night Person I like the quiet night and sleep late. Express Yourself I wonder if the array-resizing property could be useful... probably not. UltraPhoenix4 UltraPhoenix4 Third Year My account is over 3 years old Website Bees Hidden Easter Eggs Avatar Taboo I didn't change my avatar for 180 days Website What about loading animations? Its probably going to need another page. Or its really simple and i cant see it. glennxserge glennxserge UltraPhoenix4, if you mean you want to load animation data onto an existing sprite then SPANIM with the animation target "UV" will let you specify the length and coordinates in your sprite page for each frame in the animation. NintendoFanFever NintendoFanFever When you use it with XSCREEN 2, it gives you a syntax error. NintendoFanFever NintendoFanFever the means i'm using the same as above... XD Mariominer Mariominer First Day Joined on the very first day of SmileBASIC Source Website Promoted Page My page was promoted on SmileBASIC Source! Achievements Expert Programmer Programming no longer gives me any trouble. Come to me for help, if you like! Programming Strength When you use XSCREEN 2, you need to add additional things to it. XSCREEN normally has 2 things omitted: Sprite count and BG layers. So in order to use it with this you need to do something like XSCREEN 2,256,4 or whatever values you need. TheRealGamerBoy07 TheRealGamerBoy07 Very Helpful! Ptcguy Ptcguy First Week Joined in the very first week of SmileBASIC Source Website Minecraft Is Awesome! I love Minecraft! Express Yourself Beginner Programmer I'm just starting out! I'm still trying to grasp the basics. Programming Strength Thanks! HitomiHoshino HitomiHoshino Thanks for this tutorial, helpful jamieyello jamieyello First Day Joined on the very first day of SmileBASIC Source Website Night Person I like the quiet night and sleep late. Express Yourself Drawing I like to draw! Hobbies To add to this you should DIM MAP[0] instead of DIM MAP[10000]. DIM MAP[10000] a waste of space and unnecessary, it makes the array size bigger automatically. Mariominer Mariominer First Day Joined on the very first day of SmileBASIC Source Website Promoted Page My page was promoted on SmileBASIC Source! Achievements Expert Programmer Programming no longer gives me any trouble. Come to me for help, if you like! Programming Strength Oh, I did not know that about this. I guess I'll change it then. Super_Defaultio Super_Defaultio Video Games I like to play video games! Hobbies Day Person I like the warm sunshine and wake up early! Express Yourself Zelda Is Awesome! I love The Legend Of Zelda! Express Yourself Seems legit. Thank you for what you typed in for the intro, I could just not get it too work.