プレイ日記
Aaron Krondelo
Can someone PLEASE teach me how to efficiently use DATA. I'm most interested in using data for the level layout like I've seen a lot. However, also curious what else I can do with it. Like 12me21 used it in Tetris for the various part rotations. Please be specific and use examples!
0そうだね
プレイ済み
返信[1]
親投稿
Bobert fluffy8959
That's quite the demand… Here's a simple example that I use DATA most often, arrays. RESTORE @LABEL is label that READ will use to get the data. Sometimes I want my array to have different values at different indexes. Rather then typing ARRAY[0]=5 then ARRAY[1]=362, etc, I can use data to easily use data. Let me hop on my 3DS and show you an example
1そうだね
プレイ済み
返信[2]
親投稿
Bobert fluffy8959
*to easily use less time
0そうだね
プレイ済み
返信[3]
親投稿
Bobert fluffy8959
I hope this helps, maybe someone can explain it better
1そうだね
プレイ済み
返信[4]
親投稿
Aaron Krondelo
Thanks Bobert. I would still like to know how one uses it for maps but this is the stepping stone I needed. Oh and in your example it's 0 to 3. ;) I'm sure you knew that though! TY
0そうだね
プレイ済み
返信[5]
親投稿
Aaron Krondelo
Yep, so if you try this now you'll see what I meant/wanted. Based on that simple rule-set you can write any data pattern you want and instantly change the layout! Very cool, I still need to tinker further. Thanks!
0そうだね
プレイ済み
返信[6]
親投稿
Bobert fluffy8959
Nice I’m glad, you have the idea down! I’m not familiar with 12me21’s Tetris game but DATA can be very useful.
1そうだね
プレイ済み
返信[7]
親投稿
Nicole moesaku
A shorter way than using RESTORE and looping is to do this: DIM MYARRAY[4] COPY MYARRAY,@MYDATA @MYDATA DATA 5,362,556,1
1そうだね
プレイ済み