Instructions For Starting Your Top Down Arcade Game
First of all, open a new 2D project in Zero, name it firstnamelastnametopdownarcade (using your own first name and last name).
Now create all of the levels that you will need:
Press Space, then type add, then level then name the following levels:
If you name your levels differently than this, you will need to update your scripts to ensure that they reflect the new names.
Next, import the following scripts found below:
Following this, it is time to start creating game objects. On Level1, create one sprite, call it Player and add the following components to it:
Make it an archetype.
Next create another sprite, call it Enemy and add the following components to it:
Make it an archetype.
Next create another sprite, call it PlayerBullet, change size to 0.2, 0.2 and add the following components to it:
Make it an archetype.
Next create another sprite, call it EnemyBullet make it the same size as the PlayerBullet and add the following components to it:
Make it an archetype.
Penultimately, make a series of sprites of different sizes, for example: 1 x 1, 1 x 3, 1 x 5, 1 x 10, 1 x 15, 1 x 20. Give them the following components:
Make each an archetype and name them wall1, wall3, wall5 etc. You can now drag out whatever wall sizes you need to your game surface rather than creating new ones for each wall.
Finally, go to the LevelSettings object on each level, and add the LevelVars component. This component is necessary to give a starting position for your player on each level. This means that you must have a player on each level as well. You may make the player invisible if this is on a level that they are not needed on.
Now create all of the levels that you will need:
Press Space, then type add, then level then name the following levels:
- Level1
- Level2
- Level3
- Opening
- Death
- Win
If you name your levels differently than this, you will need to update your scripts to ensure that they reflect the new names.
Next, import the following scripts found below:
- CameraLogic
- DamageOnCollide
- EnemyDamageOnCollide
- EnemyHealth
- EnemyLogic
- Health
- LevelChange
- LevelVars
- MouseShoot
- PlayerController
- Projectile
Following this, it is time to start creating game objects. On Level1, create one sprite, call it Player and add the following components to it:
- Player Controller - set speed to 5
- Orientation – set Global Up to 0, 0, 1 and DefaultOrientation to ForwardYUpZ
- MouseShoot – set Projectile to PlayerBullet, you can adjust all other values as you see fit
- RigidBody
- Boxcollider – Set Ghost to False
- Health
Make it an archetype.
Next create another sprite, call it Enemy and add the following components to it:
- Orientation - set Global Up to 0, 0, 1 and DefaultOrientation to ForwardYUpZ
- RigidBody
- Boxcollider – set Ghost to False
- EnemyHealth
- EnemyLogic – set all settings as you see fit for your game. (I have 3, 15, 1, 2, 1, 1, 1)
Make it an archetype.
Next create another sprite, call it PlayerBullet, change size to 0.2, 0.2 and add the following components to it:
- RigidBody
- SphereCollider – set Ghost to True
- DamageOnCollide – set Damage to what you want, and the other two select true.
Make it an archetype.
Next create another sprite, call it EnemyBullet make it the same size as the PlayerBullet and add the following components to it:
- RigidBody
- BoxCollider – set Ghost to True
- EnemyDamageOnCollide – set Damage to what you want, and the other two select true.
- Projectile – set speed to what you want.
Make it an archetype.
Penultimately, make a series of sprites of different sizes, for example: 1 x 1, 1 x 3, 1 x 5, 1 x 10, 1 x 15, 1 x 20. Give them the following components:
- BoxCollider – set Ghost to False
Make each an archetype and name them wall1, wall3, wall5 etc. You can now drag out whatever wall sizes you need to your game surface rather than creating new ones for each wall.
Finally, go to the LevelSettings object on each level, and add the LevelVars component. This component is necessary to give a starting position for your player on each level. This means that you must have a player on each level as well. You may make the player invisible if this is on a level that they are not needed on.
Design Time
It is now time for you to import your own sprites or design your own, and add them to each level to create functioning game play. Remember to add backgrounds, sprites to walls and to your characters and enemies to ensure that you have a well-rounded experience for the player. Also keep in mind that you will need to create artwork for the opening screen, Win screen and Death screen. You can add multiple enemies, and you can create new archetypes from the old one changing the damage and health and speed. The enemy Ai script (EnemyLogic) has the enemy chase your character and shoot in that direction. If you wish to use a different Ai script you can get them from the script library.
Level Changing
You have probably noticed that your game errors on player death, and just continues after your player has destroyed all of the enemies. I am including a script that changes levels after your character has moved a specific distance in the X axis. 25 units for level 1, 50 for level 2 and 75 for level 3. If you want to change levels for a different reason: ie. Entering a portal, you will need to modify the script to include that event. You can use a collision event for a portal, or you could have a gameobject that needs to be destroyed to change the level. Make sure that you name your levels the same name that is used in the script (ie. Level1, Level2, Win, Death etc.).
Go to each level, and on each one add the following components to the LevelSettings object:
Make the following changes to Level Components:
Go to each level, and on each one add the following components to the LevelSettings object:
- LevelVars
- LevelChange – set timer to what you want.
Make the following changes to Level Components:
- GravityEffect – set active to False
- DragEffect – set active to False
cameralogic.txt | |
File Size: | 0 kb |
File Type: | txt |
damageoncollide.txt | |
File Size: | 2 kb |
File Type: | txt |
enemydamageoncollide.txt | |
File Size: | 2 kb |
File Type: | txt |
enemyhealth.txt | |
File Size: | 2 kb |
File Type: | txt |
enemylogic.txt | |
File Size: | 4 kb |
File Type: | txt |
health.txt | |
File Size: | 1 kb |
File Type: | txt |
levelchangetda.txt | |
File Size: | 4 kb |
File Type: | txt |
levelvars.txt | |
File Size: | 0 kb |
File Type: | txt |
mouseshoot.txt | |
File Size: | 2 kb |
File Type: | txt |
playercontrollertds.txt | |
File Size: | 1 kb |
File Type: | txt |
projectile.txt | |
File Size: | 0 kb |
File Type: | txt |