Skip to content

leni8ec/game-asteroids

Repository files navigation

Asteroids - video game

Portfolio project

image

The goal of this project is to show the possible structure of the project in Unity as simply as possible, without any external dependencies.

Simple custom implementations of the:

  • dependency container
  • abstractions for factories, spawners and pools
  • elementary Reactive Properties

The main focus is on reducing the boilerplate code. So it may seem that there are not enough abstractions (for example, the principle of Dependency Inversion is not applied everywhere), this is done intentionally, until those abstractions are really required (architecturally, they are supported)


✅ Architecture (design patterns)

  • MVP (SC) - as a Core architectural basis (SC - supervising controller)
  • MVP (PV) - as a GUI architectural basis (PV - passive view)
  • Data (state, config) is split from Logic (systems)
  • Reactive properties - simple realization
  • IoC, DI - dependency injection
  • Object Pool - spawn and reuse entities
  • Factory Method - create new entities (used with Pool)
  • Commands (signals) - handle input
  • Adapters - used for Unity components (camera, audio)

🔲 Unity

  • Scriptable objects (for configs)
  • Input system

➡️ Todo

  • Use C# code style ?
  • Event System - purpose ?
  • Save game state - repositories usage
  • Unit-tests - simple usages of Unity Test Framework

💥 Unresolved issues

  • Reactive properties (of systems states) can be modified from anywhere

️ 💬 Discussion

🔗 Sources©️

About

Asteroids - video game (portfolio)

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published