Debian Codegraph @

examples/space_shooter/README.md

raw symbols SCIP
1 # Space Shooter
2
3 Initial version of a space shooter game.
4
5 - Space ship (click anywhere on the screen, or use arrows, to move it).
6
7 - Background (drawn efficiently as one quad, with texture repeating to infinity).
8
9 - Rockets (fired by the player's cannons). Each rocket has a collider and can detect when it hit an enemy. Rocket can be "armed" (destroys enemies) or "not" (just a ball that bounces off enemies).
10
11 - Enemies, played by the Mighty Rotating Rocks! They just move slowly towards the player. You can shoot them to destroy.
12
13 Technically:
14
15 - The player is just a `TCastleScene` inside a `TCastleViewport`, with input events handled in `TViewMain`.
16 - Using `TCastleComponentFactory` to create rockets and rocks. Each of them is defined by a [reusable design](https://castle-engine.io/reuse_design).
17 - Using [behaviors](https://castle-engine.io/behaviors) to define various behaviors of rocks and rockets.
18 - Using [physics](https://castle-engine.io/physics) to handle collisions between rockets and rocks.
19 - Special component `TTilingBackground` to draw a background that (seems to) repeat to infinity.
20
21 ![Screenshot](screenshot.png)
22
23 Using [Castle Game Engine](https://castle-engine.io/).
24
25 ## Building
26
27 Compile by:
28
29 - [CGE editor](https://castle-engine.io/editor). Just use menu items _"Compile"_ or _"Compile And Run"_.
30
31 - Or use [CGE command-line build tool](https://castle-engine.io/build_tool). Run `castle-engine compile` in this directory.
32
33 - Or use [Lazarus](https://www.lazarus-ide.org/). Open in Lazarus `space_shooter_standalone.lpi` file and compile / run from Lazarus. Make sure to first register [CGE Lazarus packages](https://castle-engine.io/lazarus).
34
35 - Or use [Delphi](https://www.embarcadero.com/products/Delphi). Open in Delphi `space_shooter_standalone.dproj` file and compile / run from Delphi. See [CGE and Delphi](https://castle-engine.io/delphi) documentation for details.