Project Setup
Setting up a new VISU PHP Game Project.
Is PHP-GLFW already installed?
Have you read the installation guide yet? If not, please do so first. VISU requires the following:
Follow the installation guide if you haven't installed the extensions yet!
Creating a new VISU project¶
Pick your Setup¶
VISU can be setup in multiple different ways, for the sake of simplicity we are going to focus on two main methods:
-
π VISU Quickstart (Recommended for beginners)
The VISU Quickstart creates a minimal and lightweight VISU application for rapid prototyping. -
β‘ Full VISU Starter Project (Advanced)
The VISU Starter Project creates a fully featured VISU application with basic game structure, asset management, and example code. (Think like a framework with controllers, routing, views, etc.)
Once you have all the requirements installed, you can create a new VISU project using Composer's create-project.
VISU Quickstart¶
You can find the VISU Quickstart repository here.
To create a new VISU Quickstart project, run the following Composer command in your terminal:
This command will create a new VISU project in the my-php-game directory.
Then enter the newly created project in your terminal:
And you're ready to go!

You should see a window open with a black background and red ball that you can move around with "WASD" keys.
Quickstart Structure¶
my-php-game/
βββ app.ctn <- App Configuration / Dependency Container
βββ bootstrap.php <- Bootstrap / Initialization File
βββ composer.json
βββ app/ <- Additional configuration / dependencies
βββ bin/ <- Executable scripts
βββ src/ <- Your game code
β βββ Application.php
βββ var/ <- Writable directory for logs, cache, etc.
βββ vendor/ <- Composer dependencies
Full VISU Starter Project¶
You can find the VISU Starter Project repository here.
To create a new VISU Starter project, run the following Composer command in your terminal:
This command will create a new VISU project in the my-php-game directory.
There's a quick wizard that might ask you for a few basics, like your game's name, to create the initial configuration.
After the installation, open the newly created project in your terminal:
Running the game¶
Once all dependencies are installed, you can run the game by executing the play command:
A window should open with a black background and a few flying elephpants in it.
Controls¶
The controls of the VISU PHP starter game are as follows:
- W - Move up
- A - Move left
- S - Move down
- D - Move right
- F1 - Toggle debug text and profiler
- ctrl+c - Toggles the ingame console
- ESC - Exit the game