A small 2D game built with Vix.cpp and the vix/game runtime.
vix-game is a simple game project used to demonstrate how to build a real interactive application with Vix.cpp.
It uses:
vix.appvix/gameGameRuntimeScene- SDL window backend
- OpenGL renderer backend
- asset loading
- sprite rendering
- keyboard movement
- collision
- score update
W / Arrow Up Move up
S / Arrow Down Move down
A / Arrow Left Move left
D / Arrow Right Move right
Escape Quit
vix-game/
assets/
player.jpg
coin.jpeg
src/
main.cpp
GameConfig.hpp
GameApp.hpp
GameApp.cpp
entities/
Player.hpp
Player.cpp
Coin.hpp
Coin.cpp
gameplay/
Collision.hpp
scenes/
MainScene.hpp
MainScene.cpp
game.package.json
vix.app
vix.json
vix buildvix runvix game exportThe installed Vix.cpp game module must be built with SDL support enabled.
On Ubuntu:
sudo apt update
sudo apt install libsdl2-dev libsdl2-image-devThis project is intentionally small.
It exists to show the clean path from:
- Vix project
- game app
- window
- renderer
- sprite
- input
- gameplay
mkdir -p src/entities src/gameplay src/scenes assetsPlace these files:
assets/player.jpg
assets/coin.jpeg
vix build
vix run