Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

A small game using Fleks Entity Component System.

Notifications You must be signed in to change notification settings

Quillraven/Dinoleon

Repository files navigation

Kotlin Fleks

Dinoleon

Dinoleon is an example game using Fleks entity component system in a LibGDX game.

image

It is a very small and simple game where the player controls a Dinosaur that can switch colors like a Chameleon. There are walls spawning periodically from the right edge of the screen and as a player you need to switch the color of your dino within time to not get hit by the wall. If you get hit five times, you lose. There are three different difficulties which increase the number of spawns, how fast they spawn and also how fast they move.

image

The controls are:

  • Mouse for any UI menu related buttons
  • QWER to change colors
    • Q -> red
    • W -> green
    • E -> blue
    • R -> orange

image

The main purpose of Dinoleon is to show how Fleks can be used. Do not use it as a best practice for game development!

Like e.g., It is total nonsense to use a physic engine like Box2D for a simple game like that but in order to challenge Fleks and to see its capabilities I used it in this game.

Highlights

  • RenderSystem as a sorted IteratingSystem
  • PhysicSystem as a fixed interval IteratingSystem and ContactListener for Box2D
  • ScenerySystem as an Intervalsystem
  • PhysicComponent with a ComponentHook to properly cleanup physic related resources

You can find system code in the system package and component code in the component package.

Credits

About

A small game using Fleks Entity Component System.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages