This project is a journey from a Class to a Game. First commits will set the basis, and progressively transform, chapter after chapter, the initial class into a playable game.
During the chapters from the docs/ you will transform the
simple Game
class from beginning to a package
structured framework
with some useful features to support object management and display, and just now how to organize the code in a project,
using a bit of TDD to develop and refactor
Added some valuable features like:
- A Core
Gameclass, - A standard central
GameObject, - an
InputHandlerto capture player interaction - A
ResourceManagerservice, - A
SceneManagerservice, - A
SystemManagerand convert any service toSysteminterface, - Implement a
Renderupon Graphics2D andRenderHelper, - Some fancy other objects like
TextObject,LifeObjectorScoreObject, - A
Camerato move view with following a specific target, - A
PhysicEngineto compute more realistic moves, - Some
Behaviorcapability to GameObject, - A Map of
attributesto GameObject - A new
InventoryObjectto manage a player inventory with its own renderer helper and behavior, - Bring the
RenderingHelpermechanism to easily extend theRendercapability, - A evolution of the
PhysicEngineby addingInfluenceArea2dbringing some perturbation to theWorld, - Adding
ParticleandParticleSystemto create special effects like rain and fire, - Replace the good old
InputHandlerby anActionHandler(WIP) to support input command mapping, - Add a
DebugViewportGridobject and its rendering helper.
- A
CollisionSystemis a work in progress - Some
TileMapobject to display beautiful game level graphic set and all its dependencies (Tile,TileSetandTileLayer) are also work in progress ! - A Mouse and Gamepad events integration to rules'em all !
To build the project, the good maven command is :
mvn clean installTo execute test verification, using a bunch of cucumber tests :
mvn testAnd finally, to run such a beautiful piece of code :
mvn exec:javaYou will get the current display:
This sample demo will show :
- Some
GameObjectas player (the red one), and some random spawning enemies (orange ones), - the
ScoreObject, displaying score (sic), - the
LifeObjectshowing the remaining number of life, - the
InventoryObject, showing a qick inventory to select an available item.
The latest demo integrate the Fire ParticleSystem and the InfluenceArea2d world perturbation
Have Fun !
McG.


