DemoApp01 is a modular Java demo application focused on game/physics concepts, featuring scene management, entities, behaviors, and graphical rendering. It highlights an extensible and configurable architecture.
- Entity-Component-Behavior architecture (simplified ECS)
- Dynamic scene management (e.g.,
DemoScene) - Rendering system with plugins (layers, debug, world, objects...)
- Simple physics engine (gravity, materials)
- Advanced keyboard input management (
InputHandler) - External configuration system (properties files)
- Internationalization (i18n/messages)
- Debug mode and multiple log levels
src/main/java/core/: application core (App, entities, behaviors, physics engine, renderer, utils)src/main/java/demo/scenes/: demo scenessrc/main/resources/: resources, configuration, i18nsrc/test/: test resources and configuration
The file src/main/resources/config.properties allows you to configure:
- debug, mode, timeout, window size, available scenes, gravity, etc.
Example:
debug=2
mode=DEVELOPMENT
timeout=200
winsize=800x600
scenes=demo:demo.scenes.DemoScene
defaultscene=demo
physics.gravity=9.81- App: entry point, lifecycle, services, configuration
- Scene: scene and entity manager
- Entity/GameObject/World/Camera: base entities, world objects, camera
- Behavior: attachable behaviors (gravity, player input, velocity, etc.)
- Renderer: graphics engine, layers and plugins management
- InputHandler: keyboard input management, debug shortcuts
- Java 17+
- sdkman (for Java version management)
sdk env use
chmod +x ./build
./build./build test./build run debug=2Note You can pass as many arguments as needed after
run:
debug=[1 to 5]mode=[DEVELOPMENT,TESTING,PRODUCTION]timeout=[milliseconds]
./build run helpHelp output:
Usage: java -jar app.jar [key=value]...
Available options:
debug=<level> Set debug level (0=none, 1=some, 2=verbose)
mode=<mode> Set application mode (DEVELOPMENT, TESTING, PRODUCTION)
winsize=<WxH> Set window size (e.g., 800x600)
help Show this help message
java -jar target/build/DemoApp01-0.0.1.jar debug=2- Keyboard controls the player entity and allows debug level adjustment (Ctrl+D).
ESCexits the application.- Debug mode displays extra information on screen.
Messages are externalized in src/main/resources/i18n/messages.properties.
All contributions are welcome!
Frédéric Delorme frederic.delorme@gmail.com