https://github.com/bakpakin/egf
A Java entity-component game framework that uses slick.
https://github.com/bakpakin/egf
Last synced: 8 months ago
JSON representation
A Java entity-component game framework that uses slick.
- Host: GitHub
- URL: https://github.com/bakpakin/egf
- Owner: bakpakin
- Created: 2014-04-20T23:04:40.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2014-05-07T00:46:38.000Z (over 11 years ago)
- Last Synced: 2025-01-12T06:43:09.108Z (9 months ago)
- Language: Java
- Size: 22.1 MB
- Stars: 2
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
EGF - Entity Game Framework
===========================EGF is an entity-component game framework written Java that uses the
lwjgl and slick libraries. The goal of creating EGF was making a framework
for creating my own 2d games to avoid re-writing the main loop and
other trivial annoying things for every game. EGF also provides
functionality to easily and efficiently load assets, draw graphics,
move objects around on the screen, particles, tilemaps, and so on. The project
quickly became a lot bigger than I initially intended, and as of writing this has over
one hundred classes.The Framework
=============EGF is based off of the entity-component model, which is a way to model a program that
happens to work very well for games. The main idea of an entity-component model is to
break up entities, or game objects, or whatever you want to call the 'actors' of your
game, into sperate components. These components are then processed by systems, which
execute the majority of the actual logic in the game. For example, an entity representing
a car might have a Position component, a Velocity component, a RigidBody component, and
possibly other components. Every step in the main game loop, a Movement System might
process the Position component and the Velocity component on the car to move the car.
This same Movement system could then also move around any other entity that also has
a Position component and a Velocity component. The ability to process broad sets of
entities is what makes systems and the entity-component model so powerful. Here's a good
article that goes into more detail:
http://gameprogrammingpatterns.com/component.html