snowball1
05-15-2003, 03:21 PM
I was asked how to make a shoot em up game in Swish. Here is my reply. If you have a chance, take a look and let me know if you find any errors in the steps below or the game.
See game here (http://www.freewebs.com/snowball13/shootemup/index.html).
(1) Listing of all necessary items for game:
Components:
Wall
Floor
Door
Barrel 1
Barrel 2
Barrel 3
Barrel 4
Badguy1
Badguy2
Badguy3
Badguy4
Badguy5
Badguy6
Badguy7
Badguy8
Badguy9
Badguy10
Badguy11
Badguy12
Screens:
Loader
Splash
Start Game
Game Over
You Win
Sprites:
Time
Score
Misses
Load Plug-in
Cursor
Randombadguys
You Win
Game Over
Splash
(2) Create all of the components:
(a) create the following components:
Wall - a button
Floor - a button
Door - a shape (rectangle with no fill)
Barrel(s) - button
Badguy(s) - button inside of a sprite. (group drawing of badguy, convert group to button, group button as sprite)
(b) put components in proper place
© resize as necessary
picture (http://www.freewebs.com/snowball13/shootemup/3a.html)
(3) Set up screens:
(a) On frame 0 of main timeline - label 'spash', stop action
(b) On frame 5 of main timeline - label 'start game', stop action
© On frame 10 of main timeline - label 'game over', stop action
(d) On frame 15 of main timeline - label 'you win', stop action
(4) Create misses sprite:
(a) Insert the numbers 0-9 on the screen, all on top of each other. (same x-position and same y-position)
(b) Group as sprite, named 'ones'
© Inside 'ones', Place (place effect) the number 0 on frame 0, 1 on frame 1, ...... 9 on frame 9. Remove (remove effect) 0 on frame 1, 1 on frame 2 ..... 9 on frame 10.
(d) Copy/Paste 'ones', name copy 'tens'
(e) Insert the word 'misses' on the main screen
(f) Group 'ones' 'tens' and 'misses' as a sprite called 'misses'
(g) On frame 1 of 'misses', put a stop action
(h) On frame 5 of 'misses', label 'reset', tell target 'tens' go to 0 and stop, tell target 'ones' go to 0 and stop
(i) On frame 10 of 'misses', go to and stop frame 0
(j) Inside of 'ones' sprite, frame 10 - tell target 'tens' go to next frame and stop. Under that, add the action go to and stop frame 0
(k) Inside of 'tens' sprite, frame 2 - tell target '/' go to label 'game over' and stop
(5) Create score sprite:
(a) Copy/Paste 'misses', name copy 'score'
(b) Inside of 'score' change name of 'ones' to 'hundreds'
© Inside of 'score' change name of 'tens' to 'thousands'
(d) On the frame 5 actions of 'score', change 'ones' and 'tens' to 'hundreds' and 'thousands'
(e) Inside of 'score', change word 'misses' to 'score'
(f) Insert '0' and '0' inside of sprite, move them to the right of hundreds
(g) Inside of 'tens' - delete actions on frame 2
(h) Inside of 'tens' - frame 10, tell target '/' to to label 'you win' and stop
(6) Create time sprite:
(a) Copy/Paste 'misses', name copy 'Time'
(b) Inside of 'Time', rename 'ones' and 'tens' to 'sec' and 'ten'
© Insert a sprite (inside of 'Time') Name it 'movetime'
(d) At frame 26 of 'movetime' - tell target '../sec' go to next frame and stop*
* assumes your movie speed is 26fps, alter accordingly
(e) At frame 27 of 'movetime' - go to and play frame 0
(f) Inside of 'Time' frame 5 - change 'ones' and 'tens' to 'sec' and 'ten'
(g) Inside of 'Time' frame 5 - add action, tell target 'movetime' go to and play 0
(h) Change word 'misses' to 'Time'
(7) Create randombadguys sprite:
(a) From main timeline, insert a sprite. Name the sprite 'randombadguys'
(b) In frame 0 of 'randombadguys', tell target '/badguy(x)' go to frame labeled 'go' and play
© (x) in part (b) above is a random number between 1 - 12 (pick the number yourself, try to be random)
(d) Repeat part (b) for frames 1 - 39 of 'randombadguys'
(e) On frame 40 of 'randombadguys', ---> go to frame 0 and stop
(8) Movement of badguy sprite:
(a) open a 'badguy' sprite (doesn't matter which)
(b) At frame one of 'badguy' sprite, add stop action
© At frame 5 - label 'go'
(d) At frame 11 - move action, (9 frames long, y position up by 100)*
* These numbers may be adjusted when game is tested
(e) At frame 30 - move action, (9 frames long, y position down by 100)
(f) At frame 39 - remove (remove action) the 'badguy' button. In timeline of frame 39, tell target 'randombadguys' - go to next frame and stop
(g) At frame 40 - go to frame 0 and stop
(9) More movements of badguys:
(a) Add the same actions to the other 'badguys', Only add these actions to one of the two badguys in front of each barrel.
(b) To recap, the actions listed in #6 above are included in the badguy under the door, both of the badguys under the floor, and one of the two badguys in front of the barrels.
© There should be 4 badguys left with no actions attached to them
(d) Alter the length of the 'move' action and change in y-position to appropriate levels. (see #6 part d)
(10) More movements of badguys:
(a) Open one of the remaining 'badguys' that doesn't have an action
(b) At frame 1 of that sprite, add a stop action
© At frame 5, add a label 'go'
(d) At frame 12, add a move action (21 frames long, x-position left by 530)*
* These will be different for each of the remaining badguys. If you're badguy is on the right side to begin with, move him left. Otherwise, move him right. The change in the x-position should be just enough to move him from behind one barrel to behind the barrel on the opposite side. Make your best guess, you'll be able to alter it later.
(e) At frame 33, remove the button (remove action)
(f) At frame 33, (in the 'badguy' timeline) tell target '/randombadguys' go to next frame and stop
(g) At frame 34, go to frame 0 and stop
(h) Add the same action (a-g) to the remaining 3 'badguys'
(11) Game Over Sprite:
(a) In the main timeline, draw a white rectangle with the same width and height as the main movie. Name it 'background'
(b) In the main timeline, insert text 'game over'
© In the main timeline, insert text 'play again'
(d) Convert 'play again' to a button
(e) Add the following actions to the play again button:
(1) tell target '/misses' go to label 'reset' and play
(2) tell target '/randombadguys' go to frame 5* and stop
* can be any number, this just helps give the illusion of randomness
(3) tell target '/time' go to label 'reset' and play
(4) tell target '/score' go to label 'reset' and play
(5) tell target '/' go to frame 'start game' and stop
(f) Group 'background', the 'play again' button and 'game over' text as a sprite, name it 'game over'
(g) In the main timeline, add a place effect for 'game over' on frame 10
(12) You Win Sprite:
(a) In the main timeline, draw a white rectangle with the same width and height as the main movie. Name it 'background'
(b) In the main timeline, insert text 'You Win' (black, large font)
© In the main timeline, insert text 'you beat all of the bad guys' (red, medium font)
(d) Copy the 'play again' button from the 'game over' sprite, paste it in the main timeline
(e) Group 'background', 'play again', 'You Win', and 'you beat all....' as a sprite, name it 'you win'
(f) In the main timeline, add a place effect for 'you win' on frame 15
(13) Splash Sprite:
(a) In the main timeline, draw a white rectangle with the same width and height as the main movie. Name it 'background'
(b) In the main timeline, insert text 'Shoot Em Up'
© In the main timeline, insert text (instructions for the game)*
* I'll let you write your own instructions
(d) In the main timeline, insert text 'start'
(e) Convert 'start' to a button
(f) Add the action... tell target '/' go to label 'start game' and stop... to the 'start' button
(g) Group 'background', 'start', 'Shoot Em Up', and (instructions) as a sprite, name it 'splash'
(h) In the main timeline, add a place effect for 'splash' on frame 0
(14) Cursor Sprite / Load myPlug-in Sprite:
(a) Download the custom cursor plugin from Swish-Tutorials.com download section
(b) Open the .swi file and copy the sprites 'Cursor' and 'Load myPlug-in'
© Go back to your .swi file, paste 'Cursor' and 'Load myPlug-in' into the main timeline
(d) Make sure the file 'cursorPlugin.swf' (comes with download) is in the same directory as your .swi file
(e) Open 'Cursor' sprite, draw a gun sight.
(f) Erase the other shape in the 'Cursor' sprite
(15) Add actions to buttons:
(a) Add the following actions to the four 'barrel' buttons
(1) tell target 'misses/ones' go to next frame and stop
(b) Add the following action to the 'floor' button
(1) tell target 'misses/ones' go to next frame and stop
© Add the following action to the 'wall' button
(1) tell target 'misses/ones' go to next frame and stop
(16) Edit main timeline places/removes:
(a) Add a remove effect for 'splash' on frame 5 (main timeline)
(b) Add a place effect for 'Load myPlug-in' on frame 5
© Add a place effect for 'time' on frame 5
(d) Add a place effect for 'randombadguys' on frame 5
(e) Add a remove effect for 'randombadguys' on frame 10
(f) Add a place effect for 'game over' on frame 10
(g) Add a remove effect for 'game over' on frame 15
(h) Add a place effect for 'misses' on frame 5
(i) Add a place effect for 'score' on frame 5
(j) Add a place effect for each of the 'badguy' sprites on frame 5
(k) Add a remove effect for each of the 'badguy' sprites on frame 10
(l) Add a place effect for the 'barrel' buttons, the 'wall' button, and the 'floor' button on frame 5
(m) Add a remove effect for the 'barrel' buttons, the 'wall' button, and the 'floor' button on frame 10
Done. Export your files and play.
If you want to make you game a little better, add a splash of sound. I found the sound of a gunshot and added it to all of the buttons on my game.
Good Luck, Joe
See game here (http://www.freewebs.com/snowball13/shootemup/index.html).
(1) Listing of all necessary items for game:
Components:
Wall
Floor
Door
Barrel 1
Barrel 2
Barrel 3
Barrel 4
Badguy1
Badguy2
Badguy3
Badguy4
Badguy5
Badguy6
Badguy7
Badguy8
Badguy9
Badguy10
Badguy11
Badguy12
Screens:
Loader
Splash
Start Game
Game Over
You Win
Sprites:
Time
Score
Misses
Load Plug-in
Cursor
Randombadguys
You Win
Game Over
Splash
(2) Create all of the components:
(a) create the following components:
Wall - a button
Floor - a button
Door - a shape (rectangle with no fill)
Barrel(s) - button
Badguy(s) - button inside of a sprite. (group drawing of badguy, convert group to button, group button as sprite)
(b) put components in proper place
© resize as necessary
picture (http://www.freewebs.com/snowball13/shootemup/3a.html)
(3) Set up screens:
(a) On frame 0 of main timeline - label 'spash', stop action
(b) On frame 5 of main timeline - label 'start game', stop action
© On frame 10 of main timeline - label 'game over', stop action
(d) On frame 15 of main timeline - label 'you win', stop action
(4) Create misses sprite:
(a) Insert the numbers 0-9 on the screen, all on top of each other. (same x-position and same y-position)
(b) Group as sprite, named 'ones'
© Inside 'ones', Place (place effect) the number 0 on frame 0, 1 on frame 1, ...... 9 on frame 9. Remove (remove effect) 0 on frame 1, 1 on frame 2 ..... 9 on frame 10.
(d) Copy/Paste 'ones', name copy 'tens'
(e) Insert the word 'misses' on the main screen
(f) Group 'ones' 'tens' and 'misses' as a sprite called 'misses'
(g) On frame 1 of 'misses', put a stop action
(h) On frame 5 of 'misses', label 'reset', tell target 'tens' go to 0 and stop, tell target 'ones' go to 0 and stop
(i) On frame 10 of 'misses', go to and stop frame 0
(j) Inside of 'ones' sprite, frame 10 - tell target 'tens' go to next frame and stop. Under that, add the action go to and stop frame 0
(k) Inside of 'tens' sprite, frame 2 - tell target '/' go to label 'game over' and stop
(5) Create score sprite:
(a) Copy/Paste 'misses', name copy 'score'
(b) Inside of 'score' change name of 'ones' to 'hundreds'
© Inside of 'score' change name of 'tens' to 'thousands'
(d) On the frame 5 actions of 'score', change 'ones' and 'tens' to 'hundreds' and 'thousands'
(e) Inside of 'score', change word 'misses' to 'score'
(f) Insert '0' and '0' inside of sprite, move them to the right of hundreds
(g) Inside of 'tens' - delete actions on frame 2
(h) Inside of 'tens' - frame 10, tell target '/' to to label 'you win' and stop
(6) Create time sprite:
(a) Copy/Paste 'misses', name copy 'Time'
(b) Inside of 'Time', rename 'ones' and 'tens' to 'sec' and 'ten'
© Insert a sprite (inside of 'Time') Name it 'movetime'
(d) At frame 26 of 'movetime' - tell target '../sec' go to next frame and stop*
* assumes your movie speed is 26fps, alter accordingly
(e) At frame 27 of 'movetime' - go to and play frame 0
(f) Inside of 'Time' frame 5 - change 'ones' and 'tens' to 'sec' and 'ten'
(g) Inside of 'Time' frame 5 - add action, tell target 'movetime' go to and play 0
(h) Change word 'misses' to 'Time'
(7) Create randombadguys sprite:
(a) From main timeline, insert a sprite. Name the sprite 'randombadguys'
(b) In frame 0 of 'randombadguys', tell target '/badguy(x)' go to frame labeled 'go' and play
© (x) in part (b) above is a random number between 1 - 12 (pick the number yourself, try to be random)
(d) Repeat part (b) for frames 1 - 39 of 'randombadguys'
(e) On frame 40 of 'randombadguys', ---> go to frame 0 and stop
(8) Movement of badguy sprite:
(a) open a 'badguy' sprite (doesn't matter which)
(b) At frame one of 'badguy' sprite, add stop action
© At frame 5 - label 'go'
(d) At frame 11 - move action, (9 frames long, y position up by 100)*
* These numbers may be adjusted when game is tested
(e) At frame 30 - move action, (9 frames long, y position down by 100)
(f) At frame 39 - remove (remove action) the 'badguy' button. In timeline of frame 39, tell target 'randombadguys' - go to next frame and stop
(g) At frame 40 - go to frame 0 and stop
(9) More movements of badguys:
(a) Add the same actions to the other 'badguys', Only add these actions to one of the two badguys in front of each barrel.
(b) To recap, the actions listed in #6 above are included in the badguy under the door, both of the badguys under the floor, and one of the two badguys in front of the barrels.
© There should be 4 badguys left with no actions attached to them
(d) Alter the length of the 'move' action and change in y-position to appropriate levels. (see #6 part d)
(10) More movements of badguys:
(a) Open one of the remaining 'badguys' that doesn't have an action
(b) At frame 1 of that sprite, add a stop action
© At frame 5, add a label 'go'
(d) At frame 12, add a move action (21 frames long, x-position left by 530)*
* These will be different for each of the remaining badguys. If you're badguy is on the right side to begin with, move him left. Otherwise, move him right. The change in the x-position should be just enough to move him from behind one barrel to behind the barrel on the opposite side. Make your best guess, you'll be able to alter it later.
(e) At frame 33, remove the button (remove action)
(f) At frame 33, (in the 'badguy' timeline) tell target '/randombadguys' go to next frame and stop
(g) At frame 34, go to frame 0 and stop
(h) Add the same action (a-g) to the remaining 3 'badguys'
(11) Game Over Sprite:
(a) In the main timeline, draw a white rectangle with the same width and height as the main movie. Name it 'background'
(b) In the main timeline, insert text 'game over'
© In the main timeline, insert text 'play again'
(d) Convert 'play again' to a button
(e) Add the following actions to the play again button:
(1) tell target '/misses' go to label 'reset' and play
(2) tell target '/randombadguys' go to frame 5* and stop
* can be any number, this just helps give the illusion of randomness
(3) tell target '/time' go to label 'reset' and play
(4) tell target '/score' go to label 'reset' and play
(5) tell target '/' go to frame 'start game' and stop
(f) Group 'background', the 'play again' button and 'game over' text as a sprite, name it 'game over'
(g) In the main timeline, add a place effect for 'game over' on frame 10
(12) You Win Sprite:
(a) In the main timeline, draw a white rectangle with the same width and height as the main movie. Name it 'background'
(b) In the main timeline, insert text 'You Win' (black, large font)
© In the main timeline, insert text 'you beat all of the bad guys' (red, medium font)
(d) Copy the 'play again' button from the 'game over' sprite, paste it in the main timeline
(e) Group 'background', 'play again', 'You Win', and 'you beat all....' as a sprite, name it 'you win'
(f) In the main timeline, add a place effect for 'you win' on frame 15
(13) Splash Sprite:
(a) In the main timeline, draw a white rectangle with the same width and height as the main movie. Name it 'background'
(b) In the main timeline, insert text 'Shoot Em Up'
© In the main timeline, insert text (instructions for the game)*
* I'll let you write your own instructions
(d) In the main timeline, insert text 'start'
(e) Convert 'start' to a button
(f) Add the action... tell target '/' go to label 'start game' and stop... to the 'start' button
(g) Group 'background', 'start', 'Shoot Em Up', and (instructions) as a sprite, name it 'splash'
(h) In the main timeline, add a place effect for 'splash' on frame 0
(14) Cursor Sprite / Load myPlug-in Sprite:
(a) Download the custom cursor plugin from Swish-Tutorials.com download section
(b) Open the .swi file and copy the sprites 'Cursor' and 'Load myPlug-in'
© Go back to your .swi file, paste 'Cursor' and 'Load myPlug-in' into the main timeline
(d) Make sure the file 'cursorPlugin.swf' (comes with download) is in the same directory as your .swi file
(e) Open 'Cursor' sprite, draw a gun sight.
(f) Erase the other shape in the 'Cursor' sprite
(15) Add actions to buttons:
(a) Add the following actions to the four 'barrel' buttons
(1) tell target 'misses/ones' go to next frame and stop
(b) Add the following action to the 'floor' button
(1) tell target 'misses/ones' go to next frame and stop
© Add the following action to the 'wall' button
(1) tell target 'misses/ones' go to next frame and stop
(16) Edit main timeline places/removes:
(a) Add a remove effect for 'splash' on frame 5 (main timeline)
(b) Add a place effect for 'Load myPlug-in' on frame 5
© Add a place effect for 'time' on frame 5
(d) Add a place effect for 'randombadguys' on frame 5
(e) Add a remove effect for 'randombadguys' on frame 10
(f) Add a place effect for 'game over' on frame 10
(g) Add a remove effect for 'game over' on frame 15
(h) Add a place effect for 'misses' on frame 5
(i) Add a place effect for 'score' on frame 5
(j) Add a place effect for each of the 'badguy' sprites on frame 5
(k) Add a remove effect for each of the 'badguy' sprites on frame 10
(l) Add a place effect for the 'barrel' buttons, the 'wall' button, and the 'floor' button on frame 5
(m) Add a remove effect for the 'barrel' buttons, the 'wall' button, and the 'floor' button on frame 10
Done. Export your files and play.
If you want to make you game a little better, add a splash of sound. I found the sound of a gunshot and added it to all of the buttons on my game.
Good Luck, Joe