Now lots have people have seen others make lots of SSB games. Though most had 1 thing in common. THEY WEREN'T 3D LIKE THE ACTUAL GAMES AND THEY DIDN'T ZOOM IN AND OUT! But now I can change all of that. Now I will teach all you scratchers worldwide including zawicki1fromyoutube, how to make a ssb game, thats 3d.
Part 1: Variables and Sprites
First we need to quickly create all the variables. Note that there are more in my actual version, thats because in the actual one I can choose the stage, have sensors, use shield, show a replay, and more which is not what I'm doing here. Heres all of what were using today and what they do:
-Battle Done?-When the game starts its set to 0(false), and the main movement scripts keep on working until its 1(true)
-P1 Damage-This keeps track of how much damage P1 has taken.
-P1 Jump Limit-This keeps track of how many jumps the player has done makes sure P1 doesn't make more than 2 jumps without touching the ground.
-P1 X Place-This isn't where P1 is on the screen (x position), this is where the player is in the entire "world"
-P1 Y Place-This isn't where P1 is on the screen (y position), this is where the player is in the entire "world"
-P1 X Velocity-This keeps track of how fast P1 is moving left and right.
-P1 Y Velocity-This keeps track of how fast P1 is moving up and down.
-P2 Damage-This keeps track of how much damage P2 (or CPU) has taken.
-P2 Jump Limit-This keeps track of how many jumps the player has done makes sure P1 doesn't make more than 2 jumps without touching the ground.
-P2 X Place-This isn't where P2 is on the screen (x position), this is where the player is in the entire "world"
-P2 Y Place-This isn't where P2 is on the screen (y position), this is where the player is in the entire "world"
-P2 X Velocity-This keeps track of how fast P2 is moving left and right.
-P2 Y Velocity-This keeps track of how fast P2 is moving up and down.
-Stage X Place-Even though the Stage doesn't "actually" move, it is required to make the 3d effect
-Stage Y Place-Even though the Stage doesn't "actually" move, it is required to make the 3d effect
And specifically for the Stage sprite we have these variables:
-Stage Size-The current variable that is used in the formula.
Also on the screen, the only variables that you want to show are P1 Damage and P2 Damage. And for the Sprites. You need P1 and P2, and the Stage (as a sprite because it will be changing size) and then you can start scripting!
Part 2: P1 and P2 (not CPU) Movement
Next we need to use the variables and create the actual movement and good jumping and more. So now we'll start off with this:
When Green Flag Clicked
Set [Battle done?] to (0)
Set [P1 X Velocity] to (0)
Set [P1 Y Velocity] to (0)
Set [P1 X Place] to (-180) <---All of this resets everything for a new equal and fair game
Set [P1 Y Place] to (100)
Set [P1 Jump Limit] to (0)
Set [P1 Damage] to (0)
So now we can make the actual movement such.
Repeat until <(Battle Done)=1>
-If <key [right arrow] pressed> and <[Abs] of (P1 X Velocity) < 13> <---If your pressing right and your not going to fast...
--change [P1 X Velocity] by 2 <---Go faster
--point direction (90) <---Turn right
-If <key [left arrow] pressed> and <[Abs] of (P1 X Velocity) < 13> <---If your pressing left and your not going to fast
--change [P1 X Velocity] by -2 <---Go faster
--point direction (-90) <---Turn left
-If <touching [stage (the sprite)]> and < P1 Y Velocity < (0.1) > <---If your on the ground your still or falling
--Set [P1 Jump Limit] to (0) <---Give the ability to jump
--Set [P1 Y Velocity] to (1) <---Stop Falling
--If <key [up arrow] pressed> <---If you press up
---change [P1 Y velocity] by (18) <---Quickly start to go up
---change [P1 Jump Limit] to <---Make it so you can only jump one more time unless you touch the ground
So with this, you will soon be able to move, but not yet, because you need to add a little bit more scripts:
-If < [abs] of [P1 X Position] > (700) or [abs] of [P1 Y Position] > (600) > <---If your out of bounds (about to die)
--Set [Battle done?] to 1 <---If you die you will end the battle.
-Change [P1 Y Velocity] by (-1) <---Gravity
Set [P1 X Velocity] to (P1 X Velocity]) X 0.85 <---This makes P1 slow down
Change [P1 X Place] by (P1 X Velocity) <---This makes P1 actually change its place
Change [P1 Y Place] by (P1 Y Velocity) <---This makes P1 actually change its place
Set X to ((P1 X Place) X ([size] of [Stage (sprite) / 100 ) + (Stage X Place) X ([size] of [Stage (sprite) / 100 )
Set Y to ((P1 Y Place) X ([size] of [Stage (sprite) / 100 ) + (Stage Y Place) X ([size] of [Stage (sprite) / 100 )
Set Size to ([size] of [Stage (Sprite)]
Now this, has completed the movement section. Also for P2 just copy this and just change the controls and variables a bit.
Part 3: Stage Movement and Effect
Finally we go to the stage sprite and enter this large script:
When Green Flag Clicked
Set [Size] to (80)
Set [Stage X] to (0)
Set [Stage Y] to (0)
Set [Battle done?] to (0)
Repeat until < (Battle done?) = 1 >
-Set Size to (Stage Size)
-Set X to (Stage X) X (Size / 100)
-Set Y to (Stage Y) X (Size / 100)
-Set Stage Size to 120 + -1 X [abs] of sqrt of P1 X Place - P2 X Place * P1 X Place - P2 X Place + P1 Y Place - P2 Y Place + Y Place - P2 Y Place X 0.2 + Distance to P1 + Distance to P2 / 20
Though I'm kinda tired, so um thats all I'm doing for now. (Boy this took like and hour to type...)
Last edited by Lucario621 (2008-12-19 12:20:50)
Offline
Thanks man!
Offline
zawicki1fromyoutube wrote:
Thanks man!
I'm still working on it!
Offline
Zooming != 3D
If you want 3D pick another language.
Also lucario, I think that your tutorial could be better. Try adding summaries of what the scripts do after you write out a script.
Offline
archmage wrote:
Zooming != 3D
If you want 3D pick another language.
Also lucario, I think that your tutorial could be better. Try adding summaries of what the scripts do after you write out a script.
Well I just kinda got tired and after getting near the end I stopped....you know what I mean?
Offline
Lucario621 wrote:
archmage wrote:
Zooming != 3D
If you want 3D pick another language.
Also lucario, I think that your tutorial could be better. Try adding summaries of what the scripts do after you write out a script.Well I just kinda got tired and after getting near the end I stopped....you know what I mean?
You could always continue later.
Offline
archmage wrote:
Lucario621 wrote:
archmage wrote:
Zooming != 3D
If you want 3D pick another language.
Also lucario, I think that your tutorial could be better. Try adding summaries of what the scripts do after you write out a script.Well I just kinda got tired and after getting near the end I stopped....you know what I mean?
You could always continue later.
![]()
I...I don't feel like it
Last edited by Lucario621 (2008-12-20 10:32:05)
Offline