Setting up the Gameface Stack
To get you up and running immediately, we have created pre-configured templates that bypass the manual setup of Vite and SolidJS.
These templates come with the gameface-specific configurations already applied so your code will render perfectly in the Gameface Player right out of the box.
Prerequisites
Section titled “Prerequisites”Before we begin, ensure you have the following installed on your machine:
- Node.js: We recommend the latest LTS version .
- A Package Manager:
npm,yarn, orpnpm. - VS Code: Or your preferred text editor.
Choose Your Starting Point
Section titled “Choose Your Starting Point”Depending on your project requirements, you can either start with a structured blank project or a fully development ready UI component library.
To download these starter projects, we use a command line tool called degit.
This tool simply grabs a clean copy of the template files from our repository and places them on your computer, without bringing along any messy version control history.
Option A: The Gameface UI project
Section titled “Option A: The Gameface UI project”If you have limited web experience or want to skip the component creation process, we highly recommend starting with our pre-built Gameface UI template . It includes the exact same core technologies, but comes pre-loaded with a massive library of ready-to-use game components (like buttons, grids, and sliders), layout components for quick prototyping, and others.
We actively support and maintain this library, adding new components and features based on community feedback. This is our go to choice for starting new UI projects , and we highly recommend it for prototyping and production projects alike.
To get started with the Gameface UI template, run this command in your terminal:
npx degit CoherentLabs/Gameface-UI my-game-uicd my-game-uinpm installThis will create a new folder called my-game-ui with the boilerplate code, install all dependencies, and get you ready to start developing your game UI.
Option B: Scaffold a SolidJS Project from Scratch
Section titled “Option B: Scaffold a SolidJS Project from Scratch”If you prefer full control over your setup, you can scaffold a clean Vite + SolidJS project yourself using the official create-solid tool and then apply a few Gameface-specific configurations.
This route is ideal if you want to build your own UI architecture and components entirely from scratch, without any pre-built boilerplate.
-
Create the Project
Section titled “Create the Project”Open a terminal in the directory where you want to create your project and run:
Terminal window npm init solidFollow the prompts to set up your project:
- Project name: enter your desired project name (e.g.
my-game-ui). - What type of project would you like to create? select
SolidJS + Vite. - Use TypeScript? select
Yesto use TypeScript. - Which template would you like to use? select
basic.
- Project name: enter your desired project name (e.g.
-
Install Dependencies
Section titled “Install Dependencies”Navigate into your project directory and install the dependencies:
Terminal window cd my-game-uinpm install -
Configure Closing Tags
Section titled “Configure Closing Tags”By default, SolidJS optimizes performance by omitting the last closing tag of an element and the quotes around attributes. However, Gameface expects strict, valid HTML, so you must disable these optimizations to prevent console warnings and runtime errors.
Set the following options to
falsein yourvite.config.ts:omitNestedClosingTagsomitLastClosingTagomitQuotes
Your
vite.config.tsshould look like this:import { defineConfig } from 'vite';import solidPlugin from 'vite-plugin-solid';import devtools from 'solid-devtools/vite';export default defineConfig({plugins: [devtools(), solidPlugin({solid: {omitLastClosingTag: false,omitNestedClosingTags: false,omitQuotes: false,}})],server: {port: 3000,},base: './',build: {target: 'esnext',},});
Once the configuration is complete, you can see how to preview the project in Gameface in the next section.
Connect to the Gameface Player
Section titled “Connect to the Gameface Player”Regardless of which option you chose above, the steps to start your local server and view your UI in the Player are exactly the same.
-
Start the Development Server
Section titled “Start the Development Server”Open your terminal inside your new
my-game-uifolder and run:Terminal window npm run devThis will start a local web server, usually at
http://localhost:3000/. -
Launch the Player
Section titled “Launch the Player”Instead of viewing your UI in a standard web browser like Chrome, you should view it directly in the Gameface Player to ensure 100% engine accuracy.
Locate the
Player.batfile included in your Gameface package. Open the file in a text editor, scroll down until you see a similar command:Terminal window start "Player" /d "%wd%" "..\Player\Player.exe" --player %*"and add the following parameter to the end of the line:
Terminal window start "Player" /d "%wd%" "..PlayerPlayer.exe" --player "--url=http://localhost:3000/"Save the file and double-click the
.batfile to launch the Player. It will open and display your SolidJS application. Because our setup supports Hot Module Replacement (HMR), every time you save a file in your code editor, the Player will instantly update!
© 2026 Coherent Labs. All rights reserved.