October 20, 2023
By Erik Lutz
The Kywy Engine
One of the core components driving our platform's capabilities is the open-source Kywy game
engine. While it's still in its early alpha stage, our primary focus has been on simplicity and
accessibility, ensuring that even those without extensive programming experience can use it
effectively.
In this inaugural software blog post, we'll delve into some of the major components of the Kywy
engine that we've already implemented. These components play a crucial role in testing the
engine and creating the engaging scenes you've seen on our social media.
Multitasking, Game Clock, and Inputs
The Kywy engine follows the "Actor Model," where distinct "actors" run concurrently and
communicate through messages. For example, our game clock operates as an actor, regularly
sending out TICK messages. Additionally, we have an actor responsible for monitoring button
presses and dispatching messages to other actors when buttons are pressed or released.
But that's just the beginning. You have the freedom to create your own actors to manage various
aspects of your game. Imagine crafting an actor to control your player character. By subscribing
it to the engine clock, you can have it perform actions on every TICK, such as updating
animations. You can also link it to the engine's input actor to respond to button presses,
allowing players to trigger character actions effortlessly.
Actors are at the heart of your game's architecture: controlling characters, backgrounds, menus,
game loops, and more. The engine handles concurrency automatically, leaving you to set up your
actors and set them in motion!
Graphics
To ensure exceptional performance, we've developed a custom screen driver for the Kywy hardware.
Our testing revealed that other open-source graphics libraries, such as u8g2, achieved a limited 20-30 FPS on our
hardware. However, with our proprietary library, we achieved an impressive 400+ FPS!
Building upon our core graphics library, we've introduced a sprite system that simplifies the
management and display of various components in your game. You can load sprite sheets, render
sprites, manipulate their positions, and even create animations.
State Machines
Managing game state, especially in more complex games, can be challenging. To address this, we've
created a state machine library that's at your disposal. With this tool, you can define
self-contained components with well-defined states and transitions that dictate how data should
change in response to specific events. By connecting these states and even nesting them, you can
construct intricate behaviors from simple components.
What's Coming Next?
While our engine is still a work in progress, it already possesses the functionality to build
moderately complex games. We plan to showcase this capability as part of our upcoming
Kickstarter campaign, so stay tuned! Our primary focus moving forward is to enhance usability,
documentation, and tutorials. We're committed to making everything from installation to flashing
your first game accessible, even for those with limited programming experience. Over the next
few months, we'll be smoothing the path to developing Kywy games.
We're thrilled about the journey ahead and can't wait to share it with you. The Kywy engine is a
significant step toward bringing your gaming ideas to life, and we're dedicated to making that
process as enjoyable and straightforward as possible.