トピック
Caesar Caesar267

How to animate in Smile Basic.

Hello, everyone! I was looking for some help with learning how to animate sprites a couple days ago, but I didn't find anything. I also noticed that there were some other people looking for the same thing. I finally understand the basics of sprite animation. So, I thought I'd write this post to share what I've learned. (Out of space. Continued in post 2)
8そうだね
プレイ済み
返信[1]
親投稿
Caesar Caesar267
Post 2 Before I go into a short step-by-step explanation of how this works and talk about some stuff that helped me learn, I wanted to let you all know I made an example program that will hopefully help you start animating some stuff of your own. (Continued)
2そうだね
プレイ済み
返信[2]
親投稿
neto ivonnesb87
please share how to move sprits, i will be expecting the post 2
0そうだね
プレイ済み
返信[3]
親投稿
neto ivonnesb87
now post 3,... jeje
0そうだね
プレイ済み
返信[4]
親投稿
Caesar Caesar267
The program is an animation of a cat walking across the top screen and falling asleep. Here is the public key to download it: 4R33DX9D. If you download it and go to edit mode, you will see how I wrote this program and some explanatory comments I wrote as well. I hope this helps some of you! For those interested in the other things I mentioned that I wanted to write please see the next posts
2そうだね
プレイ済み
返信[5]
親投稿
Caesar Caesar267
Here is (at least the beginning) of my step-by-step explanation. 1. Prepare your sprite with the Spanim command. (example: SPANIM 0, 560) 2. Set up a data array. (If any of you are like me when I first read this, you might think, "What is a data array?" I don't know everything about arrays, but here is what I do know.. A data array is like a variable that can store more than one variable.(cont)
1そうだね
プレイ済み
返信[6]
親投稿
neto ivonnesb87
thankyou so much, is very pretty animation, this will help me to learn a little more .
1そうだね
プレイ済み
返信[7]
親投稿
Caesar Caesar267
(Continued from step 2) You could also think of a data array like a schedule. You start by writing DIM (put a name here) and then put how many elements you have in it in brackets. (Like you might add a title to a schedule and how many things you need to do.) Now you're ready to put in your information. (The information you put in will be different depending on what your animating XY, Z, etc.
1そうだね
プレイ済み
返信[8]
親投稿
Caesar Caesar267
So here is what it should look like right now: DIM ANIM[2] (ANIM and the number of elements can be changed, but you need the DIM command.) Now you can add elements. You need to start with how fast/slow you want the animation to go. This is determined by frames. For some reason you need to put the number of frames as a negative number. (Sorry. Still pretty new to this so I don't know)
1そうだね
プレイ済み
返信[9]
親投稿
Caesar Caesar267
So here is how we put the first part of the array: ANIM[0] -60 According to an example I read -60 is a smooth frame rate. Really depends on how fast you want your animation to go. Now we can set up the next part (the data/effect we want to animate) ANIM[1] 590 The example I'm writing here is for changing the sprites image. For other things such as X, Y, and Z coordinates, it'll be different.
1そうだね
プレイ済み
返信[10]
親投稿
Caesar Caesar267
Super sorry! I just realized I forgot to add a really important detail about arrays. When you are inputting frame and effect data, always remember to put an equals sign before the info. Example (Sorry can't write equals signs): DIM ANIM[2] ANIM[0] (equals) -60 ANIM[1] (equals) 560 The general rule that I learned about arrays when used in animation is "Time, effect, time, effect...etc."
1そうだね
プレイ済み
返信[11]
親投稿
Caesar Caesar267
In this section, I'll tell you about animation targets. Animation targets determine what the information in your data array will do. (Try switching animation targets for some pretty interesting results!) There are 7 animation targets. (Animation Targets are put after the management number of the sprite in the SPANIM command) (Write either input the numbers or text strings for the anima-target.)
1そうだね
プレイ済み
返信[12]
親投稿
Caesar Caesar267
(Actually 8 animation targets) 1. Input 0 or "XY" (with quote marks" to control the X and Y coordinates) Yor array should have time, Destination point X, and Destination point Y in your array in that order. 2. Input 1 or "Z" to control animation with 3D depth. You need time and the destination point Z coordinate in your array 3. Input 2 or "UV" to change the sprite source image.
1そうだね
プレイ済み
返信[13]
親投稿
Caesar Caesar267
(Don't know how number 3 works) 4. Input 3 or "I" to change the sprites image. (Like to animate walking) You need time and then just the first picture you want to start with in you array. This animation target uses the image you chose and the the 2 images after that during animation" 5. Input 4 or "R" for the rotation angle. I haven't used this much. When in doubt, experiment!
1そうだね
プレイ済み
返信[14]
親投稿
Caesar Caesar267
6. Input 5 or "S" to magnify sprite. You will need time, magnification X, and magnification Y in your array. 7. Input 6 or "C" to change the entire sprites color. (Haven't used. Don't know) 8. Input 7 or "V" to change the sprites internal variable. (I don't know what that means) There is more in the help section or list of commands about this. (Get to that later)
1そうだね
プレイ済み
返信[15]
親投稿
Caesar Caesar267
Congratulations! After one really long explanation, I've told you all I know about this! I highly recommend going to the smileBASIC website and downloading the list of commands that you can use in SmileBASIC. As far as I know, you can find this all in the app, but they have the commands grouped together in topic-related sections. This helped me by reading and trying their examples.
1そうだね
プレイ済み
返信[16]
親投稿
Caesar Caesar267
Please help me out by helping me fill in the information I missed. That would really help! Here is an example Animation Program to wrap this up: SPSET 0, 259 DIM ANIM[2] ANIM[0] -60 ANIM[1] 259 SPANIM 0, "I" , ANIM, (Put a number here for how many repeats/loops you want (1,2,3..etc.) (Inputting a 0 is an infinite loop, while not putting anything there means no loops.) Thanks again! Bye!
2そうだね
プレイ済み
返信[17]
親投稿
Jaxon SuperJax
Just a suggestion, but you could have placed the information in your code as comments. That way, those who download your project can see your explanation in the context of your code.
0そうだね
プレイ済み
返信[18]
親投稿
Caesar Caesar267
Thanks, Jaxon. I'll take a look at that. I'll publish the revised program when I can. Two questions for anyone: 1. How do you take screenshots (for example a line of code)? 2. How do you post screenshots?
0そうだね
プレイ済み
返信[19]
親投稿
Caesar Caesar267
Just wanted to confirm, Jackson, You write comments by first inputting an apostrophe, right? Thanks again.
0そうだね
プレイ済み
返信[20]
親投稿
Caesar Caesar267
Sorry! Misspelled your name by accident, Jaxon.
0そうだね
プレイ済み
返信[21]
親投稿
Jaxon SuperJax
Yep. It'll turn the rest of the line green. (That's if you didn't change the comment color in the settings.) GL, Have Fun, and keep learning!
0そうだね
プレイ済み
返信[22]
親投稿
Caesar Caesar267
Thanks again! Have fun learning to you too!
0そうだね
プレイ済み
返信[23]
親投稿
ςÇĞΨLapiz LapizLuzaOre200
im new to smileBASIC so u look smart can u tell me if you can tell me how to make a game
0そうだね
プレイ済み
返信[24]
親投稿
Caesar Caesar267
Hi, Lapiz! I hope you don't mind if I don't write your whole name. (I don't want to get it wrong.) So, like you, I'm still pretty new to smileBASIC. (Only had it for 1-2 weeks.) (cont.)
0そうだね
プレイ済み
返信[25]
親投稿
Caesar Caesar267
(cont. from before) But I'd be hapy to share what I know. I'll be posting new stuff as I learn it, but here are a few other options: 1. I recommend reading pretty much everything on the smileBASIC website. 2. A guy who commented on my post, named Jaxon, is working on a Tetris game. He might be able to help. 3. Here is a link to the first lesson of a video series on how to program in SmileBASIC
0そうだね
プレイ済み
返信[26]
親投稿
Caesar Caesar267
Link: http://m.youtube.com/watch?v=C9kwwUlycRY (Googling SmileBASIC and then looking for SmileBASIC lessons might be easier.) I hope this helps you on your way to your first game! Looking forward to when I get there myself!
1そうだね
プレイ済み
返信[27]
親投稿
nafin SKINNY-LIP
thank much
0そうだね
プレイ済み
返信[28]
親投稿
Caesar Caesar267
Your welcome, Naffin! Glad it helped!
1そうだね
プレイ済み
返信[29]
親投稿
7welve pikapikachu9147
I might get this, but 1 question: can you scan/make QR codes containing game data?
0そうだね
未プレイ
返信[30]
親投稿
Caesar Caesar267
From what I've heard, you can't make QR codes. What you can do is upload your program to the cloud and then publish it. You will then get a public key (a string with a total of 8 numbers and letters). SmileBOOM got rid of the QR codes because it's easier to prevent copyright infringement with the new system. Hope this helps!
1そうだね
プレイ済み
返信[31]
親投稿
Caesar Caesar267
Forgot to mention that there is a section in SmileBASIC where people input the public key in order to download this.
1そうだね
プレイ済み
返信[32]
親投稿
7welve pikapikachu9147
Close Enough! *saves up $20 for a prepaid card 'cause tax*
0そうだね
未プレイ
返信[33]
親投稿
Caesar Caesar267
Sorry! By "this" I mean a published program.
0そうだね
プレイ済み
返信[34]
親投稿
7welve pikapikachu9147
meh, small mistake ^_^
0そうだね
未プレイ
返信[35]
親投稿
Caesar Caesar267
Well then (once you get it), welcome to the SmileBASIC community! If you ever need help, there are a ton of really smart people willing to help you out. To get you started, I'd recommend looking at some of the resources I put in this discussion. They're probably in the older comments by now. Finally, quick tip: if you are just starting programming, be patient. It can be frustrating at first,(cont.
1そうだね
プレイ済み
返信[36]
親投稿
Caesar Caesar267
(cont.) (I've been there), but it gets better quickly! Good luck and happy programming!
1そうだね
プレイ済み
返信[37]
親投稿
7welve pikapikachu9147
Thanks! sounds like learning block.ly but less straightforward ^_^
0そうだね
未プレイ
返信[38]
親投稿
Caesar Caesar267
Hi, everyone! Just wanted to let you know that I'm going to close this discussion now.
2そうだね
プレイ済み