PDA

View Full Version : Shoot Em Up - Tutorial


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

Schwalbach
05-15-2003, 08:40 PM
WOW! I didn't read all that, but I thank you for going through all that to make a tutorial on a game for us! Thanks man!

snowball1
05-15-2003, 08:48 PM
Cool! thanks for the compliment. I was afraid that nobody would be interested...

Let me know if you run into trouble when you try it.
Joe

grassmj
05-16-2003, 02:30 AM
Pretty darn sweet. This should go to the downloads section for sure. Great job!

-Mike

snowball1
05-16-2003, 02:32 PM
Thanks Mike, I'll go check out the downloads section. Can I just upload it there, or does it have to be approved or something?

joe

grassmj
05-16-2003, 04:59 PM
Nah, just post in the download section like you would any other forum. After it gets reviewed/approved by a Mod, it will be moved over to the downloads section.

-Mike

chazhud87
05-16-2003, 05:01 PM
wow snowball nice stuff, love the work, gonna have a go tonight gonna take ages but worth the practice.

chaz

snowball1
05-16-2003, 05:23 PM
cool chaz, give it a shot and let me know how it goes....
Joe

Hoosier_Daddy
05-17-2003, 01:19 AM
Here's one I did a long time ago in swish.

http://www.myswish.org/~jer/duckhunt.html

http://www.myswish.org/~jer/duckhunt.swi

I have this set so that you must shoot a specific number of ducks per level in order to proceed..................unfortunately, its been some time and I have forgotten what number that is. lol

~Jer~

tapper
05-17-2003, 06:19 AM
He. Thats quite a chunk of text! Ill go through this tonight and see if i can crack it. Thanks snowball1!

TheSJProject
05-19-2003, 06:33 PM
That's cool snowball..... I will have to re-read though...
One problem with your game: At the end you UNLOADED
the cursor from the movie didn't you? This happened to me too:
There is no cursor AT ALL anymore, lol. You should just keep it loaded in... :)

H_daddy.... your duck hunt game almost exactly matched the NES game! :)
Pretty cool. (My cousin still has his old NES.)
One problem though... SWI link was broken. Sorry :)

- Stephen

Hoosier_Daddy
05-19-2003, 08:13 PM
I had forgotten that duckhunt game awards the swi upon completion of 4 rounds or something like that. Its been a while since I made it.

Good luck :)

~Jer~

snowball1
05-19-2003, 08:55 PM
quite right Stephen, good call.
Joe

TheSJProject
05-24-2003, 07:05 PM
Oh thank you :) Im glad I could help. The only reason
I knew is because I had amde that mistake before :lol:

How did u make that many enemies appear? Did you
loop a sprite or did u make a new motion for everyone?

- Stephen :D

TheSJProject
05-24-2003, 07:06 PM
Oh, I just realized, You joined S-T on my birthday last year :D Pretty cool :lol:

:D - Stephen

snowball1
05-24-2003, 08:27 PM
Yep, I planned it that way...hehehe.

For the enemy sprites, I made a bunch of different ones and then one "control" sprite that tells them when to move.
Joe

Sergeman
06-08-2003, 02:04 AM
Hi Snowball :wave: :

Thank you for taking the time for doing this. It's very interesting. :)

I'll definately try to do it when I find some free time. ;)

Thanks for sharing.


SEEERGEMAN B)

snowball1
06-08-2003, 04:17 PM
thanks SEEERGEMAN. A lot of people here are interested in webdesign only, but I'm more into creating games... Once version 3 comes out, I bet we'll be able to create some really nice games... I can't wait!
Joe

=Maverick=
06-18-2003, 02:14 PM
mNice game! really fuh

iceman1
07-24-2003, 11:11 PM
Wow i like these games great job to you all keep it up.

~IcEMaN~

snowball1
07-24-2003, 11:19 PM
thanks iceman, I'm working on some new games right now. Once they're ready, I'll post them too.
snowball

iceman1
07-24-2003, 11:22 PM
I want to make a new version of pong with better graphic then the atri version of it but i dont know anything about makeing games lol if u want check out my frist game at link (http://www.angelfire.com/az3/osamasleepover/dressosama.html)

WiMPiE
07-25-2003, 02:56 AM
It's unavailable!

Try to get it online, so we can rate it! ;)

Greetzzz... WiMPiE

Obelus
07-25-2003, 08:45 AM
This tutorial is very useful. Thankyou for taking the tie write something so detailed and informative. I will try some of it out if I ever have time.

Obelus.

IL
07-25-2003, 11:54 AM
holy goodness, you sure put alot of work into this. really great job.

snowball1
07-25-2003, 03:04 PM
ahhhh....all my work has come back to me in kudos form...hehehe. Thanks guys.

Actually, I have another game that I've never shown here. It's called "Insane Clown School." I didn't want to post it when it was ready because it was finished right after one of those school shootings and I thought it would have been in pretty poor taste. Anyway, it might have been long enough by now...

check it out. (http://www.freewebs.com/snowball13/insaneclown/clown.html)

snowball

iceman1
07-25-2003, 07:18 PM
Wow snow ball great game tooke me a while to get the hang of it. Should make more levels to it. Like at the last room where it says "congradulations you killed all of the untalente...bla bla"
You should make a new scene to like the princeable office and make him like the boss.
But anyway great game
~IcEMaN~

=Maverick=
07-26-2003, 03:22 PM
Hey yeah that is a fun GAME hahaha i just suggest that you can run a bit faster and jump higher to :S its sooo slow

snowball1
07-26-2003, 09:37 PM
thanks for the tips/complments guys. Speeding it up shouldn't be much of a problem, I'll crank up the fps a little bit. I think the prinipal idea is good too.... I figure he'll move around a lot more than the other clowns and you'll have to hit him like 3-4 times before he croaks...
I'll post the update when it's ready.
snowball.

shirwan
08-20-2003, 03:57 AM
cool game man i really like it

shirwan
08-20-2003, 04:11 AM
it's a great game but can u make any more faster

rastaloco
12-24-2003, 08:42 PM
Please send me a copy or source code of the game shoot em up. Please. thnks! email me with these address rastaloco83@yahoo.com
THANKS..

subflare
12-25-2003, 02:39 AM
Man, you must of worked a long time on this.... Its cool


I'll try it tomorrow! :D



Johnny