LoginLogin
Nintendo shutting down 3DS + Wii U online services, see our post

Create maps using data. Help!!!

Root / Programming Questions / [.]

the_squat1115Created:
So, I was searching around here, in SBS. But I just found very complex forms to make DATA-based maps, using the option that I don't like. The OPTION STRICT. If someone has a simplified version, give it to me. Thanks!

My original responseCan you show which page you found this on? I don’t have much experience with these “data maps,” so I’ll just explain OPTION STRICT and why there’s not very much to dislike about it. I don’t believe OPTION STRICT is necessary for “DATA Maps”. You understand that variables are just pieces of data stored under a specific name, correct? Well, in computers, that data can be stored as a certain type of data. In SB specifically, there are three types of data you can store in a variable: Integer (%), String ($), and Float (#). Integers are any whole number, such as 0, -5, and 37. Strings are just characters of text. Floats are basically any number that ends in a decimal, such as 0.17 and -5.9. There are a few other data types that you can use in other programming languages, but those are really just modified versions of these three to help with memory usage, so you needn’t worry about those. So I’ve been typing this for a few minutes now, and I just realized that OPTION STRICT doesn’t actually require you to give the data type for your variables... nevertheless, I’ll assume you saw $,#,% at the end of some variables and got confused because of them, meaning this wasn’t a waste of my time! OPTION STRICT really just requires you to declare all variables before using them. Usually people will have a section at the top of their code where they declare all of their variables, and you can put them into a certain data type simply by putting a $,%, or # after the name. Now, i have no idea whether this makes sense anymore, as I’ve been typing and revising this for a good 15 minutes, so just—just go with the flow.
Ken’s better responseYou don't need to use OPTION STRICT." imagine how much cleaner that would be

You don't need to use OPTION STRICT.
W=5 'width of map DATA
H=3 'height of map DATA
DIM MAP[W*H] 'first, we make an array
COPY MAP,@MAPDATA 'put DATA into array
BGLOAD 0,0,0,W,H,MAP 'put array into BG
@MAPDATA
'map DATA: each tile has an ID; use smiletool
DATA 08,08,08,08,08
DATA 08,75,69,78,08
DATA 08,08,08,08,08
'i put zeroes before the 8s so everything would line up

I found it on: how do I create maps using data? Srry for mistyping

Also, I had already done it

Srry

Or u can halp me and know more about it

What's wrong with option strict? Sure, it's annoying, but incredibly useful if you make typos. On SB it is really easy to make typos because it is on a touch-screen keyboard.

What's wrong with option strict? Sure, it's annoying, but incredibly useful if you make typos. On SB it is really easy to make typos because it is on a touch-screen keyboard.
I will prefer the option defint. Also, I have the data map already but I need help with Collision Detection and Movement.

What's wrong with option strict? Sure, it's annoying, but incredibly useful if you make typos. On SB it is really easy to make typos because it is on a touch-screen keyboard.
I will prefer the option defint. Also, I have the data map already but I need help with Collision Detection and Movement.
Option defint just makes the default variable type integer. You can do both btw.

What's wrong with option strict? Sure, it's annoying, but incredibly useful if you make typos. On SB it is really easy to make typos because it is on a touch-screen keyboard.
I will prefer the option defint. Also, I have the data map already but I need help with Collision Detection and Movement.
Option defint just makes the default variable type integer. You can do both btw.
Or idk... I just said the wrong one? Was the one that has no OPTION I-don't-know? Oh. Just confused.