add readme

This commit is contained in:
Lorin Werthen 2020-04-09 19:10:01 +02:00
parent 60b438f2da
commit d1ff047584
No known key found for this signature in database
GPG key ID: F11FFC921E0E08E0
5 changed files with 110 additions and 2 deletions

View file

@ -1,3 +1,43 @@
# Space Invaders # Zeus Invaders
TODO We'll give some general pointers on how to make this Space Invaders based game.
## Game description
The player controls a ship which can shoot bullets at a group of aliens. The aliens move to one side (right or left) of the screen, and move one space down when reaching the edge. The ships then speed up once they've moved down.
## Game structure
![Project structure](readme-assets/structure.png)
The general game structure we used is pretty simple, comprising of a player-controlled ship, a group of enemies, a node which randomly spawns a UFO which grants extra points, a GUI and a camera node to have some easier control over what the player sees.
We advise the reader to implement the nodes in the order presented in this README.
### 1. Ship
The ship should contain code which responds to the player pressing the arrow keys or the spacebar.
**TASK**: Implement player movement in the script of the ship. Make use of the `delta` parameter available in the `_process` function to vary the `position.x` of the ship node. Add a **Sprite** node with an image (placeholder will suffice for now).
### 2. Bullet
Common for both the enemies and the ship is the fact they can shoot bullets.
**TASK**: Create a Bullet scene containing a sprite and a Collision box. Collision can be obtained by adding an Area2D node and adding a CollisionShape2D node as its child. Have the Bullet scene move upwards continuously and let it despawn using `queue_free()` when it reaches the edge of the screen.
**TASK**: Check for collision with player or enemies. Quick tip: make use of groups
**TASK**: Add code to the ship which spawns this bullet scene at the current `global_position` of the ship. Make use of `preload()` to load the scene into memory.
### 3. Enemy
**TASK**: Create an Enemy scene which can be almost completely analogous to the ship. It contains a Sprite and a way to detect collisions.
### 4. Enemies
The enemy spaceships can be combined with one general "enemies" node. This controls the movement of the group of enemies, moving a discrete amount of time to one side, moving down when reaching the end of the screen.
![Enemies](readme-assets/enemies.png)
**TASK**: Create a node "Enemies". Populate with a couple of individual Enemy scenes (can right now just contain a single sprite). Create a **Timer** node and connect its timeout signal to the script of the group of enemies. This should then trigger a single movement of the group. Also add a **Bullet** spawner which randomly spawn downward facing bullets.

Binary file not shown.

After

Width:  |  Height:  |  Size: 108 KiB

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/enemies.png-27f006e9f6b37bcf385ccf7bfafcdbcb.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://readme-assets/enemies.png"
dest_files=[ "res://.import/enemies.png-27f006e9f6b37bcf385ccf7bfafcdbcb.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/structure.png-c45f4609588da3ee14f408dd8272af87.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://readme-assets/structure.png"
dest_files=[ "res://.import/structure.png-c45f4609588da3ee14f408dd8272af87.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0