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
Game
class, - A standard central
GameObject
, - an
InputHandler
to capture player interaction - A
ResourceManager
service, - A
SceneManager
service, - A
SystemManager
and convert any service toSystem
interface, - Implement a
Render
upon Graphics2D andRenderHelper
, - Some fancy other objects like
TextObject
,LifeObject
orScoreObject
, - A
Camera
to move view with following a specific target, - A
PhysicEngine
to compute more realistic moves, - Some
Behavior
capability to GameObject, - A Map of
attributes
to GameObject - A new
InventoryObject
to manage a player inventory with its own renderer helper and behavior, - Bring the
RenderingHelper
mechanism to easily extend theRender
capability, - A evolution of the
PhysicEngine
by addingInfluenceArea2d
bringing some perturbation to theWorld
, - Adding
Particle
andParticleSystem
to create special effects like rain and fire, - Replace the good old
InputHandler
by anActionHandler
(WIP) to support input command mapping, - Add a
DebugViewportGrid
object and its rendering helper.
- A
CollisionSystem
is a work in progress - Some
TileMap
object to display beautiful game level graphic set and all its dependencies (Tile
,TileSet
andTileLayer
) 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 install
To execute test verification, using a bunch of cucumber tests :
mvn test
And finally, to run such a beautiful piece of code :
mvn exec:java
You will get the current display:
This sample demo will show :
- Some
GameObject
as player (the red one), and some random spawning enemies (orange ones), - the
ScoreObject
, displaying score (sic), - the
LifeObject
showing 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.