2D game: movement, hazards and restart
Build a small complete C# prototype with movement, collisions, scoring and another round.
Move the blue square and avoid falling white circles. Each second survived earns one point. A collision stops the round; the button starts another one. The arena is fixed at 640 × 360. Code draws the player and hazards, so no images or sounds are needed to run it.
Run the complete project
Download the learning project for Reckfell 1.0.0. Extract it, import project.reckfell in the project manager, choose Build Project / Alt + B, then press F5. Wait for a successful build before running. F8 stops the application.
To assemble it manually, create the files and objects in the sections below. Each class is supplied in full; you do not need to reconstruct a function from scattered fragments.
Find the part you need
| Task | Section |
|---|---|
| Set up the project, window and WASD / arrow actions | Setup |
| Create the player body and collision shape | Player prefab |
| Add movement, arena bounds and a hit signal | Player code |
| Spawn falling circles and detect the player | Hazard |
| Connect timers, score and round state | Level and controller |
| Show score, button and message | UI |
| Diagnose launch or restart failures | Verification and troubleshooting |
What it uses
CharacterBody2D moves the player; Area2D.BodyEntered detects a hit. PackedEntity creates hazard instances. Two Timer objects control spawning and score. CanvasLayer, Label and Button place UI above the game.
Use Reckfell 1.0.0 with C#/.NET 10. For your first editor launch, see project setup and the main panels. This prototype has no save system, networking or world streaming.