We’re very happy to share wit you our new sample game:
Starbreaker - a complete, playable 3D space shooter web game designed as a starting point for developers who want to bring their games to web, made in collaboration with Poki.
The project includes Poki SDK integration, ads, saves, touch and gamepad controls, web optimizations, progression, meta-game, skins and upgrades and more.
But the game itself is only part of the project. Starbreaker is designed to demonstrate best practices for developing web games with Defold, with particular attention to Poki’s platform requirements, SDK integration, performance optimization, and player experience.
Of course, most of these tips and solutions also apply to web games in general.
Purpose of the project
We believe this project can serve as a solid foundation for your own games. That’s why the game itself isn’t the main focus here. Instead, we’ve structured the project to keep the game, application foundation, and learning tips as separate and decoupled as possible. For example, you can simply remove the learn.collection from the bootstrap main.collection, and the Poki overlay with development tips will no longer appear.
As a result, the project might seem a bit complex, and you could certainly create a game like Starbreaker in a much simpler way with Defold. However, the goal here wasn’t just to build a game, but to provide a reusable foundation for web game development and help developers learn good practices along the way.
Instead of starting from scratch, you can explore a working game, learn from its implementation, apply the good practices and reuse its foundations in your own projects. ![]()
What’s Included?
Starbreaker demonstrates how to build a complete gameplay loop, from starting a mission through combat and results to upgrades and the next mission.
The project includes:
-
Complete 3D space shooter arcade style core game loop – player ship, enemy ships, projectiles, pick-ups, combat logic, visual effects, mission objectives, etc.
-
Player progression and shop - Earn rewards, purchase upgrades, unlock ships and skins, and save your progress.
-
Poki SDK integration - Platform lifecycle management, gameplay events, device information, and advertising integration.
-
Commercial and rewarded ads - Examples of integrating advertisements with the game flow.
-
Cross-platform input - Keyboard, mouse, gamepad, and touchscreen controls, including a virtual on-screen joystick.
-
Save system - Persistent player progress, purchased upgrades, and user preferences.
-
Localization - Language switching and font management.
-
Audio and focus management - Proper handling of audio, game state, and browser focus changes.
-
Menus and UI – Main game interface, pause menu, settings, result screens, and upgrade shop.
The project uses several popular Defold extensions and libraries, including Poki SDK, Monarch, Druid, Defold Lang, Defold Saver by @Insality, and others.
The project uses LLM-generated translations to showcase support for different languages with certain font features supported out of the box in Defold (RTL, text shaping, etc). Non-default (other than English) fonts are loaded after initial game loads, when game starts asynchronously. Players can change language in pause menu. The learning tips are not translated though.
Learn Poki Development While Playing!
One of the more interesting features of Starbreaker is its built-in interactive Poki development guide.
Throughout the game, you can open contextual Poki Dev Tips explaining important aspects of web game development and Poki integration.
These tips cover practical considerations for creating a game intended for the platform, helping developers understand why certain systems are implemented the way they are.
You can access the guide using the P key or by clicking the Poki logo in the game interface. The tips are available during gameplay, in the shop, and in other game contexts.
This means you can explore both the actual gameplay implementation and the reasoning behind various development decisions.
Optimized for Web Games
Web games have their own technical challenges, particularly when it comes to initial loading time, memory usage, browser behavior, and performance across devices.
Starbreaker demonstrates several approaches to addressing these challenges:
-
Deferred asset loading: Loading fonts and music not needed at the start of the game, separately using Defold’s Live Update system, instead of including everything in the initial payload.
-
Asset caching and reuse: Avoiding unnecessary reloading of downloaded resources.
-
Texture compression: Using BasisU compression and appropriate texture profiles to reduce asset sizes.
-
Asynchronous sreen preloading: Preparing the shop screen while the previous mission is ending to reduce loading time during transitions.
-
Fixed-step simulation: Separating gameplay simulation from rendering frequency.
-
Engine-side animations: Using Defold’s built-in property animation capabilities for movement and visual feedback to avoid custom script execution in update calls each frame.
-
Event-driven architecture: Organizing gameplay updates through messages and events.
These techniques are useful not only for Poki but also for HTML5 games distributed through other web gaming sites, not even particularly web games, but other platforms too.
Poki Inspector Integration
To simplify testing, use the included dedicated editor command from Poki SDK:
Project → Build Poki HTML5
This builds the HTML5 version of the game and opens it in Poki Inspector, allowing you to test the game’s integration with the Poki SDK.
You can experiment with rewarded ads, check lifecycle events, test browser focus changes, and verify how the game handles pausing, resuming, and audio.
This is particularly important for developers preparing to submit their games to Poki, since testing the game in a desktop build alone is not sufficient to verify its browser and platform behavior.
Architecture
We designed Starbreaker so that developers can reuse the platform-specific implementation without necessarily keeping the space shooter itself.
The project separates reusable application services from the actual game implementation:
-
app/– Platform integration, Poki services, advertising, application lifecycle, and shared services. -
game/– Starbreaker’s gameplay, missions, progression, and game-specific UI. -
ui/– Reusable user interface components (Druid widgets) and helpers. -
learn/– The optional in-game Poki development guide.
You can replace the game-specific logic, visuals, and gameplay while keeping much of the application infrastructure, including Poki integration, input handling, audio management, and save functionality.
The code is organized to make it easier to understand how these systems work together and adapt them to other genres.
Getting Started
-
Download or clone the Starbreaker repository.
-
Open the project in Defold.
-
Select Project → Build to play the game locally.
-
Press P to explore the Poki development tips.
-
Select Project → Build Poki HTML5 to test the web build in Poki Inspector.
The repository includes documentation describing the project’s structure, implementation, web optimizations, and how to adapt it for your own games.
The project is open source under the MIT license (with separate licenses applying to some included assets).
Play it here
This released version’s build on Poki is available here in Poki inspector:
We hope Starbreaker will be a useful resource for both newcomers exploring Defold and experienced developers interested in publishing games on Poki and other web platforms.
If you’ll have questions about the project, Poki integration, or web game development with Defold, feel free to ask in this thread! We’d also love to hear your feedback and suggestions for improving the sample! ![]()
Explore the source code, learn how it works, and use it as a foundation for your own game!




