Skip to main content

Projects

Project group holds everything needed to start up a small sample project using wui.

The main inspiration/source for this project is the brilliant Allegro Vivace tutorial and can be found here. The project itself is written in C++ but I made a very crude copy into godots system.

Two versions exist of the project:

  • Vivaci Cpp: The original C++ version with a few modifications to use WUI. Found here
    • The needed library is downloaded automatically via the included cmake script
  • Vivaci Godot: The godot version of the project. Found here
    • This version does not include the extension itself (due to size)
    • To download the most recent release of the extension visit here
    • The extension includes the needed wui library

Both projects use the same Vivaci UI project, which uses the custom backend to communicate with the game.

info

Both projects include Vivaci-UI as a submodule; it can be initialized with: git submodule update --init extern/html

This is what the dependencies look like:

Colored in red are the "base" dependencies that WUI mainly consists of. Colored in green are sample projects that use those dependencies.

Vivaci UI

Any WUI UI is a webpage, the only requirement is the WUI node library in order to link with the backend of the game.

One of the most interesting feature is WUIs ability to perform automatic testing detailed here.

Receiving events

  • EventName: info
  • EventPayload:
{
score: number;
lives: number;
}

The EventPayload is shown on the top left of the UI. The score counter coutns up in an 'arcade style'.

Sending events

  • EventName: restart
  • EventPayload: {}

When the player is out of lives the UI will show a button that the user can click to respawn. This button sends the restart event to the engine and should restore the players lifes.

no test coverage

Currently this project has no test coverage but there is an issue for it.

To see how testing would look like see this archived project. /src/ includes files that specify testing.