Official hx3d Framework documentation site: srynetix.github.io
hx3d is an open-source and easy to understand 2D/3D game framework made in C++.
It is inspired by the well-known Java framework LibGDX plus some books and tutorials on the subject.
hx3d is somewhat modular. For now, rendering is done with SDL2, but one can easily change the implementation. All the rendering is done with OpenGL 3+ / OpenGLES 2.0.
The "cross-platform" part works good thanks to SDL2.
- CMake 3.3
- Ninja 1.6
They are included in the dependencies repository.
To import them, just clone them in the "dependencies" folder.
You can use the clone_dependencies.sh
script.
- SDL2 2.0.3
- SDL2_mixer 2.0.0
- Freetype 2.6
- Freetype-GL git
- stb_image git
If you want to build for Android, you will need the Android SDK and NDK.
For iOS, you will need Mac OS (obviously), and ios-deploy to deploy on your device.
You can install ios-deploy with npm
:
npm install -g ios-deploy
- Google Test 1.7.0
- Core
- Application and Game systems
- Screens
- Asset management
- File handling
- Event management
- Window
- Keyboard
- Mouse
- Single Touch
- Multi Touch
- Gestures
- Graphics
- Textures
- Sprites
- Batches
- Meshes
- Framebuffers
- Cameras
- Viewports
- Particle system
- Animations
- Lights
- SVG handling or preprocessing
- Mesh loading
- Tweening
- Base tweening
- Parallel tweens
- Tween sequences
- Fonts
- Basic font drawing
- Individual glyph drawing
- Physics
- Custom 2D physics
- 3D physics (Bullet ?)
- Scene Graph & ECS
- Entity Component System
- Scene Graph and Nodes
- Hybrid System
- Audio
- Base audio
- Frequency amplitude detection
- GUI
- Base GUI
- Network
- Base network
- Scripting
- Base scripting (Lua ?)
- Console (because it's cool !)
- Linux
- Android
- Mac OS X
- iOS
- Windows
- Emscripten ?
hx3d has it's own build system made in Python.
It uses CMake and Ninja internally.
It's simple enough to add new targets easily.
The build script is build.py
.
The configuration is in config.py
.
You must provide the target. The existing targets are:
linux
android
windows
macos
ios
Then it supports multiple options:
-c / --clean
: clean the build-e / --execute
: start the game-i / --install
: install the game-t / --test
: start the HX3D test executable-d / --debug
: debug the game
So, here are some examples:
./build.py linux
: build the game for Linux./build.py linux -d
: build and debug the game for Linux./build.py android --execute
: build and start the game for Android./build.py windows -c
: clean the build for Windows
When the game
folder isn't here, the build script only build the framework.
So the options as --install
, --execute
, or --debug
will not work (you will be warned.)
Currently, Windows build are supported using MinGW.
The recommended way is to use MSYS2. Then, you install the required packages into MSYS2: MinGW-w64, CMake and Ninja.
MSVC may be supported later.
Testing is different on desktop platforms and on Android.
On Android, you can only play with the test screens.
Just do:
./build.py android --test --install
# Or ./build.py android -ti
It will install the application "hx3d tests".
Desktop testing works on Linux and Windows.
Just do:
./build.py linux --test --install --execute
# Or ./build.py linux -tie
To create a project, just use the hx3d generator.
You can follow the tutorial Getting Started.