# Coherent Labs: full documentation
> Every page, as sections of at most ~1,600 characters separated by `---`. Each section starts
> with a SOURCE tag naming its page URL and heading anchor; a section split into parts is headed `(i/n)`.
---
[SOURCE: https://coherent-labs.com/]
## UI made simple (1/2)
## UI made simple
The UI middleware that leverages web technologies to help you build intricate, high-performance interfaces.
## Product
Gameface brings the power of web technologies to AAA game UI through a runtime engineered for performance and creative freedom. It helps teams move fast, integrate easily, and fine-tune every aspect of their UI with full visibility and control.
Learn more
## Testimonials
Coherent gave Gearbox a highly performant, tool-robust, time and cost effective solution—the next generation of UI tools. Having used other popular UI solutions, we find Coherent to be a lifesaver. We're actively spreading the good word.
Michael Wardwell, Game Designer at Gearbox Software
Our communication with the Coherent team was always great. Coherent GT demonstrates what we want in future UI engines. We'll work together again.
Soo Min Park, CTO Bluehole Studio Inc.
The Coherent team is knowledgeable and helpful. Their technology enabled us to create next generation UI
The team at Nexon GT Co, Ltd
Coherent offers the most fully-featured HTML + Javascript runtime for game UI that works across all major platforms
Emil Anticevic, CTO and Co-founder of Counterplay Games
For studios seeking a robust, off-the-shelf UI solution supported by a team of developers, Coherent's Gameface is an ideal choice.
The UI team at Firaxis Games
Another advantage of web technology is that it opens doors for our recruitment process, allowing us to draw on talent from outside of the game industry. We can now hire professionals with skills that prove immediately relevant.
---
[SOURCE: https://coherent-labs.com/]
## UI made simple (2/2)
Gary Richards, Game Director at Frontier Developments
## Our partners
---
[SOURCE: https://coherent-labs.com/about-us/]
## UI made simple (1/2)
## UI made simple
We partner with studios to turn ambitious UI ideas into seamless, high-performance experiences.
At Coherent Labs, we believe creating game UIs should be as inspiring as the games themselves. That's why we build tools that make UI development powerful, simple, and fun - powered by modern web tech. What started as a small startup has grown into a trusted partner for leading game studios worldwide. Our flagship product, Coherent Gameface, is trusted across the industry to bring
next-level interfaces to life.
## our values
### DESIRE TO LEARN
Have the will to develop yourself both personally and professionally
### PASSION AND COMMITMENT
You are encouraged to actively participate in task designing and bring in ideas
### ATTENTION TO DETAIL AND QUALITY
Always strive for perfection but never at the expense of progress
### COURAGE AND CONFIDENCE
Do not fear facing problems that nobody has encountered or solved before
### TECHNICAL EXCELLENCE
We never stop looking for improvements and do not settle for "good"
### SHARED SUCCESS
There is no success for us unless our users are successful with our tech
## Leadership
### George Petrov
##### CEO
##### george@coherent-labs.com
##### Tell us a fun fact about yourself
##### I like doing paper aeroplanes
##### What makes Coherent Labs special?
##### We're the only professional vendor for game UI middleware on the market.
### Dimitar Trendafilov
##### CTO
##### dimitar@coherent-labs.com
##### Tell us a fun fact about yourself
---
[SOURCE: https://coherent-labs.com/about-us/]
## UI made simple (2/2)
##### I am a car enthusiast and I am making room in my life for doing rallies.
##### What makes Coherent Labs special?
##### We want to bring the fun into game development.
### Nick Vasilev
##### R&D Director
##### nick@coherent-labs.com
##### Tell us a fun fact about yourself
##### Once I missed 3 connecting flights in one trip and still got on time.
##### What makes Coherent Labs special?
##### We're the only professional vendor for game UI middleware on the market.
### Aleksandra Ivanov
##### Customer Success Director
##### alexandra@coherent-labs.com
##### Tell us a fun fact about yourself
##### I am a true makeup geek.
##### What makes Coherent Labs special?
##### Brainpower. I have never seen another group of people where every single member is extraordinarily smart and gifted. I guess that's what makes pushing technological and innovation boundaries an easy task for us.
### Annie Atanasova
##### Director of operations and finance
##### anelya.a@coherent-labs.com
##### Tell us a fun fact about yourself
##### I'm into extreme sports (like aerial acrobatics).
##### What makes Coherent Labs special?
##### I found out about Coherent Labs a few years ago. I recall being amazed by their determination and selflessness towards making game UI development a simple task. It's an absolute bliss being part of this.
---
[SOURCE: https://coherent-labs.com/all-features-gameface/]
## Gameface
All Features. (1/4)
## Gameface All Features.
### Workflow
#### Iterate in seconds, not minutes
Modify the UI while the game is running through our Developer tools and see the change immediately. Or, setup your game to automatically reload the UI anytime a file is changed.
#### Use popular JavaScript libraries
Use React + Redux, Preact, WebPack, jQuery, Anime.js and others and benefit from ever increasing knowledge and tools of the web world.
```js
ReactDOM.render(
Hello, Gameface!
,
document.getElementById('root')
);
```
#### Minimize scripting
Use our declarative data binding to minimize the amount of code (especially boring code) you will need to synchronize the states of the game and the UI.
```html
```
#### Separate work concerns
Work uninterrupted - anything UI related can be done from within Gameface without C++. The game's not ready yet? Test without the game in our test app. Data's not exposed? Mock it in JavaScript. Don't know how well your UI is working? Automate QA.
```js
// Create some mock data
engine.createJSmodel("player", {
stats: {
health: 55,
mana: 33
}
});
```
#### More than standard compliance
---
[SOURCE: https://coherent-labs.com/all-features-gameface/]
## Gameface
All Features. (2/4)
Gameface is a standard compliant HTML5 engine - we support **everything needed for game UI.** Even more, standard HTML5 lacks a few key features that modern game UI needs so we extend it with custom CSS and Javascript to do what you normally would have no way of doing.
See the Pen [Simple Health bar](https://codepen.io/nikoladimitroff/pen/QJByZQ/) by Nikola Dimitroff ([@nikoladimitroff](https://codepen.io/nikoladimitroff)) on [CodePen](https://codepen.io).
### Visual Quality
#### Variety of effects
No visual effect is out of reach - apply filters and blend modes, 3D and 2D transform UI elements, use transparent videos for particle effects.
Credits for the above [video](https://www.youtube.com/watch?v=RN8ss708b6M) go to [CyberWebFX](https://www.youtube.com/c/CyberWebFX)
#### Scalable UI
You don't need to guess what resolutions your players will be running on. Your UI will look as intended everywhere thanks to:
- crisp font rendering at all resolutions
- support for vector graphics (SVGs)
- dynamically scaling elements based on the current viewport size
#### All the image support you would ever need
Want to use some platform-specific texture format (DDS, KTC, ASTC) or an image straight out of Photoshop (PSD)? You can do that.\
\
Want to load your UI textures by yourself? You can do that.\
\
Want to display your in-world camera capture in the UI (e.g. for a 3D player avatar)? You can do that.
### Integration
#### Deep Unreal Engine and Unity integrations
---
[SOURCE: https://coherent-labs.com/all-features-gameface/]
## Gameface
All Features. (3/4)
If you are using the amazing Unreal Engine or Unity, installation steps are as easy as 1-2-3. Our plugins for both engines will make you feel like our tech is a native part of the engine.
- Custom components can be attached to any game object in your scene
- Full scripting support for Blueprints / C#
- A submenu in the editor gives you easy access to all of our features
- Support for old and new versions of the both engines alike
#### Amazing performance
We are the fastest UI technology you can find anywhere and we have the data and testimonials to back it up. You’ve probably heard that HTML engines are usually slow - but Gameface was designed specifically for game UI and optimizes hard for it. For example, the UI above from the previous bullet, runs in under 1 ms on a standard PS4 (not PS4 Pro!).
#### White box
We are aware our tech doesn’t run in isolation from your game. For best performance, we give you control over all subsystems we can.
- You control how the SDK allocates memory, loads resources, creates log files or reads input
- Use out-of-the-box renderers for DirectX11, DirectX12, OpenGL, GLES2, GLES3, Metal, console-specific APIs or write your own
- Run our parallel code on how many and whichever threads you like - the SDK never spawns threads on its own
```cpp
void OnWorkAvailable(void*, cohtml::WorkType WorkType, cohtml::TaskFamilyId TaskFamily)
{
MyEngine::EnqueueWorkOnSomeThread([WorkType, TaskFamily]()
{
cohtml::Library::HintThreadUsage(WorkType);
CohtmlLibrary->ExecuteWork(WorkType, cohtml::WEM_UntilQueueEmpty, TaskFamily);
});
}
```
---
[SOURCE: https://coherent-labs.com/all-features-gameface/]
## Gameface
All Features. (4/4)
#### Clean API
We write code so you don't have to and you only need an hour to understand how to use our API.
- Setup is as easy 1-2-3
- Configure every setting you are interested in
- Preserving backwards compatibility is a major goal - we rarely break it and when we do it's thoroughly described
- The modular architecture allows you to turn off and on features depending on your needs. Feel free to switch off entire subsystems like video and HTTP support if you aren't going to use them.
```cpp
// your game loop
while (true)
{
// Update UI
uiSystem->Advance(MyEngine::CurrentTime);
auto frameId = uiScreen->Advance(MyEngine::CurrentTime);
uiScreenRenderer->Paint(frameId);
DrawUITextureOnScreen();
// Update engine simulation
}
```
---
[SOURCE: https://coherent-labs.com/all-features-prysm/]
## Prysm
All Features. (1/3)
## Prysm All Features.
### Workflow
#### Use the tools you know and love
There are no tools more loved by artists than Adobe's CC - and we want you to keep using them. Design and draw in Photoshop, create effects in After Effects, add motion in Animate.
#### Add motion
Use Adobe Animate's wide range of capabilities - animate colors, positions, sizes, masks, even the shapes themselves!
#### Add interactions
Through Prysm's plugin for Adobe Animate, add interactivity to your screens without code.
- Declaratively specify how the game's data affects the UI.
- Use the variety of events (player input, events from the game, UI changes on other elements, etc.) and actions to setup interactions like adding new UI widgets, switching between screens or sending data to the game.
#### See your changes instantly
There's no loading, baking or other preprocessing time - hit play and see how your UI looks immediately.
### Visual Quality
#### Variety of effects
No visual effect is out of reach - apply filters and blend modes, 3D and 2D transform UI elements, use transparent videos for particle effects.
Credits for the above [video](https://www.youtube.com/watch?v=RN8ss708b6M) go to [CyberWebFX](https://www.youtube.com/c/CyberWebFX)
#### Variety of effects
No visual effect is out of reach - apply filters and blend modes, 3D and 2D transform UI elements, use transparent videos for particle effects.
#### All the image support you would ever need
---
[SOURCE: https://coherent-labs.com/all-features-prysm/]
## Prysm
All Features. (2/3)
Want to use some platform-specific texture format (DDS, KTC, ASTC) or an image straight out of Photoshop (PSD)? You can do that.\
\
Want to load your UI textures by yourself? You can do that.\
\
Want to display your in-world camera capture in the UI (e.g. for a 3D player avatar)? You can do that.
### Integration
#### Deep Unreal Engine and Unity integrations
If you are using the amazing Unreal Engine or Unity, installation steps are as easy as 1-2-3. Our plugins for both engines will make you feel like our tech is a native part of the engine.
- Custom components can be attached to any game object in your scene
- Full scripting support for Blueprints / C#
- A submenu in the editor gives you easy access to all of our features
- Support for old and new versions of the both engines alike
#### Amazing performance
We are the fastest UI technology you can find anywhere and we have the data and testimonials to back it up. You've probably heard that HTML engines are usually slow - but Gameface was designed specifically for game UI and optimizes hard for it. For example, the UI above from the previous bullet, runs in under 1 ms on a standard PS4 (not PS4 Pro!).
#### White box
We are aware our tech doesn't run in isolation from your game. For best performance, we give you control over all subsystems we can.
---
[SOURCE: https://coherent-labs.com/all-features-prysm/]
## Prysm
All Features. (3/3)
- You control how the SDK allocates memory, loads resources, creates log files or reads input
- Use out-of-the-box renderers for DirectX11, DirectX12, OpenGL, GLES2, GLES3, Metal, console-specific APIs or write your own
- Run our parallel code on how many and whichever threads you like - the SDK never spawns threads on its own
```cpp
void OnWorkAvailable(void*, cohtml::WorkType WorkType, cohtml::TaskFamilyId TaskFamily)
{
MyEngine::EnqueueWorkOnSomeThread([WorkType, TaskFamily]()
{
cohtml::Library::HintThreadUsage(WorkType);
CohtmlLibrary->ExecuteWork(WorkType, cohtml::WEM_UntilQueueEmpty, TaskFamily);
});
}
```
#### Clean API
We write code so you don't have to and you only need an hour to understand how to use our API.
- Setup is as easy 1-2-3
- Configure every setting you are interested in
- Preserving backwards compatibility is a major goal - we rarely break it and when we do it's thoroughly described
- The modular architecture allows you to turn off and on features depending on your needs. Feel free to switch off entire subsystems like video and HTTP support if you aren't going to use them.
```cpp
// your game loop
while (true)
{
// Update UI
uiSystem->Advance(MyEngine::CurrentTime);
auto frameId = uiScreen->Advance(MyEngine::CurrentTime);
uiScreenRenderer->Paint(frameId);
DrawUITextureOnScreen();
// Update engine simulation
}
```
---
[SOURCE: https://coherent-labs.com/blog/]
## Powered by Coherent Labs (1/3)
Search
\[ ] Match all
No results for
You may want to try different keywords, checking for typos or adjusting your filters.
Gameface UI: Adding a tutorial to the Menu UI
11/3/2025 UI tutorials
Gameface UI Update: Menu Glow-Up + Quick Component Customization Guide
8/28/2025 UI tutorials
Gameface UI version 1.0.0 released
7/10/2025 News
Strategic Interfaces: Gameface Joins the Civilization
6/17/2025 Case Studies
Gameface E2E Released
5/27/2025 News
Manager UI (part 5): Team Roster - Keyboard and gamepad navigation
4/17/2025 UI tutorials
Manager UI (part 4): Keyboard and gamepad navigation
4/16/2025 UI tutorials
Manager UI (part 3): Team roster UI screen
3/27/2025 UI tutorials
Gameface UI Beta Released
3/11/2025 News
Manager UI (part 2): Cross component interactions and utility components (Toast, Tooltip)
3/8/2025 UI tutorials
Manager UI (part 1): Creating a draggable grid in Gameface
3/7/2025 UI tutorials
3D Map with UI markers - Adding interactions (part 2)
2/13/2025 UI tutorials
3D Map with UI markers - Project setup & displaying markers (part 1)
2/13/2025 UI tutorials
Creating a camera tilt gauge
2/10/2025 UI tutorials
How to create a Fish-eyed using a curved plane
2/9/2025 UI tutorials
How to create different types of bars in Gameface
2/6/2025 UI tutorials
Emoji support
1/28/2025 News
Custom components with Shadow DOM-Now available in Gameface!
1/20/2025 News
In-world hologram UI - In world inventory (Frontend) (Part 4)
1/9/2025 UI tutorials
In-world hologram UI - In world inventory (Backend) (Part 3)
1/8/2025 UI tutorials
---
[SOURCE: https://coherent-labs.com/blog/]
## Powered by Coherent Labs (2/3)
Creating hexagonal skill tree
1/7/2025 UI tutorials
In-world hologram UI - Showing an in world screen with a message (Part 2)
1/7/2025 UI tutorials
In-world hologram UI - Showing a tooltip in game (Part 1)
12/17/2024 UI tutorials
Creating a damage indicator
12/5/2024 UI tutorials
Replicating the shadow menu from LA Noire
11/21/2024 UI tutorials
Adding a UI into the world
11/8/2024 UI tutorials
Recreating the separating texts in Forspoken
11/7/2024 UI tutorials
Creating interactive game level selection menu
11/1/2024 UI tutorials
Creating screen for character selection
10/29/2024 UI tutorials
Multiplayer UI - Marketplace (Part 5)
10/11/2024 UI tutorials
Multiplayer UI - Inventory (Part 4)
10/3/2024 UI tutorials
Creating a dialogue tree for your game
10/1/2024 UI tutorials
Making a 3D compass
9/11/2024 UI tutorials
Nine slice modal
9/11/2024 UI tutorials
Multiplayer UI - Create leaderboard (Part 3)
8/29/2024 UI tutorials
Multiplayer UI - Two factor authentication login (Part 2)
8/6/2024 UI tutorials
Multiplayer UI - Create login screen and friends list (Part 1)
7/31/2024 UI tutorials
How to: Create action buttons for a mobile UI
7/24/2024 UI tutorials
How to: Create a virtual joystick for a mobile UI
7/19/2024 UI tutorials
Creating an interface for customizing character appearance
7/16/2024 UI tutorials
Charts in Game UI
6/6/2024 UI tutorials
Adding 3D items to a shop page
6/6/2024 UI tutorials
Making chat with emojis in Gameface
5/30/2024 UI tutorials
In-game highlights
5/16/2024 UI tutorials
---
[SOURCE: https://coherent-labs.com/blog/]
## Powered by Coherent Labs (3/3)
Skewed settings menu - Gamepad support
5/16/2024 UI tutorials
Radial menus in Gameface
5/13/2024 UI tutorials
3D Subtitles
3/28/2024 UI tutorials
Carousel with Perspective
3/28/2024 UI tutorials
Custom CSS Cursor
3/28/2024 UI tutorials
Hologram UI
3/28/2024 UI tutorials
Skewed settings menu
3/28/2024 UI tutorials
Making split screen UI with Gameface
3/28/2022 UI tutorials
Creating nameplates and other dynamic onscreen elements
3/8/2022 UI tutorials
Unit 2 Games - realizing their vision for UGC games with the help of CL tech
8/1/2019 News
Introducing Vulkan support in the Coherent Technology
7/26/2019 Software development
Say hi, new coherent brand!
6/6/2019 News
Incoming Renoir backend API changes
2/6/2019 Software development
Gameface 1.0 released!
12/7/2018 releases
Prysm 1.0 released!
12/7/2018 releases
HTML is the best alternative to Scaleform
11/26/2018 News
Taking the Next Step: A New Brand Identity for Coherent Labs
9/10/2018 Inside coherent labs
Development process in Coherent Labs
6/29/2018 Workflow
Introducing Coherent Console Fonts
5/30/2018 Design and animation
What you need to know about Hummingbird's support for Nintendo Switch
4/24/2018 News
On the road to HTML5
7/28/2017 News
---
[SOURCE: https://coherent-labs.com/blog/casestudies/firaxis-case-study/]
## Strategic Interfaces: Gameface Joins the Civilization (1/3)
## Strategic Interfaces: Gameface Joins the Civilization
case studies
6/17/2025
Coherent Labs
1. What were the main UI goals that Coherent enabled you to achieve? What do you see as Coherent’s main benefit for your needs?
2. Can you share any specific insight about the impact Coherent had on your game’s UI performance?
3. Would you recommend Coherent to other studios and why?
4. How do you see your project evolving with time?
Firaxis Games, the legendary studio behind the Civilization franchise, delivered another milestone in grand strategy with the release of Civilization VII earlier this year. Building on the series’ rich legacy, the game pushes boundaries with new systems, refined visuals, and a modernized user experience. At Coherent Labs, we’re proud to have supported this vision through our UI middleware, Coherent Gameface, which powers the game’s responsive UI across all the platforms. To offer a glimpse into how Gameface contributed behind the scenes, we reached out to Firaxis’ UI team for a short Q\&A on their experience integrating our tech into their custom AAA engine.
#### What were the main UI goals that Coherent enabled you to achieve? What do you see as Coherent’s main benefit for your needs?
---
[SOURCE: https://coherent-labs.com/blog/casestudies/firaxis-case-study/]
## Strategic Interfaces: Gameface Joins the Civilization (2/3)
A major goal of Civilization VII was delivering a polished, unified UI experience simultaneously across PC storefronts, consoles, and handheld devices. Coherent’s Gameface enabled us to efficiently create a consistent interface tailored for multiple platforms, significantly reducing development overhead and ensuring a seamless, high-quality user experience regardless of device.
#### Can you share any specific insight about the impact Coherent had on your game’s UI performance?
With Coherent Gameface, we were able to deliver a stable and responsive UI across all platforms. This was made possible by Gameface’s flexibility in supporting various computing architectures, whether single-threaded or multi-threaded. Additionally, integration with Chrome’s Inspector allowed us to quickly identify and resolve performance issues early in development using the built-in profiler and heap analyzer.
#### Would you recommend Coherent to other studios and why?
Yes, for studios seeking a robust, off-the-shelf UI solution supported by a team of developers, Coherent’s Gameface is an ideal choice. Gameface’s implementation of open web standards such as HTML5 and CSS accelerates the onboarding for developers. We found the comprehensive documentation, tutorials, and flexible rendering API helped to streamline our integration into our custom AAA game engine.
#### How do you see your project evolving with time?
---
[SOURCE: https://coherent-labs.com/blog/casestudies/firaxis-case-study/]
## Strategic Interfaces: Gameface Joins the Civilization (3/3)
Looking ahead, we’re excited about Coherent Gameface’s roadmap, particularly its increasing compatibility with modern frontend frameworks such as SolidJS. We are also excited to see what our modding community will be able to develop and run on this Gameface-based UI system.
With Civilization VII now thriving in players’ hands, the road ahead looks just as exciting: Firaxis upcoming Update 1.2.2 packs in Steam Workshop support, Large & Huge map types, new advanced setup options, and another round of UI polish. We’re thrilled to see how both Firaxis and the community leverage our adaptable UI framework- right as we at Coherent expand keep working on our exciting roadmap for the year.
Stay tuned for the more behind-the-scenes stories as our journey unfolds!
## On this page
---
[SOURCE: https://coherent-labs.com/blog/design-and-animation/introducing-coherent-console-fonts/]
## Introducing Coherent Console Fonts (1/3)
## Introducing Coherent Console Fonts
design-and-animation
5/30/2018
Alexandra Ivanov
#####
As most of you know, icon fonts are font files that are filled with icons and graphs instead of letters or numbers. Many of you are using some type of similar fonts in their daily work-related tasks. Icon fonts are not just a modern way of using iconography bur rather a way to communicate information in a more efficient way to the user.
That’s why we are happy to introduce to you one of our new features in Hummingbird – The Coherent Console Fonts.
Coherent Console Fonts is a bundle of fonts created especially with the purpose to make using control signification in the games much easier for the designers and developers.
Each one of the Coherent Fonts represents the main control buttons from the console’s controller. There are three available fonts – one for each of the biggest names on the market – PlayStation, Xbox & Nintendo Switch.
Coherent Console Fonts save you time from creating custom control icons for every different project. You’re able to apply different text effects on them every time you need to spice up the look. Another great advantage is that the size of Coherent Console Fonts can be changed in a few minutes, and there is zero need for Photoshop to do that. Our icon font characters are vectors – meaning they look well even in high pixel-density displays. At last but not least, when using Coherent Console Fonts, your files will be lighter in size resulting in faster UI loading, which can’t be achieved when using regular SVG or PNG icons.
#####
---
[SOURCE: https://coherent-labs.com/blog/design-and-animation/introducing-coherent-console-fonts/]
## Introducing Coherent Console Fonts (2/3)
As most of you know, icon fonts are font files that are filled with icons and graphs instead of letters or numbers. Many of you are using some type of similar fonts in their daily work-related tasks. Icon fonts are not just a modern way of using iconography bur rather a way to communicate information in a more efficient way to the user.
That’s why we are happy to introduce to you one of our new features in Hummingbird – The Coherent Console Fonts.
Coherent Console Fonts is a bundle of fonts created especially with the purpose to make using control signification in the games much easier for the designers and developers.
Each one of the Coherent Fonts represents the main control buttons from the console’s controller. There are three available fonts – one for each of the biggest names on the market – PlayStation, Xbox & Nintendo Switch.
Coherent Console Fonts save you time from creating custom control icons for every different project. You’re able to apply different text effects on them every time you need to spice up the look. Another great advantage is that the size of Coherent Console Fonts can be changed in a few minutes, and there is zero need for Photoshop to do that. Our icon font characters are vectors – meaning they look well even in high pixel-density displays. At last but not least, when using Coherent Console Fonts, your files will be lighter in size resulting in faster UI loading, which can’t be achieved when using regular SVG or PNG icons.
#####
To install Coherent Console Fonts on MacOS, open Font Book, then drag and drop the files into the app. You’re done.
---
[SOURCE: https://coherent-labs.com/blog/design-and-animation/introducing-coherent-console-fonts/]
## Introducing Coherent Console Fonts (3/3)
## On this page
---
[SOURCE: https://coherent-labs.com/blog/inside-coherent-labs/taking-the-next-step-а-new-brand-identity-for-coherent-labs/]
## Taking the Next Step: A New Brand Identity for Coherent Labs
## Taking the Next Step: A New Brand Identity for Coherent Labs
inside-coherent-labs
9/10/2018
Alexandra Ivanov
1. The initial goal
2. Who are we today
#####
---
[SOURCE: https://coherent-labs.com/blog/inside-coherent-labs/taking-the-next-step-а-new-brand-identity-for-coherent-labs/#the-initial-goal]
## Taking the Next Step: A New Brand Identity for Coherent Labs: The initial goal
Back in 2012, four developers with years of experience in the gaming industry came up with an innovative idea for game UI creation. Through the use of modern web technologies like HTML5, they wanted to help both designers and developers make stunning and powerful interfaces, without limiting the game’s creativity and performance. Four generations of Coherent Labs products later, we can safely say that the initial goal has been achieved!
In the beginning, the company’s brand identity was assembled bit by bit and using the resources available at hand. In fact, almost all aspects of our identity were created by friends, including our logo. The idea for it was pretty simple – the name in a thick, techy font. The website was fairly modest and we hardly had any presence on social networks. At the time, all of the efforts went into making the most advanced software for game UI development, while the brand and visual identity were put on the back burner.
#####
---
[SOURCE: https://coherent-labs.com/blog/inside-coherent-labs/taking-the-next-step-а-new-brand-identity-for-coherent-labs/#who-are-we-today]
## Taking the Next Step: A New Brand Identity for Coherent Labs: Who are we today
As time passed, Coherent Labs grew from just a few employees to a team of over 50 motivated people! Today, we are proud to offer the best UI solution and be a reliable partner of more than 200 game studios. Hard work and customer feedback helped us grow from a small tech startup to a mature company that teams up with the leaders in the game industry and plays a role in some of the most popular games made in recent history – like PUBG and Sea of Thieves.
We wanted to mark this important transition and announce that we are working on a fresh new brand identity! We have many exciting news and updates coming up as we want to make you a part of the process and have your valuable feedback. If you want to stay up to date, follow us on social media.
## We are ready for takeoff! See you soon in our new virtual home
## On this page
---
[SOURCE: https://coherent-labs.com/blog/news/custom-components-with-shadow-dom/]
## Custom components with Shadow DOM-Now available in Gameface!
## Custom components with Shadow DOM-Now available in Gameface!
news
1/20/2025
Martin Bozhilov
1. Overview
2. Usage
3. Project setup
4. Inventory component
1. Adding markup to the shadow root
2. Component Logic
5. The rest of the components
1. Inventory item
2. Inventory weapon
3. Inventory consumable
6. Bringing it all together
7. In conclusion
8. Sample location
Learn how to create game inventory with the newly added `Shadow DOM` feature in Gameface!
---
[SOURCE: https://coherent-labs.com/blog/news/custom-components-with-shadow-dom/#overview]
## Custom components with Shadow DOM-Now available in Gameface!: Overview
With version 1.61, Gameface now has [Shadow DOM ](https://developer.mozilla.org/en-US/docs/Web/API/Web_components/Using_shadow_DOM)support for [custom elements ](https://developer.mozilla.org/en-US/docs/Web/API/Web_components/Using_custom_elements), bringing a robust way to encapsulate styles and markup. Shadow DOM is a core feature of the modern Web Components standard, providing a mechanism to attach a hidden DOM tree to an element—effectively shielding the element’s structure, style, and behavior from the rest of the page. This encapsulation ensures that the component’s internal layout and styles are self-contained and do not leak or clash with other parts of the application.
---
[SOURCE: https://coherent-labs.com/blog/news/custom-components-with-shadow-dom/#usage]
## Custom components with Shadow DOM-Now available in Gameface!: Usage
To showcase the power and usability of the Shadow DOM, we will create a simple inventory menu with custom elements. In this inventory, players will be able to:
- Open/close the inventory
- View an item’s description
- Equip or consume an item
The entire UI will be built with custom elements, using only vanilla JavaScript features.
---
[SOURCE: https://coherent-labs.com/blog/news/custom-components-with-shadow-dom/#project-setup]
## Custom components with Shadow DOM-Now available in Gameface!: Project setup (1/2)
For this project, we are going to utilize [data binding ](https://docs.coherent-labs.com/cpp-gameface/integration/ui_scripting/htmldatabinding/). We’ll also mock game data with a model containing all the necessary information for the inventory.
**Click to reveal model**
The inventory items will have an id, name and path to an image.
Additionally, we wil define a field with the number of available inventory slots.
---
[SOURCE: https://coherent-labs.com/blog/news/custom-components-with-shadow-dom/#project-setup]
## Custom components with Shadow DOM-Now available in Gameface!: Project setup (2/2)
```js
(() => {
engine.createJSModel('InventoryItems', {
list: {
'icon_Axe_1_Small': {
typeId: 0,
name: 'Axe 1',
image: './images/icon_Axe_1_Small.png'
},
'icon_Axe_2_Small': {
typeId: 0,
name: 'Axe 2',
image: './images/icon_Axe_2_Small.png'
},
'icon_Axe_3_Small': {
typeId: 0,
name: 'Axe 3',
image: './images/icon_Axe_3_Small.png'
},
'icon_Book_Small': {
typeId: 1,
quantity: 8,
name: 'Book',
image: './images/icon_Book_Small.png'
},
'icon_Bracelet_Small': {
typeId: 0,
name: 'Bracelet',
image: './images/icon_Bracelet_Small.png'
},
'icon_Dagger_Small': {
typeId: 0,
name: 'Dagger',
image: './images/icon_Dagger_Small.png'
},
'icon_HealthPotion_Small': {
typeId: 1,
quantity: 10,
name: 'HealthPotion',
image: './images/icon_HealthPotion_Small.png'
},
'icon_PoisonVial_Small': {
typeId: 1,
quantity: 2,
name: 'PoisonVial',
image: './images/icon_PoisonVial_Small.png'
},
'icon_Ring1_Small': {
typeId: 0,
quantity: 5,
name: 'Ring 1',
image: './images/icon_Ring1_Small.png'
},
'icon_Ring2_Small': {
typeId: 1,
quantity: 5,
name: 'Ring 2',
image: './images/icon_Ring2_Small.png'
},
'icon_Scroll1_Small': {
typeId: 1,
quantity: 5,
name: 'Scroll 1',
image: './images/icon_Scroll1_Small.png'
},
'icon_Scroll2_Small': {
typeId: 1,
quantity: 5,
name: 'Scroll 2',
image: './images/icon_Scroll2_Small.png'
},
},
inventorySpace: 24,
});
})();
```
---
[SOURCE: https://coherent-labs.com/blog/news/custom-components-with-shadow-dom/#inventory-component]
## Custom components with Shadow DOM-Now available in Gameface!: Inventory component (1/4)
We’ll start with the main UI component: **the inventory component**.
In your project, create a folder named `game-inventory` and place a script.js file inside it. We’ll use a dedicated folder for each component to keep the project organized.
Let’s initialize the `game-inventory` component:
```js
class GameInventory extends HTMLElement {
constructor() {
super();
this.attachShadow({ mode: 'open' });
this.state = {
display: false
};
}
connectedCallback() {}
customElements.define("game-inventory", GameInventory);
```
To enable the Shadow DOM, we must attach the [shadow root ](https://developer.mozilla.org/en-US/docs/Web/API/ShadowRoot)to our custom element.
#### Adding markup to the shadow root
There are several ways to add HTML to your custom elements. We’ll use a straightforward approach: keep the HTML and styles in the script as a string, then append them to the Shadow DOM after initialization.
Let’s create an `inventoryTemplate` variable and assign it the element’s markup.
---
[SOURCE: https://coherent-labs.com/blog/news/custom-components-with-shadow-dom/#inventory-component]
## Custom components with Shadow DOM-Now available in Gameface!: Inventory component (2/4)
```js
let slots = "";
for (let i = 0; i < InventoryItems.inventorySpace; i++) {
slots += '';
}
const inventoryTemplate = `
Left click on an item to show details.Right click on an item to use/equip.
${slots}
`
```
Now in the `connectedCallback` method—which is called when the component is added to the DOM—we’ll append the template to the Shadow DOM:
```js
connectedCallback() {
this.shadowRoot.innerHTML = inventoryTemplate;
this.onTemplateLoaded();
}
```
---
[SOURCE: https://coherent-labs.com/blog/news/custom-components-with-shadow-dom/#inventory-component]
## Custom components with Shadow DOM-Now available in Gameface!: Inventory component (3/4)
We’ve also added a `onTemplateLoaded` method, where we will initialize the component’s logic after the HTML has been attached.
That’s it for the element’s markup! Thanks to the Shadow DOM, the component’s styles and markup are now encapsulated inside the game-inventory element.
#### Component Logic
To complete the inventory we’ll need to add the following methods.
- `addInventoryItems` - adds the items from the `InventoryItems` model to the Inventory
- `addInventoryItem` - adds a single item
- `addItemAt` - adds an item at a specific slot
- `findFreeSocketId` - finds the id of a socket that has no item in it
- `isSocketFree` - checks if a socket has an item in it
- `toggle` - shows/hiddes the inventory
- `onTemplateLoaded` - Inits inventory logic
**Click to view source**
---
[SOURCE: https://coherent-labs.com/blog/news/custom-components-with-shadow-dom/#inventory-component]
## Custom components with Shadow DOM-Now available in Gameface!: Inventory component (4/4)
```js
/**
* Adds the inventory items to the inventory.
* InventoryItems is the data binding model registered in the global
* namespace by Gameface.
*/
addInventoryItems() {
const itemsIds = Object.keys(InventoryItems.list);
for (let itemId of itemsIds) {
this.addInventoryItem(InventoryItems.list[itemId], itemId);
}
}
/**
* Creates an inventory item instance and adds it into an available slot
* in the inventory.
* @param {Object} item - the inventory item from the model (InventoryItems)
* @param {string} itemId - the item's identifier
* @param {number} [socketId=0] - the inventory socket's id into which the
* item should added. The default is 0 - this will add it in the next free socket.
*/
addInventoryItem(item, itemId, socketId = 0) {
let WrappedComponent = 'inventory-consumable';
if (item.typeId === 0) WrappedComponent = 'inventory-weapon';
const inventoryItem = document.createElement('inventory-item');
inventoryItem.socket = socketId;
inventoryItem.itemid = itemId;
inventoryItem.imageurl = `{{InventoryItems.list.${itemId}.image}}`;
inventoryItem.description = item.name;
inventoryItem.WrappedComponent = WrappedComponent;
this.addItemAt(inventoryItem, socketId);
}
/**
* Adds an inventory item instance to a given inventory socket.
* @param {Object} item - the inventory item from the model (InventoryItems)
* @param {number} socketId - the inventory socket's id into which the
* item should added
*/
addItemAt(item, socketId) {
const itemSlotElements = this.shadowRoot.querySelectorAll('.inventory-slot');
if (!this.isSocketFree(socketId)) socketId = this.findFreeSocketId();
this.itemSlots[socketId] = socketId;
itemSlotElements[socketId].appendChild(item);
}
/**
* Finds the first free inventory socket.
* @returns {number} - the id of the socket.
*/
findFreeSocketId() {
for (let i = 0; i < this.itemSlots.length; i++) {
if (this.itemSlots[i] === undefined) return i;
}
}
/**
* Checks if an inventory socket with a given id is free.
* @returns {boolean} - true if it's free, false if it's not
*/
isSocketFree(socketId) {
return this.itemSlots[socketId] === undefined;
}
/**
* Toggles the inventory instance.
*/
toggle() {
this.state.display = !this.state.display;
this.classList.toggle('hidden', !this.state.display);
}
/**
* Called when the component's template was loaded.
*/
onTemplateLoaded() {
this.itemSlots = new Array(slots.length);
this.addInventoryItems();
this.classList.toggle('hidden', !this.state.display);
}
```
---
[SOURCE: https://coherent-labs.com/blog/news/custom-components-with-shadow-dom/#the-rest-of-the-components]
## Custom components with Shadow DOM-Now available in Gameface!: The rest of the components (1/6)
We’ll create the other custom elements in this UI using the same approach: defining a template string and appending it to the element’s Shadow DOM (where applicable).
#### Inventory item
The inventory item will have a details panel that opens on click.
Inventory items will of two types - consumable and weapon. Where the consumable item will have quantity and the weapon - won’t. We’ll be making new components for the weapon and consumable that will be wrapped in an `inventory-item` in order to share functionality. The `inventory-item` will populate itself with either a weapon or a consumable depending on the type of the current item.
**Note**: The `inventory-item` component doesn’t contain its own markup since it acts solely as a functionality wrapper, so we won’t use the Shadow DOM there.
**Click to reveal component’s implementation**
We will define the following methods:
- `setup` - Will collect the item’s info and create the child component depending on it’s category
- `createModal` - Creates the modal element that will show the details of each inventory item
- `showDetailsModal` - Creates the modal and appends it to the page with the correct item’s information
---
[SOURCE: https://coherent-labs.com/blog/news/custom-components-with-shadow-dom/#the-rest-of-the-components]
## Custom components with Shadow DOM-Now available in Gameface!: The rest of the components (2/6)
```js
class InventoryItem extends HTMLElement {
constructor() {
super();
this.onClick = () => this.showDetailsModal();
}
connectedCallback() {
this.classList.add('inventory-item');
this.details = document.getElementById("details-container");
this.setup();
}
setup() {
const wrappedComponent = document.createElement(this.WrappedComponent);
wrappedComponent.itemid = this.itemid;
wrappedComponent.imageurl = this.imageurl;
wrappedComponent.description = this.description;
wrappedComponent.onClick = this.onClick;
this.appendChild(wrappedComponent);
}
/**
* Creates modal containing the item's information
* @returns {HTMLElement} modal
*/
createModal() {
const modal = document.createElement('div');
modal.className = 'modal';
const header = document.createElement('div');
header.className = 'modal-header';
header.textContent = this.description;
modal.appendChild(header);
const content = document.createElement('div');
content.className = 'modal-content';
modal.appendChild(content);
const imageItem = document.createElement('div');
imageItem.style.backgroundImage = `url(${InventoryItems.list[this.itemid].image})`;
imageItem.className = 'info-image';
content.appendChild(imageItem);
const itemDescription = document.createElement('div');
itemDescription.textContent = 'Item description';
content.appendChild(itemDescription);
const closeBtn = document.createElement('div');
closeBtn.className = 'close-x';
closeBtn.addEventListener('click', () => modal.classList.remove('visible'))
modal.appendChild(closeBtn)
return modal;
}
/**
* Creates and appends a modal element to the detail's container
*/
showDetailsModal() {
const modal = this.createModal();
const detailsContainer = document.getElementById('details-container');
detailsContainer.innerHTML = '';
detailsContainer.appendChild(modal);
modal.classList.add('visible');
}
}
customElements.define('inventory-item', InventoryItem);
```
---
[SOURCE: https://coherent-labs.com/blog/news/custom-components-with-shadow-dom/#the-rest-of-the-components]
## Custom components with Shadow DOM-Now available in Gameface!: The rest of the components (3/6)
#### Inventory weapon
The weapon component is going to have logic for setting up the content - the image and the description and a method for equipping. We will set up the content and attach the event listeners in the `connectedCallback`. Apart from that we’ll also need to call `engine.synchronizeModels()` to make sure that the data binding attributes are updated.
We will define the following methods:
- `setupContent` - Sets the html content of the weapon item and sets the data-binding attributes.
- `equip` - Equips the weapon by setting its `equipped` property to `true`.
Remember, because elements in the Shadow DOM are scoped to that shadow root, we must query them with `this.shadowRoot.querySelector` instead of the global `document.querySelector`.
---
[SOURCE: https://coherent-labs.com/blog/news/custom-components-with-shadow-dom/#the-rest-of-the-components]
## Custom components with Shadow DOM-Now available in Gameface!: The rest of the components (4/6)
```js
const weaponTemplate = `
`;
class InventoryWeapon extends HTMLElement {
constructor() {
super();
this.attachShadow({ mode: 'open' });
this.onClickBound = (e) => {
if (e.button === 2) return this.equip();
// on click is assigned in InventoryItem
this.onClick();
};
}
connectedCallback() {
this.shadowRoot.innerHTML = weaponTemplate;
this.setupContent();
this.addEventListener('mousedown', this.onClickBound);
engine.synchronizeModels();
}
/**
* Sets the html content of the consumable item and sets the data binding attributes.
*/
setupContent() {
this.classList.add('inventory-weapon');
this.shadowRoot.querySelector('.image')
.setAttribute('data-bind-style-background-image-url', this.imageurl);
this.shadowRoot.querySelector('.weapon')
.setAttribute('data-bind-class-toggle', `disabled:{{InventoryItems.list.${this.itemid}.equipped}} == true`);
}
/**
* Equips the weapon by setting its equipped property to true.
*/
equip() {
if (InventoryItems.list[this.itemid].equipped) return;
InventoryItems.list[this.itemid].equipped = true;
engine.updateWholeModel(InventoryItems);
engine.synchronizeModels();
}
}
customElements.define('inventory-weapon', InventoryWeapon);
```
---
[SOURCE: https://coherent-labs.com/blog/news/custom-components-with-shadow-dom/#the-rest-of-the-components]
## Custom components with Shadow DOM-Now available in Gameface!: The rest of the components (5/6)
#### Inventory consumable
Similar to the weapon component, the consumable component is also an inventory item, but the right-click interaction uses one of the consumables instead of equipping it. Its template differs slightly by including a quantity badge.
We will define the following methods:
- `setupContent` - Sets the HTML content of the consumable item and sets the data binding attributes.
- `use` - Decreases the consumable’s quantity by 1 when used.
**Click to reveal component’s implementation**
---
[SOURCE: https://coherent-labs.com/blog/news/custom-components-with-shadow-dom/#the-rest-of-the-components]
## Custom components with Shadow DOM-Now available in Gameface!: The rest of the components (6/6)
```js
const consumableTemplate = `
`;
class InventoryConsumable extends HTMLElement {
constructor() {
super();
this.attachShadow({ mode: 'open' });
this.onClickBound = (e) => {
if (InventoryItems.list[this.itemid].quantity === 0) return;
// right mouse button
if (e.button === 2) return this.use();
this.onClick();
};
}
connectedCallback() {
this.shadowRoot.innerHTML = consumableTemplate;
this.setupContent();
this.addEventListener('mousedown', this.onClickBound);
engine.synchronizeModels();
}
/**
* Sets the html content of the consumable item and sets the data binding attributes.
*/
setupContent() {
this.classList.add('inventory-consumable');
this.shadowRoot.querySelector('.image').setAttribute('data-bind-style-background-image-url', this.imageurl);
this.shadowRoot.querySelector('.consumable').setAttribute('data-bind-class-toggle', `disabled:{{InventoryItems.list.${this.itemid}.quantity}} == 0`);
this.shadowRoot.querySelector('.quantity').setAttribute('data-bind-value', `{{InventoryItems.list.${this.itemid}.quantity}}`);
}
/**
* Uses one of the consumable items by decreasing its quantity by 1.
*/
use() {
InventoryItems.list[this.itemid].quantity -= 1;
engine.updateWholeModel(InventoryItems);
engine.synchronizeModels();
}
}
customElements.define('inventory-consumable', InventoryConsumable);
```
---
[SOURCE: https://coherent-labs.com/blog/news/custom-components-with-shadow-dom/#bringing-it-all-together]
## Custom components with Shadow DOM-Now available in Gameface!: Bringing it all together (1/4)
After setting up our custom components, the last step is to bring everything together.
First, create an `index.html` file and import the `cohtml.js` file, the previously created model, and all your custom elements:
```html
Game inventory
```
Next, let’s create a button to toggle the inventory, as well as add our `game-inventory` element—the main entry point for this project’s logic:
```html
Open Inventory
```
---
[SOURCE: https://coherent-labs.com/blog/news/custom-components-with-shadow-dom/#bringing-it-all-together]
## Custom components with Shadow DOM-Now available in Gameface!: Bringing it all together (2/4)
Finally, add some basic styles for the toggle button and the modal element:
---
[SOURCE: https://coherent-labs.com/blog/news/custom-components-with-shadow-dom/#bringing-it-all-together]
## Custom components with Shadow DOM-Now available in Gameface!: Bringing it all together (3/4)
```css
body {
margin: 0;
background-color: gray;
}
.hidden {
display: none;
}
.button {
color: #ffffff;
width: 261px;
height: 53px;
cursor: pointer;
background-size: contain;
background-repeat: no-repeat no-repeat;
background-image: url(./images/btn_MainMenu_normal.png);
text-align: center;
font-size: 17px;
line-height: 46px;
}
.button:hover {
background-image: url(./images/btn_MainMenu_active.png);
}
.ui {
display: flex;
flex-direction: row;
}
#details-container {
margin-left: 20px;
}
/* ---------------------------------- */
.modal {
background-image: url('./images/bg_MainMenu.png');
background-size: contain;
background-repeat: no-repeat;
padding: 25px;
margin-top: 10px;
display: none;
flex-direction: column;
align-items: center;
position: relative;
color: #ffffff;
width: 300px;
height: 250px;
}
.modal.visible {
display: flex;
}
.modal-header {
font-weight: bold;
margin-bottom: 15px;
}
.info-image {
width: 120px;
height: 120px;
background-size: contain;
background-repeat: no-repeat;
background-position: center;
margin-bottom: 10px;
}
.close-x {
position: absolute;
top: 0;
right: 10px;
width: 35px;
height: 35px;
cursor: pointer;
background-image: url('./images/btn_Close.png');
background-size: contain;
background-repeat: no-repeat;
border: none;
background-color: transparent;
}
.close-x:hover {
background-color: transparent;
background-image: url('./images/btn_Close2.png');
}
```
---
[SOURCE: https://coherent-labs.com/blog/news/custom-components-with-shadow-dom/#bringing-it-all-together]
## Custom components with Shadow DOM-Now available in Gameface!: Bringing it all together (4/4)
With that, our custom-elements-based game inventory UI is finished!
---
[SOURCE: https://coherent-labs.com/blog/news/custom-components-with-shadow-dom/#in-conclusion]
## Custom components with Shadow DOM-Now available in Gameface!: In conclusion
By leveraging custom elements and the Shadow DOM, building modular UI components becomes both simpler and more robust. The level of encapsulation and reusability custom elements provide means you can confidently scale your project and reuse all elements without worrying about conflicting styles or tangled logic.
#### Sample location
You can find the complete sample source within the `${Gameface package}/Samples/uiresources/ComponentsWithShadowDOM` directory.
## On this page
---
[SOURCE: https://coherent-labs.com/blog/news/e2e-testing-framework/]
## Gameface E2E Released
## Gameface E2E Released
news
5/27/2025
Kaloyan Geshev
1. What is Gameface E2E?
2. Features of Gameface E2E
3. Getting Started with Gameface E2E
4. Writing Tests
5. Running the tests
6. Conclusion
We are excited to announce the release of our new end-to-end (E2E) testing framework for Gameface. This powerful tool is designed to streamline the testing process for your game UI, ensuring that everything works as expected before you launch.
---
[SOURCE: https://coherent-labs.com/blog/news/e2e-testing-framework/#what-is-gameface-e2e]
## Gameface E2E Released: What is Gameface E2E?
Gameface E2E is a framework designed for creating and running end-to-end tests for your game UI within Gameface. It simplifies the automation of UI testing, ensuring your interface functions correctly in various scenarios.
Built on the `DevTools` protocol, Gameface E2E integrates seamlessly with Gameface, allowing you to incorporate it into your development workflow effortlessly and begin testing your UI immediately.
---
[SOURCE: https://coherent-labs.com/blog/news/e2e-testing-framework/#features-of-gameface-e2e]
## Gameface E2E Released: Features of Gameface E2E
Gameface E2E offers a variety of features to help you efficiently test your game UI:
- **Automated Testing**: Simulate user interactions like clicking, typing, scrolling, and menu navigation to validate your UI’s behavior in different situations.
- **Parallel Test Execution**: Run multiple tests concurrently to accelerate the testing process, especially beneficial for projects with extensive UI components.
- **Intuitive API**: The framework provides a straightforward and developer-friendly API, enabling quick test creation without requiring deep technical expertise.
- **Customizable Configuration**: Easily set up and tailor the framework to meet your specific testing requirements.
- **Mock Data Testing**: Test your UI with mocked game data to ensure it performs correctly under various input scenarios.
---
[SOURCE: https://coherent-labs.com/blog/news/e2e-testing-framework/#getting-started-with-gameface-e2e]
## Gameface E2E Released: Getting Started with Gameface E2E
The Gameface E2E testing framework is available on [npm ](https://www.npmjs.com/package/gameface-e2e). You can install it using the following command:
```shell
npm install gameface-e2e --save-dev
```
Alternatively, you can install it globally:
```shell
npm install gameface-e2e -g
```
Once installed, you can begin creating tests using the framework’s API. Detailed documentation and API references are available [here ](https://frontend-tools.coherent-labs.com/e2e/getting-started/).
To help you get started, the package includes a collection of example tests located in the `examples` folder.
---
[SOURCE: https://coherent-labs.com/blog/news/e2e-testing-framework/#writing-tests]
## Gameface E2E Released: Writing Tests
Tests are written in `.spec` files using the framework’s API and the [Mocha ](https://mochajs.org/)syntax.
Here is an example of a test file:
```javascript
describe("Test my UI", () => {
it("Should display the correct text", async () => {
const element = await gf.get('.my-element');
const text = await element.text();
assert.equal(text, 'Hello, World!');
});
it("Should update the text when clicked", async () => {
const btn = await gf.get('.my-button');
await btn.click();
const element = await gf.get('.my-element');
const text = await element.text();
assert.equal(text, 'Hello, Gameface!');
});
});
```
---
[SOURCE: https://coherent-labs.com/blog/news/e2e-testing-framework/#running-the-tests]
## Gameface E2E Released: Running the tests
To run your tests, you can use the following command:
```shell
npx gameface-e2e --gamefacePath=${PATH_TO_PLAYER_EXE} --tests=${PATH_TO_SPEC_FILES}
```
or if you have installed the framework globally:
```shell
gameface-e2e --gamefacePath=${PATH_TO_PLAYER_EXE} --tests=${PATH_TO_SPEC_FILES}
```
Where `${PATH_TO_PLAYER_EXE}` is the path to the Gameface player executable and `${PATH_TO_SPEC_FILES}` is the path to your test files.
To simplify the command, you can create a configuration file in the root directory of your project. Name the file `gameface-e2e.config.js` and include the following content:
```javascript
module.exports = {
tests: "examples/**/*.spec.js",
gamefacePath: "C:/Gameface/Player/Player.exe"
}
```
After setting up the configuration file, you can simply execute the following command to run your tests:
```shell
npx gameface-e2e
```
---
[SOURCE: https://coherent-labs.com/blog/news/e2e-testing-framework/#conclusion]
## Gameface E2E Released: Conclusion
The Gameface E2E testing framework is a powerful tool that can help you ensure the quality and reliability of your game UI. With its simple API, automated testing capabilities, and seamless integration with Gameface, you can easily write and run tests to verify that your UI behaves as expected.
You can find the full documentation of the framework and its API [here ](https://frontend-tools.coherent-labs.com/e2e/getting-started/).
## On this page
---
[SOURCE: https://coherent-labs.com/blog/news/emoji-support/]
## Emoji support
## Emoji support
news
1/28/2025
Kaloyan Geshev
1. Overview
2. Usage
1. Importing an emoji font
2. Updating the emoji panel button
3. Making the emojis panel to work with the font
4. Adding emoji to the message input
5. Refactoring the server
3. Conclusion
4. Where you can find the enhanced sample?
---
[SOURCE: https://coherent-labs.com/blog/news/emoji-support/#overview]
## Emoji support: Overview
With version 1.61, Gameface adds support for certain types of emoji fonts. Emojis and colored text glyphs can enhance the visual fidelity of any Web component that includes displaying text. Gameface can now load fonts that contain emoji characters and use them in any text context.
Gameface officially supports the following fonts:
- [EmojiTwoCOLRv0.ttf](https://github.com/Emoji-COLRv0/Emoji-COLRv0/blob/main/fonts/EmojiTwoCOLRv0.ttf)
- [OpenMojiCOLRv0.ttf](https://github.com/Emoji-COLRv0/Emoji-COLRv0/blob/main/fonts/OpenMojiCOLRv0.ttf)
- [TwemojiCOLRv0.ttf](https://github.com/Emoji-COLRv0/Emoji-COLRv0/blob/main/fonts/TwemojiCOLRv0.ttf)
- [Segoe UI Emoji](https://learn.microsoft.com/en-us/typography/font-list/segoe-ui-emoji)
If you require a different emoji font or want to create a custom one, the font file must be in the `COLRV0` format, as curently Gameface supports emoji fonts only in this format.
For more details, check out the [Emoji Support ](https://docs.coherent-labs.com/cpp-gameface/content_development/emojisupport/)section of our documentation.
---
[SOURCE: https://coherent-labs.com/blog/news/emoji-support/#usage]
## Emoji support: Usage (1/7)
To showcase the functionality of emoji fonts, we’ll walk you through updating our Chat emojis sample from the UI tutorials.
The enhancements we will be doing, include:
1. **Rendering emojis directly from a supported emoji font** - You’ll no longer need `SVGs` for emoji rendering. Instead, HTML character codes will render emojis directly, making it simpler to add new emojis to the emoji panel.
2. **Native input field emoji support** - Perhaps the most **exciting enhancement** is the ability to render emojis directly within input fields, whether added via JavaScript or pasted by users.
Previously, the Chat sample used a `:emojicode:` pattern in input fields, which didn’t visually render the emojis:
With emoji fonts, this limitation is resolved. Users will see a real-time preview of emojis in the input field, improving the chat’s user experience:
3. **Simplified server-side processing** - The server no longer needs to match `:emojicode:` patterns and replace them with `SVGs`. Messages will now display emojis rendered directly by the font.
#### Importing an emoji font
To enable usage of certain emojis, you need first to import a `COLRV0` font file. For this guide, we’ll use the [OpenMojiCOLRv0.ttf ](https://github.com/Emoji-COLRv0/Emoji-COLRv0/blob/main/fonts/OpenMojiCOLRv0.ttf)font built using the [https://openmoji.org/](https://openmoji.org) graphics:
---
[SOURCE: https://coherent-labs.com/blog/news/emoji-support/#usage]
## Emoji support: Usage (2/7)
1. Download the font on your machine.
2. Use the `@font-face` CSS rule to import the font.
3. Link the font file using the `src` property and assign it a `font-family`. For example, we’ll name our custom font `OpenMoji`.
4. Apply the font to relevant HTML elements (`html`, `body`, `button`, and `input`) to ensure consistency. **Note that `button` and `input` elements use the system font by default, so explicitly applying the custom font is necessary.**
```css
@font-face {
font-family: OpenMoji;
src: url(./assets/OpenMojiCOLRv0.ttf);
}
html, body, button, input {
font-family: 'Droid Sans', OpenMoji;
}
```
\*\*Note: You need to set the default font-family for Gameface to ‘Droid Sans’, as the OpenMoji font lacks numeric symbols. This ensures numbers properly fall back to the default font. \*\*
Now you’re ready to add emojis to the UI.
#### Updating the emoji panel button
To migrate the `SVG` icon for the emoji panel button, replace it with a direct emoji character in the HTML and remove the associated CSS background image styles.
```html
```
Additionally, use the `coh-font-fit` property to adjust the emoji’s size to automatically fit within the button element. Previously, the `background-image` style used the `contain` property for this purpose.
---
[SOURCE: https://coherent-labs.com/blog/news/emoji-support/#usage]
## Emoji support: Usage (3/7)
You can read more about the `coh-font-fit` custom `CSS` property [here ](https://docs.coherent-labs.com/cpp-gameface/content_development/fonts_frontend/#font-fit-auto-sizing).
```css
.open-emojis-panel-btn {
background-image: url(/assets/emojis-open-panel.svg);
background-color: transparent;
background-size: contain;
coh-font-fit: fit;
border: none;
width: 3.5vh;
height: 3.5vh;
margin-right: 0.5vh;
cursor: pointer;
border-radius: 50%;
}
```
#### Making the emojis panel to work with the font
In the Chat sample, we initially implemented a panel where users could select emojis to include in their messages. Previously, emojis were displayed using `SVG` icons. Now, we’ll enhance this feature by switching to emoji fonts.
To render the emojis in the panel, we initially defined an array containing the paths to the `SVG` icons for each emoji. Then, using `data-bind-for` and `data-bind-style-background-image-url` attributes, we displayed all available emojis in the panel.
Now, we will adjust the array and update the panel in the `HTML` to use emoji fonts.
---
[SOURCE: https://coherent-labs.com/blog/news/emoji-support/#usage]
## Emoji support: Usage (4/7)
```js
const emojis = [
'/assets/emojis/1F600.svg',
'\u{1F600}',
'/assets/emojis/1F601.svg',
'\u{1F601}',
'/assets/emojis/1F602.svg',
'\u{1F602}',
'/assets/emojis/1F603.svg',
'\u{1F603}',
'/assets/emojis/1F604.svg',
'\u{1F604}',
'/assets/emojis/1F605.svg',
'\u{1F605}',
'/assets/emojis/1F923.svg',
'\u{1F923}',
'/assets/emojis/1F642.svg',
'\u{1F642}',
'/assets/emojis/1F643.svg',
'\u{1F643}',
'/assets/emojis/1FAE0.svg',
'\u{1F644}',
'/assets/emojis/1F609.svg',
'\u{1F609}',
'/assets/emojis/1F60A.svg',
'\u{1F60A}',
'/assets/emojis/1F607.svg',
'\u{1F607}',
'/assets/emojis/1F970.svg',
'\u{1F970}',
'/assets/emojis/1F60D.svg',
'\u{1F60D}',
'/assets/emojis/1F929.svg',
'\u{1F929}',
'/assets/emojis/1F618.svg',
'\u{1F618}',
'/assets/emojis/1F617.svg',
'\u{1F617}',
'/assets/emojis/263A.svg',
'\u{263A}',
'/assets/emojis/1F61A.svg',
'\u{1F61A}',
'/assets/emojis/1F619.svg',
'\u{1F619}',
'/assets/emojis/1F972.svg',
'\u{1F973}',
'/assets/emojis/1F60B.svg',
'\u{1F60B}',
];
```
**Click here to see the new JS file without the differences**
---
[SOURCE: https://coherent-labs.com/blog/news/emoji-support/#usage]
## Emoji support: Usage (5/7)
```js
const emojis = [
'\u{1F600}',
'\u{1F601}',
'\u{1F602}',
'\u{1F603}',
'\u{1F604}',
'\u{1F605}',
'\u{1F923}',
'\u{1F642}',
'\u{1F643}',
'\u{1F644}',
'\u{1F609}',
'\u{1F60A}',
'\u{1F607}',
'\u{1F970}',
'\u{1F60D}',
'\u{1F929}',
'\u{1F618}',
'\u{1F617}',
'\u{263A}',
'\u{1F61A}',
'\u{1F619}',
'\u{1F973}',
'\u{1F60B}',
];
```
In the `HTML`, we’ll also update the rendering logic to use the new emoji font approach.
```html
```
This change enables direct rendering of emoji Unicode characters using the `data-bind-html` attribute. Additionally, the `iter` variable now passes the emoji character code directly and this eliminates the need to pass the `index` when clicking an emoji.
#### Adding emoji to the message input
When a user selects an emoji from the panel, it will be inserted at the current caret position in the input field. Since we are now using fonts, we no longer need to insert the pattern `:emojicode:`. Instead, we can directly add the emoji character code, which will be rendered automatically.
Here’s the revised `addEmoji` method:
---
[SOURCE: https://coherent-labs.com/blog/news/emoji-support/#usage]
## Emoji support: Usage (6/7)
```js
function addEmoji(emojiIndex) {
function addEmoji(emojiCodeString) {
const emojiCodeString = `:${emojiIndex}:`;
const newInputSelection = input.selectionStart + emojiCodeString.length;
const inputValue = input.value;
input.value = inputValue.substring(0, input.selectionStart) + emojiCodeString + inputValue.substring(input.selectionEnd, inputValue.length);
input.setSelectionRange(newInputSelection, newInputSelection);
input.focus();
emojisPanel.hide();
}
```
#### Refactoring the server
The Chat sample uses a server to handle message delivery via WebSockets. Previously, the server replaced `:emojicode:` patterns with corresponding `SVG` elements before broadcasting messages. With the new font-based approach, this step is no longer necessary.
Here’s the updated server logic:
```js
const emojis = require('./src/emojisMapServer');
...
socket.on('chat message', (msg) => {
const newMessage = msg.replace(/:[0-9]*:/g, (match) => {
const emojiCode = match.replace(/:/g, '');
return ``;
});
const d = new Date();
const timeStamp = [d.getMonth() + 1, d.getDate(), d.getFullYear()].join('/') + ' ' + [d.getHours(), d.getMinutes(), d.getSeconds()].join(':');
io.emit('chat message', { msg: `
`, id: socket.id });
});
```
---
[SOURCE: https://coherent-labs.com/blog/news/emoji-support/#usage]
## Emoji support: Usage (7/7)
By eliminating the need for `SVG` replacements, we simplify the server logic and improve performance.
---
[SOURCE: https://coherent-labs.com/blog/news/emoji-support/#conclusion]
## Emoji support: Conclusion
These updates enhance the Chat sample by leveraging emoji fonts for rendering emojis in both the panel and the message input. The server logic is also simplified, as it no longer needs to process emoji patterns.
The emoji font support in Gameface is a great feature that can be used in many ways to enhance the visual fidelity of the UI components, including displaying text.
---
[SOURCE: https://coherent-labs.com/blog/news/emoji-support/#where-you-can-find-the-enhanced-sample]
## Emoji support: Where you can find the enhanced sample?
The updated Chat sample is available in the `Samples/uiresources/UITutorials/ChatEmojisWithFonts` folder of the Gameface package.
The original sample using `SVG` emojis can be found in the `Samples/uiresources/UITutorials/ChatEmojis` folder.
## On this page
---
[SOURCE: https://coherent-labs.com/blog/news/gamefaceui-basic-components-announcement/]
## Gameface UI version 1.0.0 released
## Gameface UI version 1.0.0 released
news
7/10/2025
Martin Bozhilov
1. Checkbox
1. Documentation
2. Radio and radio button
1. Documentation
3. Dropdown and Dropdown Options
1. Documentation
4. Stepper and Stepper Items
1. Documentation
5. Segment and Segment Button
1. Documentation
6. Slider
1. Documentation
7. ToggleButton
1. Documentation
8. TextSlider
1. Documentation
9. XYSlider
1. Documentation
10. What’s Next
We’re excited to announce that [**GameFace UI** ](https://gameface-ui.coherent-labs.com/)is growing!\
In this update, we’ve added new components to make your prototyping experience even faster and more flexible.
Below, you’ll find details about the newly introduced components.
---
[SOURCE: https://coherent-labs.com/blog/news/gamefaceui-basic-components-announcement/#checkbox]
## Gameface UI version 1.0.0 released: Checkbox
The `Checkbox` component provides a customizable checkbox input. It supports three states — `checked`, `unchecked`, and `disabled`.
In addition to basic usage, the `Checkbox` component offers flexible slots for deeper customization:
- `Label` slot to customize or reposition the checkbox’s label.
- `Control` slot to style or replace the checkbox control itself.
- `Indicator` slot to modify the checked state indicator.
Programmatic control is also available via a `ref`, allowing developers to retrieve values or set the state of the checkbox through code when needed.
#### Documentation
📚 For more information and detailed examples, please refer to the [Checkbox documentation](https://gameface-ui.coherent-labs.com/components/basic/checkbox/)
---
[SOURCE: https://coherent-labs.com/blog/news/gamefaceui-basic-components-announcement/#radio-and-radio-button]
## Gameface UI version 1.0.0 released: Radio and radio button
The `Radio` component acts as a wrapper that allows you to render a set of mutually-exclusive options `Radio.Buttons`.
The Radio allows you to programmatically control or retrieve the value of the selected option via `ref` or the `onChange` prop.
Just like the `Checkbox`, the `Radio.Button` component offers flexible slots for deeper customization:
- `Label` slot to customize or reposition the checkbox’s label.
- `Control` slot to style or replace the checkbox control itself.
- `Indicator` slot to modify the checked state indicator.
#### Documentation
📚 For more information and detailed examples, please refer to the [Radio ](https://gameface-ui.coherent-labs.com/components/basic/radio/)and [Radio.Button ](https://gameface-ui.coherent-labs.com/components/basic/radio-button/)documentations.
---
[SOURCE: https://coherent-labs.com/blog/news/gamefaceui-basic-components-announcement/#dropdown-and-dropdown-options]
## Gameface UI version 1.0.0 released: Dropdown and Dropdown Options
The `Dropdown` component lets you display a list of selectable options, making it ideal for menus, filters, or game settings.
Key features include:
- **Scrollable options list:** If there are too many options, the list becomes scrollable.
- **Programmatic control:** Use a `ref` or the `onChange` prop to get or set the selected value.
The `Dropdown` component also supports several slots for customization:
- `Trigger`: Customize the dropdown’s trigger button.
- `Placeholder`: Show a placeholder when no option is selected.
- `Icon`: Add or customize the icon inside the trigger.
- `Track`: Customize the scroll track of the dropdown.
- `Handle`: Customize the scroll handle.
These features make the `Dropdown` component flexible and easy to adapt to your UI needs.
#### Documentation
📚 For more information and usage examples, please refer to the [Dropdown documentation ](https://gameface-ui.coherent-labs.com/components/basic/dropdown/)and [Dropdown.Options documentation ](https://gameface-ui.coherent-labs.com/components/basic/dropdown-options/).
---
[SOURCE: https://coherent-labs.com/blog/news/gamefaceui-basic-components-announcement/#stepper-and-stepper-items]
## Gameface UI version 1.0.0 released: Stepper and Stepper Items
The `Stepper` component lets users move through a sequence of options, one at a time.
You can control the `Stepper` programmatically using a `ref` or the `onChange` prop to get or set the current value.
For customization, the `Stepper` provides a `Control` slot. This slot allows you to style or reposition the arrow buttons—place them before or after the stepper options as needed.
To define the selectable options, use the `Stepper.Items` component inside `Stepper`, with each option represented by a `Stepper.Item`.
#### Documentation
📚 For more details and examples, see the [Stepper documentation ](https://gameface-ui.coherent-labs.com/components/basic/stepper/)and [Stepper.Items documentation ](https://gameface-ui.coherent-labs.com/components/basic/stepper-items/).
---
[SOURCE: https://coherent-labs.com/blog/news/gamefaceui-basic-components-announcement/#segment-and-segment-button]
## Gameface UI version 1.0.0 released: Segment and Segment Button
The `Segment` component displays a group of mutually exclusive options, similar to the `Radio` component. Users can select only one option at a time.
You can control the selected value programmatically using a `ref` or the `onChange` prop.
For customization, the `Segment` component provides an `Indicator` slot. This slot lets you style the indicator element, which animates when the selected option changes.
To define the selectable options, use the `Segment.Button` component for each option.
#### Documentation
📚 For more information and detailed examples, see the [Segment documentation ](https://gameface-ui.coherent-labs.com/components/basic/segment/)and [Segment.Button documentation ](https://gameface-ui.coherent-labs.com/components/basic/segment-button/).
---
[SOURCE: https://coherent-labs.com/blog/news/gamefaceui-basic-components-announcement/#slider]
## Gameface UI version 1.0.0 released: Slider
The `Slider` component lets users select a numeric value from a defined range by dragging a handle along a track.
Key features:
- **Customizable range:** Set `min` and `max` values to define the slider’s limits.
- **Step control:** Specify the increment between values using the `step` prop.
- **Grid display:** Optionally show tick marks along the track.
- **Programmatic control:** Access or update the value via a `ref` or the `onChange` prop.
The `Slider` component offers several slots for advanced customization:
- `Track`: Customize the appearance of the slider track.
- `Fill`: Style the filled portion of the track.
- `Handle`: Change the look of the draggable handle.
- `Thumb`: Display the current value above the handle.
- `Grid`: Show tick marks or value indicators along the track.
These features make the `Slider` component highly adaptable for different UI needs.
#### Documentation
📚 For more details and examples, see the [Slider documentation](https://gameface-ui.coherent-labs.com/components/basic/slider/)
---
[SOURCE: https://coherent-labs.com/blog/news/gamefaceui-basic-components-announcement/#togglebutton]
## Gameface UI version 1.0.0 released: ToggleButton
The `ToggleButton` component is a flexible UI control that lets users switch between two states, such as “on” and “off.”
Key features and customization slots include:
- `LabelLeft`: Customize the label displayed on the left side of the toggle.
- `LabelRight`: Customize the label displayed on the right side of the toggle.
- `Control`: Change the appearance of the toggle button in its unchecked state.
- `Indicator`: Style the indicator that appears when the toggle is active.
- `Handle`: Customize the handle that users drag to toggle the state.
You can also control the `ToggleButton` programmatically using a `ref`, allowing you to get or set its state in your code.
#### Documentation
📚 For more information and detailed examples, see the\
[ToggleButton documentation](https://gameface-ui.coherent-labs.com/components/basic/toggle-button/)
---
[SOURCE: https://coherent-labs.com/blog/news/gamefaceui-basic-components-announcement/#textslider]
## Gameface UI version 1.0.0 released: TextSlider
The `TextSlider` component allows users to select a string value from a list of predefined options by dragging a handle along a track.
Key features:
- **Programmatic control:** Easily get or set the selected value using a `ref` or the `onChange` prop.
The `TextSlider` component supports several slots for customization:
- `Track`: Change the appearance of the slider track.
- `Fill`: Style the filled portion of the track.
- `Handle`: Customize the draggable handle.
- `Thumb`: Show the current value above the handle.
- `Pol`: Adjust the look of the poles that mark each selectable value.
#### Documentation
📚 For more details and examples, see the [TextSlider documentation](https://gameface-ui.coherent-labs.com/components/basic/text-slider/)
---
[SOURCE: https://coherent-labs.com/blog/news/gamefaceui-basic-components-announcement/#xyslider]
## Gameface UI version 1.0.0 released: XYSlider
The `XYSlider` component lets users select a value within a two-dimensional space, making it ideal for scenarios where both horizontal and vertical input are needed.
Key features:
- **Customizable range:** Define the slider’s limits using `minX`, `maxX`, `minY`, and `maxY` props.
- **Custom background:** Easily change the background to fit your UI.
- **Programmatic control:** Use a `ref` or the `onChange` prop to get or set the current value.
The `XYSlider` component provides slots for advanced customization:
- `Background`: Change the appearance of the slider’s background.
- `Handle`: Customize the look and feel of the draggable handle.
These features make the `XYSlider` component flexible and easy to adapt to your UI needs.
#### Documentation
📚 For more details and examples, see the [XYSlider documentation](https://gameface-ui.coherent-labs.com/components/basic/xy-slider/)
#### What’s Next
We’re continuously expanding the Gameface UI component library! Stay tuned for upcoming releases featuring even more components.
## On this page
---
[SOURCE: https://coherent-labs.com/blog/news/gamefaceui-beta/]
## Gameface UI Beta Released
## Gameface UI Beta Released
news
3/11/2025
Mihail Todorov
1. What is GamefaceUI?
1. Why SolidJS?
2. Why is this a beta release?
3. How to use GamefaceUI?
1. Using the boilerplate
2. Using the components only
We are thrilled to announce the beta release of GamefaceUI, our state-of-the-art prototyping tool.
---
[SOURCE: https://coherent-labs.com/blog/news/gamefaceui-beta/#what-is-gamefaceui]
## Gameface UI Beta Released: What is GamefaceUI?
[GamefaceUI ](https://github.com/CoherentLabs/Gameface-UI/)is a comprehensive collection of components designed to simplify the prototyping of game user interfaces. Built on the [SolidJS ](https://www.solidjs.com/)framework, it provides users with a fast and efficient way to kickstart their projects.
#### Why SolidJS?
SolidJS is a modern JavaScript framework for building user interfaces. We chose it for our prototyping tool for several reasons:
1. **Performance**: SolidJS is engineered for high performance. It employs fine-grained reactivity, updating only the necessary parts of the DOM, resulting in faster rendering and lower memory usage compared to frameworks like React.
2. **Reactivity Model**: SolidJS’s reactivity model is straightforward and intuitive. It uses reactive primitives that are easy to understand and work with.
3. **Simplicity**: SolidJS offers a simpler API and fewer concepts to learn compared to other frameworks, making it easier for new or less experienced users to get started and be productive quickly.
4. **No Virtual DOM**: Unlike React, SolidJS does not use a virtual DOM. Instead, it compiles templates to real DOM operations, leading to better performance and more predictable behavior.
---
[SOURCE: https://coherent-labs.com/blog/news/gamefaceui-beta/#why-is-this-a-beta-release]
## Gameface UI Beta Released: Why is this a beta release?
In this beta release, we are introducing the core components essential for building your UI layouts. We plan to expand the component library and continuously improve based on user feedback. Your insights will be crucial in refining and enhancing GamefaceUI’s design and functionality.
---
[SOURCE: https://coherent-labs.com/blog/news/gamefaceui-beta/#how-to-use-gamefaceui]
## Gameface UI Beta Released: How to use GamefaceUI?
To use the components, you have two options: you can either download the complete boilerplate template that uses SolidJS with TypeScript and Vite, or integrate them into an existing SolidJS project.
#### Using the boilerplate
To get started with the boilerplate, navigate to the directory where you want to set up your UI and run the following command:
```bash
npx degit CoherentLabs/Gameface-UI
```
This command will download the entire boilerplate into your current directory.
If you prefer to create a new directory for the boilerplate, use:
```bash
npx degit CoherentLabs/Gameface-UI NEW_FOLDER
```
Where `NEW_FOLDER` is the name of your new folder.
#### Using the components only
If you already have a SolidJS project set up, you can directly integrate the components. Simply create a new folder for the components and run the following command inside it:
```bash
npx degit CoherentLabs/Gameface-UI/src/components
```
## On this page
---
[SOURCE: https://coherent-labs.com/blog/news/html-is-the-best-alternative-to-scaleform/]
## HTML is the best alternative to Scaleform
## HTML is the best alternative to Scaleform
news
11/26/2018
Alexandra Ivanov
1. Same workflow, faster development
On Wednesday, Autodesk announced their decision to no longer offer Scaleform for purchase. This marks the end of an era in UI game development, shaking up the community and leaving developers with no other option.
However, a great Scaleform alternative already exists on the market and it has been steadily taking over UI development for some time. Coherent Labs’ products - Coherent GT and Hummingbird, support the same workflow and features, making them the best Scaleform alternative on the market. Both products offer a smooth transition from Scaleform and allow the user to preserve and continue their work without the need for any additional changes. The standard HTML5 allows easily to manipulate and experiment, instantly seeing the effect. We have created high-performance binding, scripting, and rendering on all platforms, compatible with modern multi-threaded, data-oriented engine architectures.
---
[SOURCE: https://coherent-labs.com/blog/news/html-is-the-best-alternative-to-scaleform/#same-workflow-faster-development]
## HTML is the best alternative to Scaleform: Same workflow, faster development
Our data-binding systems allows you to efficiently synchronize the state of the UI with the game. The programmers can expose the game data for the designers so they can directly use it in the UI. Even complex use cases such as populating a list of inventory items become easily achievable.
All products offered by Coherent Labs empower teams by eliminating dependencies between team members and improving iteration time by letting them work independently of one another. Front-end designers can test their work even without the game running. They can simulate real interactions with the game by mocking all of the game data. Furthermore, changes to the UI can be applied even while the game is running and the UI has already been loaded. Programmers need a few hours to setup the data binding for the UI designers.
Many studios foresaw thе end of Scaleform and Flash-based technologies, already converting to Coherent GT and Hummingbird. Our team is ready to assist everyone who is interested in making the same transition by providing the necessary support.
## On this page
---
[SOURCE: https://coherent-labs.com/blog/news/on-the-road-to-html5/]
## On the road to HTML5 (1/4)
## On the road to HTML5
news
7/28/2017
Alexandra Ivanov
After Autodesk’s announcement that they are stopping the support of Scaleform and will no longer provide the product for purchase, Adobe surprised the community with its announcement: Flash will be phased out in the next 2 years. The recent events left many developers concerned about the future of their professional careers as interactive and UI professionals. Companies were also directly affected by the two announcements and are now searching for alternatives to Flash and Scaleform that can provide them with the same features, tools, and workflow, simultaneously preserving the investment that have previously been made.
The founding goal of Coherent Labs was to build the best technology and tools for game UI and interactive applications. After carefully analyzing the competition in the face of Scaleform, based on Flash, a decision was made to base the company’s technology on HTML5. Through the years, this decision became more and more justified as the popularity of Flash was steadily declining while that of HTML5 was evolving.
Most of the features previously present only in Flash are now supported in HTML5 and the list keeps growing. A lot has already been written in the posts by Mozilla, Apple and Google. Recently, the number of people using Flash technology has significantly declined, which can be seen from Google’s graph below:
Flash usage over a three-year period, taken from Google’s article
---
[SOURCE: https://coherent-labs.com/blog/news/on-the-road-to-html5/]
## On the road to HTML5 (2/4)
The Adobe Flash plugin itself has been already removed or made optional in the major browsers for years. According to Kongregate, one of the most prominent portals for online games, Flash already is replaced by HTML5.
The split of monthly uploads to Kongregate.com among HTML (.html), Flash (.swf), and Unity WebPlayer (.unity3d), taken from [Kongregate’s article ](http://blog.kongregate.com/html5-is-here/).
The best thing about Flash was how enabling the technology was for creators and the variety of powerful developer tools it provided. That workflow is not going away – Adobe CC (former Adobe Flash) and Animate are actively been developed by Adobe and in fact, already have been exporting to HTML5 for some time. Companies and professionals will be able to keep their skills and tools as well as workflow, but take advantage of the future improvements empowered by the HTML5 platform and standard.
---
[SOURCE: https://coherent-labs.com/blog/news/on-the-road-to-html5/]
## On the road to HTML5 (3/4)
As our products are based on HTML5 technology, our team makes sure that developers are getting the optimal performance and using all the advantages of the underlying platform. That is why we have developed a plugin for enhanced HTML5 export. By default, Animate uses canvas and JS to emulate features. We map features to clean and standard HTML5 to provide many benefits to developers – better performance, cleaner, smaller code, and ability to directly connect the game objects to the UI. Some of our customers have already migrated 100% of their existing Scaleform UIs to Coherent GT and Hummingbird. Additionally, to the many new HTML5 features, such as styling and modern JavaScript, they got deeper integration with all popular game engines and multi-platform support, even for platforms where Flash was not available, like consoles or IOS.
As with any change, there are some challenges in migrating from Scaleform and Flash to HTML5. First, many projects have used Actionscript to achieve things like tween and animations along with advanced UI controls functionality. Unfortunately, those libraries cannot be directly used. In most cases there is already an existing HTML5 functionality, obsoleting the need for such libraries like WebAnimation, which is an existing HTML5 API. Using such APIs has the additional benefits of smaller and simpler code that directly provides the platform features. An additional benefit is better performance and enables users to GPU accelerate the graphics. Other libraries like Box2D have their JavaScript alternatives that can be directly used.
---
[SOURCE: https://coherent-labs.com/blog/news/on-the-road-to-html5/]
## On the road to HTML5 (4/4)
Another popular use of Flash was to play videos, and specifically DRM-protected content. That is no longer the case as current browsers now support EME and can directly play the protected content.
If developers positively want to keep using Flash, there are a few open source implementations that can partially play Flash content. For instance, you can look at Haxe or OpenFL.
If you have an existing Flash or Scaleform project and would like to learn how to convert it to a modern technology and keep the workflow as well as investment, please contact us to learn how .
Our team can assist you in migrating both small and extensive projects from Scaleform/Flash.
## On this page
---
[SOURCE: https://coherent-labs.com/blog/news/say-hi-our-new-coherent-brand/]
## Say hi, new coherent brand! (1/3)
## Say hi, new coherent brand!
news
6/6/2019
Alexandra Ivanov
In order to understand why we decided to rebrand, we want to give you a bit of a background perspective on who we are and how we ended up here. Coherent Labs was created in 2012 by four programmers who decided that they can come up with a better solution for UI creation than what was already on the market. Since the beginning, the company has grown to over 40 people and has released multiple generations of products that are used by some of the most renowned game development studios in the world.
Since the main focus during the first few years was creating products that solve hard technological problems rather than developing a marketing strategy, our brand was not very coherent (pun intended). That, coupled with the otherwise great additions to our product line, led to some confusion among our customers on what each product offered.
Another reason behind our rebranding is the meaning behind the name Coherent Labs:
- logical = our workflow and the way we create our software
- consistent = our business relationships with our clients and partners
- forming a unified whole = our holistic approach: we offer technical expertise, support, and development on demand
- the scientific and meticulous approach with which we tackle challenges on a daily basis = we’re basically scientists but instead of mixing potions, we use HTML5 to make the magic happen 🙂
---
[SOURCE: https://coherent-labs.com/blog/news/say-hi-our-new-coherent-brand/]
## Say hi, new coherent brand! (2/3)
Along with our new appearance, for which we have industry experts Battalion to thank (you might know some of their clients - SoundCloud, for example) we now have a streamlined product line which is based on our client-centric approach. We have always listened to what our customers and partners had to say and taken everything, good or bad, to heart. In the past, we’ve marketed our products based on how we made them. Different companies make games differently, with each studio having a preferred approach. We want to make everyone’s jobs easier and we want our software to alleviate some of the major pressure points in making UI (a developer - artist collaboration, for example). This is reflected in our 2 new products - Coherent Gameface and Coherent Prysm, which differ in the type of workflow a company prefers, and not in the underlying technology.
Coherent Gameface is the latest CL tech meant for people with web development experience who like to use modern HTML5, JavaScript and CSS and like to do their coding by hand while also utilizing modern libraries like React.jsCoherent Prysm is made to be used with a visual workflow in mind and requires writing minimal to no amount of code. With it, you can use the power of Adobe Animate and create more complex compositions. And the output is still HTML/CSS/JS, and not Flash.
---
[SOURCE: https://coherent-labs.com/blog/news/say-hi-our-new-coherent-brand/]
## Say hi, new coherent brand! (3/3)
Since the beginning, we at Coherent Labs, have not stopped pushing ourselves to go further and take our technology to new heights. The company didn’t merely change throughout the years. We evolved and it was time for our brand to follow suit. Keep an eye out for our hashtags #gameuisolved #madewithCLtech on social media for company updates and sneak peeks on the lives of Coherent employees.
## On this page
---
[SOURCE: https://coherent-labs.com/blog/news/unit-2-games-and-coherent-labs/]
## Unit 2 Games - realizing their vision for UGC games with the help of CL tech (1/3)
## Unit 2 Games - realizing their vision for UGC games with the help of CL tech
news
8/1/2019
Alexandra Ivanov
One of our main goals at Coherent Labs has always been to make game developers’ lives easier by streamlining and simplifying UI creation. When we saw the same ambitions to create an intuitive and easy to use tool, that would enable more people to create the games they want in Unit 2 Games’s new project Crayta, we were thrilled. So we chatted with Andrew Shenton, Technical Director at Unit 2 Games about Crayta and the way they used our tech to realize their vision.
- What was the inspiration behind the idea for Crayta?
We had a vision that everyone would be able to create, share, and discover UGC games easily; to build a game which was profoundly driven by player UGC as its primary feature allowing players to create new types of game genres, experiences, and personalized content.
- What can players expect from Crayta?
By combining innovative industry technologies to empower our players we offer them a new experience with unparalleled levels of freedom and ease of access. Players will have the ability to express themselves through building games together in a new and engaging way and will have the opportunity to discover and explore novel and compelling game types.
- Why did you choose Coherent Tech for your UI?
---
[SOURCE: https://coherent-labs.com/blog/news/unit-2-games-and-coherent-labs/]
## Unit 2 Games - realizing their vision for UGC games with the help of CL tech (2/3)
In our previous titles, UI had always been costly and unwieldy. We began experimenting with WebKit and were impressed by how using a browser basis streamlined the workflow for both our in-house and player-created UI. Unfortunately, the performance coming from these experiments was insufficient for our needs.
We surveyed the landscape for a similar solution and tried out Coherent GT2 which significantly improved the performance and provided enhancements to our workflows. With GT2 as our foundation, we managed to support UGC UI at manageable performance limits in our production builds without needing to spend significant manpower on wholesale optimization. We’ve since migrated to Coherent Labs’s next-generation product, GameFace, which has even further improved UI performance in Crayta.
- What do you see as the greatest strengths/benefits of our tech?
The main advantage is putting control in the hands of our content creators. The web-like nature of the tools has also allowed us to recruit from a more standardized skill-set than was previously possible.
In combination with rapid performance and cross-platform support, the tools have accelerated our ability to deliver on Crayta’s vision for a UGC-powered future for games.
- What would you say is the overall contribution that our tech made to your project?
Helping us extend our vision for fundamental User Generated Content to player UIs through the accessibility of the HTML/CSS /JS stack. It also provides pipelines and experience to ensure that we can always accomplish our goals in a comparatively short time-scale
---
[SOURCE: https://coherent-labs.com/blog/news/unit-2-games-and-coherent-labs/]
## Unit 2 Games - realizing their vision for UGC games with the help of CL tech (3/3)
- Where do you see Crayta in the next 3-5 years?
We hope that as Crayta matures our community will create and discover popular new game types, genres, and sub-genres, similar to how modders created Defense of the Ancients (DotA) from Warcraft 3, and Auto Chess in Dota2. We would like Crayta to be an environment where these new games, their player community, and content creators can grow and thrive together.
Just about everyone at Coherent Labs is an avid gamer and we have all played player-made content, so you can imagine how excited we are for Crayta’s release and for being a part of it. 2020 can’t come soon enough!
## On this page
---
[SOURCE: https://coherent-labs.com/blog/news/what-you-need-to-know-about-hummingbirds-support-for-nintendo-switch/]
## What you need to know about Hummingbird's support for Nintendo Switch (1/2)
## What you need to know about Hummingbird's support for Nintendo Switch
news
4/24/2018
Alexandra Ivanov
#####
As of 24th of April 2018 Coherent Labs is the only UI solution on the market that has the privilege of supporting Nintendo Switch™. We have been wanting to say that for a while now!
The communication between the two teams - Nintendo & Coherent Labs - started back in December of last year and has been going without a hitch to this day, when we can officially offer our SDK for Nintendo to clients.
#####
Fully multiplatform UI solution From a business perspective, adding Nintendo Switch to our portfolio means our clients can now enjoy the workflow and performance benefits of the leading UI tool on the last platform they couldn’t. That makes the lives of our sales team much, much easier as there is virtually nothing left we can’t offer to our clients at this point.
Being the most popular UI solution used for games with the widest variety of platform support we were eager to add Nintendo Switch to the list, as it was the last major platform missing from our portfolio. If you are wondering how this whole ordeal started, it’s quite simple – we got a request from a prospective client whose game was to be developed for Nintendo Switch. The next step was to get in touch with the Nintendo team and see what needed to be done to make this platform support become a reality.
---
[SOURCE: https://coherent-labs.com/blog/news/what-you-need-to-know-about-hummingbirds-support-for-nintendo-switch/]
## What you need to know about Hummingbird's support for Nintendo Switch (2/2)
Eager to know which is the game that made us go through this whole ordeal? Stay tuned and you will find out. For now, however, let us tell you a bit about the technical challenges we encountered while integrating Hummingbird.
## On this page
---
[SOURCE: https://coherent-labs.com/blog/releases/gameface-1-0-released/]
## Gameface 1.0 released!
## Gameface 1.0 released!
releases
12/7/2018
Dimitar Trendafilov
1. Custom elements
2. Virtual lists
3. Support for UWP ARM
4. Migrating from Hummingbird
5. Tell us your thoughts!
#####
The last step to complete our rebrand is to release the new versions of Coherent Gameface and Coherent Prysm and it’s nigh time we delivered those. Let me tell you all about them.
Coherent Gameface, as you’ve probably seen elsewhere is the game UI solution for developers with love for the web stack. HTML5 is a great technology and by using it you benefit from the massive community, talent pool and existing libraries for HTML and JavaScript. Not to mention that frontend developers can work separated from the core gameplay engineers. To learn more about Coherent Gameface, visit its page or check its features.
Starting with the more exciting news - compared to Hummingbird 1.14, Coherent Gameface 1.0 comes with a bunch of new things.
---
[SOURCE: https://coherent-labs.com/blog/releases/gameface-1-0-released/#custom-elements]
## Gameface 1.0 released!: Custom elements
Custom elements are a relatively new addition to the HTML standard which allows for the creation of…well, custom elements! Custom elements allow you create customizable and reusable component-like classes that can then be composed to create the final UI. Read more about them on [MDN ](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_custom_elements). Syntax as easy as 1-2-3:
```html
<-- Define the custom element -->
<-- Use it as you would any other element -->
```
---
[SOURCE: https://coherent-labs.com/blog/releases/gameface-1-0-released/#virtual-lists]
## Gameface 1.0 released!: Virtual lists
Virtual lists are a brand new feature to Coherent Gameface which solves one specific problem we’ve seen people encounter time and again with our data binding system. Whenever you bind some list of items, it’s often that you need to display only a part of it. That ‘part of it’ usually falls into one of these categories:
- Pagination - display some fixed number of items and potentially allow the user to go to the following items (e.g. display 5 weapons at a time in an inventory).
- Filtering - display all items that match some predicate (e.g. show all unlocked weapons).
- Sorting - display all items in some order.
This release will simplify the pagination part but we’ll also add the 2 others in one of next year’s releases. So for example:
```html
```
This allows you control how many and which elements are visible in a simple manner.
See [the docs ](https://coherent-labs.com/Documentation/cpp-gameface/d1/ddb/data_binding.html#Virtual_list)for further info about usage information.
---
[SOURCE: https://coherent-labs.com/blog/releases/gameface-1-0-released/#support-for-uwp-arm]
## Gameface 1.0 released!: Support for UWP ARM
UWP has been part of our supported platforms for the better part of this year but we were missing ARM as an architecture and this release closes the last gap. You can now run Coherent Gameface on mobile devices with Windows as well as PC and Xbox One.
---
[SOURCE: https://coherent-labs.com/blog/releases/gameface-1-0-released/#migrating-from-hummingbird]
## Gameface 1.0 released!: Migrating from Hummingbird
For everyone upgrading from Hummingbird to Coherent Prysm, the steps needed to update are rather simple and available in a document your favorite support team will share separately. Do contact them at to get access to it.
---
[SOURCE: https://coherent-labs.com/blog/releases/gameface-1-0-released/#tell-us-your-thoughts]
## Gameface 1.0 released!: Tell us your thoughts!
For a full list of changes, as always you can check the [changelog ](https://coherent-labs.com/changelog-gameface/)and hit us on [twitter ](https://twitter.com/coherentlabs)or anywhere else to tell us what you think. I am also very curious about your thoughts on our new style. We’ve put a lot of effort in the rebrand and we are pretty happy with how it went but it end it’s your opinion that matters the most.
Enjoy your New Year’s Eve and stay tuned for Prysm 1.1 coming out in January!
Credits for the above [video ](https://www.youtube.com/watch?v=RN8ss708b6M)go to [CyberWebFX](https://www.youtube.com/c/CyberWebFX)
## On this page
---
[SOURCE: https://coherent-labs.com/blog/releases/prysm-1-0-released/]
## Prysm 1.0 released!
## Prysm 1.0 released!
releases
12/7/2018
Dimitar Trendafilov
1. Improving quality of life
2. Support for UWP ARM
3. Migrating from Hummingbird
4. Tell us your thoughts!
#####
The last step to complete our rebrand is to release the new versions of Coherent Gameface and Coherent Prysm and it’s nigh time we delivered those. Let me tell you all about them.
Coherent Prysm, as you’ve probably seen elsewhere is the game UI solution for artists. Adobe Creative Cloud is an amazing set of content creation tools. Through a custom plugin for Adobe Animate (aka the Coherent Exporter), we bridge the gap between game UI and Adobe CC making it easy for artists to work directly without programmer involvement. To learn more about Coherent Prysm, visit its page or check its features.
Starting with the more exciting news - compared to Hummingbird 1.14 and Coherent Exporter 0.95, Coherent Prysm 1.0 comes with a bunch of new things.
##### Support for overflow
Coherent Prysm’s Animate plugin now supports control over the ‘overflow’ of elements. Overflow determines what happens with any part of the element that would usually be outside the element’s boundaries - in different cases you might want it clipped, visible or you might want the element to become a scrollable container. You can also control overflow in each direction (e.g. you might want to have the element scrollable vertically and clipped to the side).
---
[SOURCE: https://coherent-labs.com/blog/releases/prysm-1-0-released/#improving-quality-of-life]
## Prysm 1.0 released!: Improving quality of life
This release also adds a couple of minor fixes and improvements to the Coherent Prysm Animate plugin which are meant to save you time. Most notably, exporting to HTML will no longer pollute your history thus you’ll be able use undo/redo as you need to and as you would expect to. Figuring out how you use Animate and Coherent Prysm together is one major goal of ours and we will be dedicating more time in upcoming releases to improving how the two collaborate to give you better workflow. With this in mind, do give us a shout out at for anything you find problematic.
---
[SOURCE: https://coherent-labs.com/blog/releases/prysm-1-0-released/#support-for-uwp-arm]
## Prysm 1.0 released!: Support for UWP ARM
UWP has been part of our supported platforms for the better part of this year but we were missing ARM as an architecture and this release closes the last gap. You can now run Coherent Prysm on mobile devices with Windows as well as PC and Xbox One.
---
[SOURCE: https://coherent-labs.com/blog/releases/prysm-1-0-released/#migrating-from-hummingbird]
## Prysm 1.0 released!: Migrating from Hummingbird
For everyone upgrading from Hummingbird to Coherent Prysm, the steps needed to update are rather simple and available in a document your favorite support team will share separately. Do contact them at to get access to it.
---
[SOURCE: https://coherent-labs.com/blog/releases/prysm-1-0-released/#tell-us-your-thoughts]
## Prysm 1.0 released!: Tell us your thoughts!
For a full list of changes, as always you can check the changelog and hit us on twitter or anywhere else to tell us what you think. I am also very curious about your thoughts on our new style. We’ve put a lot of effort in the rebrand and we are pretty happy with how it went but it end it’s your opinion that matters the most.
Enjoy your New Year’s Eve and stay tuned for Prysm 1.1 coming out in January!
Credits for the above [video ](https://www.youtube.com/watch?v=RN8ss708b6M)go to [CyberWebFX](https://www.youtube.com/c/CyberWebFX)
## On this page
---
[SOURCE: https://coherent-labs.com/blog/software-development/incoming-renoir-backend-api-changes/]
## Incoming Renoir backend API changes (1/8)
## Incoming Renoir backend API changes
software-development
2/6/2019
Dimitar Trendafilov
In this blog post we will describe the incoming changes to Renoir’s backend API and the motivation for them.
The current backend API was designed around DirectX 11 and therefore implementing a DirectX 11 backend with the current API is simple and intuitive. The mapping between backend and DirectX 11 API methods is very straightforward. Also Renoir’s backend API proved to be suitable for implementing backends for other graphics APIs like DirectX9 and OpenGL.
As the industry evolved, API vendors began shifting to lower-level graphics APIs, which provided more fine grained control over the GPU. As a result of that shift AMD announced their new graphics API Mantle and Microsoft followed with DirectX 12. The goals of both graphics APIs were similar - reducing CPU overhead and allowing direct access to all GPU features. The development of AMD’s Mantle API was eventually suspended due to the rise of popularity and the similar aims of DirectX 12 and OpenGL’s successor Vulkan.
Once DirectX 12 was officially released, we naturally started implementing a Renoir backend for it and while we encountered some minor problems with the original backend API design, we managed to solve them and deliver a DirectX 12 backend to our products.
---
[SOURCE: https://coherent-labs.com/blog/software-development/incoming-renoir-backend-api-changes/]
## Incoming Renoir backend API changes (2/8)
Apple decided to create their own low-level, low-overhead graphics API called Metal. A couple of years later they announced the deprecation of OpenGL and OpenGLES respectively for Mac and iOS. We decided that it would be best to get ready for the next decision of Apple to fully deprecate something and implement a Metal backend.
Metal is designed around the principles of the modern low-level compute and graphics APIs like Vulkan and DirectX 12. It is specifically tailored to bring better performance than OpenGL to both Mac and iOS applications. A key concept in both Metal and Vulkan is the render pass. The definition provided by Apple for a render pass is a collection of commands that updates a set of render targets. Metal also introduces a render command encoder object, which is simply defined as The object to use for encoding commands for a render pass. In Metal we need to create a new render command encoder object for each logical render pass. The render pass concept is introduced in order to achieve high performance on GPUs with tiled architecture and to keep the code and hardware tied together without much abstraction in-between. The information that you must specify in order to create a render command encoder in Metal includes the color, depth and stencil attachments that you are going to draw in, if they should be cleared on load and whether MSAA texture resolve should happen at the end of the render pass when storing the render targets.
---
[SOURCE: https://coherent-labs.com/blog/software-development/incoming-renoir-backend-api-changes/]
## Incoming Renoir backend API changes (3/8)
When we started designing and implementing the Metal backend, we encountered several problems, which showed us that Renoir’s backend API is not fully suited to handle a graphics API designed around the render pass concept. The information needed for creating a render command encoder was scattered in backend API. Some methods provided only part of the information and some required the creation of a new encoder although there may already exist one. Additionally in Metal you can’t have more than one active render command encoder. These specifics of the graphics and backend API were the cause of multiple problems while implementing the Metal backend. The major ones were:
---
[SOURCE: https://coherent-labs.com/blog/software-development/incoming-renoir-backend-api-changes/]
## Incoming Renoir backend API changes (4/8)
- The backend API uses two separate commands for binding and clearing render targets (SetRenderTarget and ClearRenderTarget). However, as mentioned above when creating a render command encoder we should specify if some attachment should be cleared on load. This is very efficient on tiled GPUs as starting a render pass is tied together with the clearing of a texture. Additionally there is no other method in the Metal API, which can directly be used to clear a render target.
- The ClearRenderTarget command is often issued to just clear the depth and stencil attachments in the middle of a render pass, which means that we will often do the expensive operation of resetting the current render command encoder and therefore beginning a new render pass with different load actions for the depth and stencil attachments.
- When MSAA textures are enabled, Renoir frequently needs to resolve them and issues to the backend the command ResolveRenderTarget with the proper MSAA and resolve texture. Resolve can be issued in the middle of a render pass, which again means that we will need to create a new render command encoder just to resolve the textures and then reset the old one. This happens due to the Metal API only allowing render target resolve implicitly at the end of a render pass and to do so, an appropriate store action should be set on render pass creation.
---
[SOURCE: https://coherent-labs.com/blog/software-development/incoming-renoir-backend-api-changes/]
## Incoming Renoir backend API changes (5/8)
We managed to workaround most problems in the Metal backend by basically saving the render pass state, ending the current render pass and creating a new one for the currently issued operation. In the case of the ResolveRenderTarget problem we even had to reset the old render pass after the end of the method.
These workarounds incur a CPU and GPU performance cost, which we minimized in order to provide a fully functional **Metal Backend in Gameface 1.1 and Prysm 1.1**. However, in order to be able to take full advantage of the Metal graphics API and avoid the workarounds, we decided to make some changes to the backend API and rework the Metal backend in Gameface 1.2 and Prysm 1.2.
These changes include:
---
[SOURCE: https://coherent-labs.com/blog/software-development/incoming-renoir-backend-api-changes/]
## Incoming Renoir backend API changes (6/8)
- Two new backend API commands - BeginRenderPass and EndRenderPass. They are issued only when a new backend capability is enabled in the FillCaps method. This capability tells Renoir to issue these new commands instead of the SetRenderTarget and ResolveRenderTarget commands. The parameters in the BeginRenderPass command provide all the information needed to create a render command encoder - the render targets, if they should be cleared on load and if resolve should happen at the end of the render pass. This change allows for efficient clearing of the render targets and also solves the problem with the resolve in the middle of a render pass.
- Another new capability, which when enabled tells Renoir to replace the ClearRenderTarget command with a DrawIndexed command, which does a fullscreen clear quad through the use of a **new ClearQuad vertex and pixel shader**. This change solves the problem of needing to reset the render command encoder in order to clear the render targets.
We also decided to further simplify the implementation of all the modern low-level graphics APIs by doing the following changes:
---
[SOURCE: https://coherent-labs.com/blog/software-development/incoming-renoir-backend-api-changes/]
## Incoming Renoir backend API changes (7/8)
One of the problems observed during the implementation of the DirectX12 backend was overwriting constant buffers. This was happening, because for a given frame we were binding a constant buffer and sending the commands to the GPU and then for the next frame we were again writing to this constant buffer while it was still being used by the GPU. The problem was also present in other backends like Metal. We solved it easily by adding a ring buffer containing multiple constant buffers. However, this problem was forcing Renoir’s clients to write the ring buffer code in multiple backends, so in order to simplify the backend’s implementation we decided to move the circular buffering scheme to the Renoir rendering library and exposed the size of the ring buffer as a configurable capability in the backend. When this size is set to the maximum count of buffered frames in your pipeline, updating the constant buffers’ data consists of simply finding each constant buffer object and placing the new data in it. The SDK takes care not to overwrite any buffers currently used by the GPU. We decided to move the information whether a render target is MSAA to the CreatePipelineState command, because it is part of DirectX 12, Metal and Vulkan pipeline state objects. The EnableColorWrites flag is removed from the SetRenderTarget command and the ColorMask field of the Pipeline object is used instead in the CreatePipelineState backend method.
---
[SOURCE: https://coherent-labs.com/blog/software-development/incoming-renoir-backend-api-changes/]
## Incoming Renoir backend API changes (8/8)
These changes are synchronized with all the provided current sample backends, but will require modifications in the custom ones. You can further understand the details of the required changes from the transition guide, which will be added soon to the documentation of Gameface and Prysm. We are confident these changes of Renoir’s backend API will allow you to achieve simpler and at the same time more performant backend implementations, so expect them in **Gameface 1.2 and Prysm 1.2**.
## On this page
---
[SOURCE: https://coherent-labs.com/blog/software-development/vulkan-support/]
## Introducing Vulkan support in the Coherent Technology (1/8)
## Introducing Vulkan support in the Coherent Technology
software-development
7/26/2019
Dimitar Trendafilov
In this blog post, we will share the challenges we faced during the implementation of the Vulkan backend for our rendering library Renoir and how we overcame them. In order to better understand the exciting challenges we faced, we will start by laying out the main requirements for Vulkan support.
---
[SOURCE: https://coherent-labs.com/blog/software-development/vulkan-support/]
## Introducing Vulkan support in the Coherent Technology (2/8)
- It must implement the Renoir backend API, which is used for all backends and their corresponding graphics APIs. Keep in mind that our backend API is designed according to the properties of our software products, namely a game UI SDKs. This results in Renoir not knowing what resources (e.g. textures) will be used in the next frame as the user of our SDK has the ability to load and change them dynamically (e.g. through JavaScript). This problem is elaborated further later in the blog post.
- It must use our shader cross-compilation pipeline and therefore our base common HLSL shaders. We avoid significantly changing these shaders for a specific graphics API as this defeats the purpose of having one set of shaders for all APIs.
- It must run on all the Vulkan supported platforms and adhere to the hardware-specific limits of all the possible [Desktop and Mobile ](https://docs.coherent-labs.com/cpp-gameface/what_is_gfp/requirements/)devices our products support.
- It should be easy to understand and high performance at the same time. This is caused by the fact that the Vulkan backend implementation we provide is just a sample one and our clients must have the ability to modify it to suit their specific engine. In most cases, they don’t even need to modify the sample as the one we provide matches their requirements.
- It also should provide an option for custom memory allocations while having a default implementation.
The Vulkan API also introduces some requirements and limitations, which influenced our backend design decisions.
---
[SOURCE: https://coherent-labs.com/blog/software-development/vulkan-support/]
## Introducing Vulkan support in the Coherent Technology (3/8)
- Vulkan gives full control of the memory management to the developer.
‣ You have to manually query the memory requirements and determine the memory type for each allocation. This is not always easy as it heavily depends on the user’s graphics card. ‣ You should not use separate allocation for each resource as you cannot have more than 4096 simultaneous memory allocations even for modern graphics cards. This means that you have to implement a custom allocator, which splits a couple of huge allocations into smaller chunks.
This is why we decided to create our own allocator interface and wrap the [Vulkan Memory Allocator ](https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator)by default, but also enable clients to implement and provide custom allocators.
- Buffers and Images (Textures) in Vulkan are provided to the shaders through descriptors and these descriptors are organized and aggregated in descriptor sets. You can’t bind individual descriptors, but only one or multiple descriptor sets.
‣ Sets are allocated from descriptor pools by providing them a corresponding descriptor set layout. ‣ The descriptor set layout describes how the data is laid out in the shader by specifying each descriptor binding. ‣ You can’t bind more than 4 descriptor sets for a significant amount of GPUs.
---
[SOURCE: https://coherent-labs.com/blog/software-development/vulkan-support/]
## Introducing Vulkan support in the Coherent Technology (4/8)
- The descriptor sets are updated through the vkUpdateDescriptorSets API method, which isn’t recorded in the command buffer with the other Vulkan commands but executes immediately. This can lead to an invalid command buffer if the descriptor set, which is updated is either in use by a command buffer executing on the GPU or in the recording state.
- It is preferred to group your descriptors by binding frequencies. E.g. if you have multiple uniform buffers and textures in a descriptor set and only one of them changes, then you will have to pay the cost for rebinding all of them.
The design of descriptor sets is very convenient and high performance when you have information upfront of what resources will be used for a given scene or at least for a large number of frames. However, as mentioned in our requirements, we don’t have that information and therefore we have to update and bind descriptor sets multiple times per frame, which incurs a performance cost.In the Vulkan backend, we separate our descriptors into four types of sets - vertex and pixel shader uniform buffers, samplers and textures. Each type of descriptor set has a corresponding descriptor set manager. This manager allocates a chunk of descriptor sets each frame for every type and allows descriptor set reuse for sets updated with the same data.
---
[SOURCE: https://coherent-labs.com/blog/software-development/vulkan-support/]
## Introducing Vulkan support in the Coherent Technology (5/8)
We also have a circular buffer of descriptor pools with default size 4 (can be modified based on the number of buffered frames in a user’s pipeline). Every frame we reset the current descriptor pool and pass it to the managers, so they can allocate their descriptor set chunks. The descriptor pool has a maximum amount of descriptor sets it can allocate for each frame and this value can also be modified for heavier scenes. Additionally, we use dynamic uniform buffers in order to keep our UB updates to a minimum by just updating whole uniform buffer once and providing different dynamic offsets in it on the binding.
This whole scheme is acceptable for us, as we don’t change the samplers and uniform buffers that often. We can optimize our texture descriptor set management by using array of textures and a push constant to index in the array. This strategy requires adding a preprocessing step in the Vulkan backend, which based on the Renoir commands collects all the information for the resources that are going to be used for a given frame and updates the texture array. However, this will both require changing our common HLSL shaders to include the array of textures and the push constant only for the Vulkan backend and will complicate our sample backend implementation, which as mentioned in our requirements is not desirable.
---
[SOURCE: https://coherent-labs.com/blog/software-development/vulkan-support/]
## Introducing Vulkan support in the Coherent Technology (6/8)
Most of the other problems we hit, we have already solved similar ones during the implementation of backends for other graphics APIs (DirectX12, Metal, etc.). However, there were still a couple of Vulkan specific tricks we had to use and problems we stumbled on:
---
[SOURCE: https://coherent-labs.com/blog/software-development/vulkan-support/]
## Introducing Vulkan support in the Coherent Technology (7/8)
- We were forced to use the VK_KHR_MAINTENANCE1 device extension because we need to specify negative viewport height in order to y-flip the clip-space to framebuffer coordinate transform. This is needed for Vulkan clip coordinates as they have different orientation compared to the D3D clip coordinates (motivation for this behavior).
- Due to the nature of Vulkan image layouts, the backend expects every user texture or render target, which is passed to it by the user’s application or engine to be in the VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL layout. After the backend enqueues all of its commands in the user-provided command buffer, then the user textures and render targets are again transitioned to the VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL layout.
- It is usually hard to determine the right time to destroy a framebuffer. The reason for this is that you have to destroy it when all of its attachments are no longer used by the GPU and destroyed. Otherwise, validation layers errors are hit. Most other rendering frameworks (e.g. bgfx, The Forge) destroy them at the end of a frame.
- We had a bug in one specific blur effect test, which happened only on Nvidia graphics cards and was caused by using texture, which is not initially cleared immediately after creation. We set it for a render pass color attachment with a clear load operation and regular store operation. Then we used it to achieve a blur effect and when we ended the render pass, random artifacts were present in the texture’s blur. The synchronization of the image was correct. Additionally, RenderDoc was no help, because it always showed correct rendering with no artifacts. All of this was not present on AMD graphics cards and everything worked fine.
- There were many Nvidia and AMD quirks as the one described in the previous point. We are kind of used to that, but there were a larger amount of such quirks we hit for the Vulkan backend than any other. For example, at one point of our implementation, we didn’t synchronize the writing to our vertex, index, and uniform buffers. There was no barrier for a buffer in the whole backend. The Vulkan validation layers weren’t warning about that. As a matter of fact, the rendering was working 99% of the time. On AMD and Nvidia graphics cards the failing tests were different and again the artifact was not present in the RenderDoc replay, because it serializes the commands and it usually is unable to catch synchronization artifacts. Due to the rendering almost always working, we considered that the problem was something small like one missing image barrier or one wrong render pass action, not general buffer synchronization, so it took some time to fix that issue.
- We tried to find very extensive validation layers to try to get ideas for some of the problems we hit. We were unable to find such layers, but there is already some work on that.
---
[SOURCE: https://coherent-labs.com/blog/software-development/vulkan-support/]
## Introducing Vulkan support in the Coherent Technology (8/8)
The Vulkan backend is included for the native Windows SDK in Gameface and Prysm 1.3 and will be included in the native Android SDK in Gameface and Prysm 1.4. Vulkan support for our UE4 plugin is also added in the 1.4 release version.
## On this page
---
[SOURCE: https://coherent-labs.com/blog/uitutorials/3d-map-ui-part-2/]
## 3D Map with UI markers - Adding interactions (part 2)
## 3D Map with UI markers - Adding interactions (part 2)
ui tutorials
2/13/2025
Martin Bozhilov
1. Overview
2. Showing tooltip on hover
1. Create collision box for every POI actor
2. Adding hover events
3. Changing UI scale based on zoom level
1. Adjusting the size of area markers with custom events
2. Implementing the custom events in the UI
3. Adjusting collision boxes with zoom level
---
[SOURCE: https://coherent-labs.com/blog/uitutorials/3d-map-ui-part-2/#overview]
## 3D Map with UI markers - Adding interactions (part 2): Overview
This is the second and final part of the [“3D Map with UI markers”](https://coherent-labs.com/blog/?search=3d+map+with+ui+markers\&exactMatch=true) series. In the previous part, we laid out the project structure and implemented markers display.
We are going to implement a tooltip that appears when a point of interest is hovered over by the mouse. The tooltip will display the name of the POI and its description. Additionally, we will enhance the visuals of our UI by adjusting the size of the UI elements depending on the zoom level by the player.
---
[SOURCE: https://coherent-labs.com/blog/uitutorials/3d-map-ui-part-2/#showing-tooltip-on-hover]
## 3D Map with UI markers - Adding interactions (part 2): Showing tooltip on hover (1/7)
The approach we took for implementing this feature was to use `Collision boxes` that will detect when the cursor is over them.
#### Create collision box for every POI actor
We are going to create a `Set POI Collision` method which will spawn collision boxes when the level initializes to avoid doing it manually for every POI we have.
In this method, we are going to:
- Loop through all POI actors and add box collisions to them
- Calculate the relative scale of the boxes based on their distance from the player camera
- Enable the input and set overlap events to `true` for each collision box
- Add each collision box to the `POI Collision Box` array variable for later use
- After the loop is finished, enable mouse over events from the controller class
The helper method `Set Collision Box Scale` will be used to calculate the scale of the collision box relative to the object’s distance to the camera.
We will need the Z position of each POI as an input and achieve our desired result by the following formula:
- Camera Z location + current spring arm length = `Camera location`.
- `Distance to Actor` = `Camera Location` - Actor Z location.
- After we have the distance to the actor, we will scale it down by multiplying it by 0.001.
Additionally, you can fine-tune this by clamping the final result or lowering the `distance to actor` value - in our case, we have done both. One tip here is to use the `Set Hidden in Game` node in the `Set POI Collision` method to visualize the bounds of the collision box, like so:
#### Adding hover events
---
[SOURCE: https://coherent-labs.com/blog/uitutorials/3d-map-ui-part-2/#showing-tooltip-on-hover]
## 3D Map with UI markers - Adding interactions (part 2): Showing tooltip on hover (2/7)
After setting up the collision boxes, we need to make them listen for mouse input. We will achieve this by binding our POI actors to the `On Begin Cursor Over` and `On End Cursor Over` events.
Before doing that, we need to go back to the content browser and create a `POI_Blueprint` actor class and replace all instances of our points of interest with it. This allows us to add an `index` class variable to help provide the correct information to the tooltip.
Then in the blueprint editor of `POI_Blueprint` create an `index` integer variable.
We can now proceed with the main part of this section - binding the events. We are going to bind the events on `Event Begin Play`. The bound events will be responsible for toggling the visibility of the tooltip, while the up-to-date info will be handled on every tick - only if the tooltip is visible to optimize performance.
Before adding the blueprint nodes for the logic, we have to create the struct for the tooltip, a variable to represent the structure, and another variable to hold the hovered actor so its information can be extracted and passed to the tooltip.
Create a structure called `tooltipState` with the following fields:
And also create the variables:
With that out of the way, we now have to define 2 methods - one for toggling the visibility of the tooltip and another to update its state (name, description, location).
Let’s begin by creating and implementing `Update Tooltip Visibility` first:
Now, let’s set up the logic on `Event Begin Play` in the `GameState` BP:
---
[SOURCE: https://coherent-labs.com/blog/uitutorials/3d-map-ui-part-2/#showing-tooltip-on-hover]
## 3D Map with UI markers - Adding interactions (part 2): Showing tooltip on hover (3/7)
1. We will create the tooltip `data-bind` model.
2. Then loop through all the actors and call their blueprint class where we will set the correct index for each element.
3. For every actor, we will call `On Begin Cursor Over` and in the event body, we will store the active actor POI and call `Update Tooltip Visibility` with the visibility boolean set to `true`.
4. `On End Cursor Over` we will only call `Update Tooltip Visibility` with the visibility boolean set to `false`.
With that out of the way, we now need to implement the `Update Tooltip State` method. The logic for this method will be the same, with the only difference being that we will update the other fields except for `visibility`.
In order to pass the correct information only when needed, on `Event Tick` we are going to check if the tooltip is visible and if it is, we will get the correct POI’s information by providing the `POIs` array with the index of the Active POI. Then, we will pass the correct information to the `Update Tooltip State` method we just defined.
The only thing left to make this all work is to connect it to the Frontend. Let’s add the tooltip element and connect it to Unreal with `data-binding`
```html
```
---
[SOURCE: https://coherent-labs.com/blog/uitutorials/3d-map-ui-part-2/#showing-tooltip-on-hover]
## 3D Map with UI markers - Adding interactions (part 2): Showing tooltip on hover (4/7)
What is left is to add some styling and the utility class `visible` and our tooltip is ready!
```css
.poi-tooltip {
position: absolute;
transform: translate(-50%, 50%);
color: white;
text-transform: capitalize;
text-align: center;
z-index: 99;
opacity: 0;
flex-direction: column;
justify-content: center;
align-items: center;
background-image: url(./pois/tooltipBG.png);
background-position: center;
background-size: 100% 100%;
padding: 1.5vmax 0 0.5vmax;
width: 25vmax;
transition: opacity 0.1 linear;
}
.poi-tooltip-name {
font-size: 1.5vmax;
padding-bottom: 0.5vmax;
margin-bottom: 0.5vmax;
border-bottom: 2px solid #FFD700;
}
.poi-tooltip-description {
font-size: 0.75vmax;
}
.visible {
opacity: .75;
}
```
### Changing UI scale based on zoom level {#changing-ui-scale-based-on-zoom-level}
To enhance the immersion of our UI, we will make it scale based on the current zoom level.
- On maximum zoom, the area markers will fade out, and the POI markers will scale a bit.
- On medium zoom, the area markers will show, and the POI markers will scale down.
- On minimum zoom, the area markers will scale up.
#### Adjusting the size of area markers with custom events
We are going to put the logic for this functionality in our `TopDownCamera` pawn actor, where the camera that shows the UI is located and where the zoom logic is handled.
We must first get a reference to our GameState to manipulate its variables.
---
[SOURCE: https://coherent-labs.com/blog/uitutorials/3d-map-ui-part-2/#showing-tooltip-on-hover]
## 3D Map with UI markers - Adding interactions (part 2): Showing tooltip on hover (5/7)
Then let’s create a method called `Adjust UI Scale` and connect it to the `Event Tick` event after our zoom method
Now let’s implement the `Adjust UI Scale` method. The logic for it will be relatively simple. In our zoom logic, we have set the `SpringArm`’s max zoom-out value to be 20000. So in this method, we will check how much the camera is zoomed and send appropriate events to the UI.
- If the zoom level is below 5000, we will set the `Zoomed` field in our `MapModel` structure to `true`, which will tell the UI to scale the POIs, and we’ll also send the `zoomedInMax` event to the UI.
- If the zoom level is between 5000 and 10000, we will set the `Zoomed` field to `false`, scaling down the POI marks, and we’ll send the `zoomedIn` custom event to the UI.
- If the zoom level is above 10000, we will only send a `zoomedOut` event to the UI.
**Note:** Before we initialize any logic, we must first check if the binding are ready, otherwise when trying to update the model, we’ll get an error.
Now let’s head back to our UI and implement the custom events.
#### Implementing the custom events in the UI
Create a javascript file - `index.js` and link it to your HTML
```html