|
| 1 | +# Spaceship demo |
| 2 | + |
| 3 | +## About |
| 4 | + |
| 5 | +This is a top-down game featuring the "move like a spaceship" block in |
| 6 | +the SimpleCharacter node. It is a more complete game based on the |
| 7 | +knowledge gained in the previous demos. |
| 8 | + |
| 9 | +## Implementation |
| 10 | + |
| 11 | +The inventory was done with boolean variables in the block |
| 12 | +coding. There are "has_blue_key" and a "has_blaster" in the block |
| 13 | +canvas for the ship. |
| 14 | + |
| 15 | +A couple mechanics have been implemented with basic collision |
| 16 | +detection of Area2D "on body entered/exited". For instance: |
| 17 | +- Camera zoom in and out when the player ship enter/leaves a specific |
| 18 | + zone. |
| 19 | +- Open door when the player ship gets near the door and has a key. |
| 20 | +- Change a flag like "has_blue_key" when the player ship grabs the |
| 21 | + blue key. Play an animation in that case too. |
| 22 | +- Present messages on screen. |
| 23 | + |
| 24 | +I was able to push the asteroids with the blasters by adding |
| 25 | +AnimatableBody2D nodes to them and then animating them. |
| 26 | + |
| 27 | +Aesthetics: Sprites with CanvasTextures (diffuse and normal map) are |
| 28 | +used to give a 3D look, while still being 2D. Adding PointLight2D and |
| 29 | +LightOccluder2D nodes complete the effect. Also a CanvasModulate node |
| 30 | +is used in the main scene to darken the level. |
| 31 | + |
| 32 | +## Limitations found |
| 33 | + |
| 34 | +There is no current way of spawning objects. That's why the blasters |
| 35 | +are implemented as an animation and they are fixed to the player |
| 36 | +ship. Rotating the ship rotates the blasters which is not what I |
| 37 | +wanted. |
| 38 | + |
| 39 | +I wanted asteroids to have health and destroy with an animation, but |
| 40 | +the only option today is to use the "queue free" block on them. We |
| 41 | +need to fix the "call method in node" block to reference a node in a |
| 42 | +instantiated scene like this. |
0 commit comments