Getting Started
Strawberry Game Engine
Simple. Fast. 2D.
What is Strawberry?
Strawberry is a 2D game engine designed from the ground up for simple and fast game development. Whether you are prototyping a quick idea or building a full-featured 2D game, Strawberry provides a clean, lightweight framework that stays out of your way and lets you focus on what matters — making your game.
Core Documentation — Not the Editor
This documentation covers the Strawberry Core — the programmatic API of the engine. It is written for developers who want to create games with just code, without relying on a visual editor.
Strawberry also ships with a separate Editor application that provides a graphical interface for scene composition, asset management, and live previewing. The Editor is documented elsewhere and is not covered in this guide. If you are looking for Editor-specific documentation, please refer to the appropriate section of the docs site.
The Core and the Editor are independent. You can build complete, shipping games using only the Core API — the Editor is entirely optional. Many developers prefer the code-only workflow for the full control it provides, and this documentation is written with that workflow in mind.
This is just an explanation of what Strawberry is, and how it works. you can skip this document and jump into developing games!
Powered by C# and .NET
Strawberry is built entirely on C# and the .NET runtime. There are no custom scripting languages, and no domain-specific languages to learn. If you know C#, you already know how to use Strawberry.
The engine targets .NET 8+, which means you get access to the full modern C# language feature set — from pattern matching and records to source generators and nullable reference types. The .NET runtime also provides:
- High performance — The .NET runtime features a sophisticated JIT compiler, aggressive inlining, and Span-based APIs that make hot paths like rendering and physics fast enough for real-time games.
- Mature ecosystem — You can use any NuGet package in your game. Need a JSON serializer? A custom audio decoder? It is all available through NuGet, the .NET package manager.
- Strong tooling — Visual Studio, Rider, and VS Code all provide first-class C# support with IntelliSense, debugging, and hot reload.
- Type safety — Catch errors at compile time, not at runtime. C#'s strong type system prevents entire categories of bugs that are common in dynamically-typed game scripting languages.
Your game code is compiled to a native assembly — there is no interpretation layer and no scripting VM overhead. What you write is what runs.
Cross-Platform
Strawberry is a cross-platform engine with first-class support for four major targets:
| Platform | Status | Notes |
|---|---|---|
| Windows | Fully supported | Primary development platform. x64. |
| Linux | Fully supported | Tested on Ubuntu. x64. |
| Android | Fully supported | ARM64 and x64. Touch input and sensors mapped to input system. |
| WebAssembly | Fully supported | Runs in any modern browser. No plugins required. |
The same C# codebase compiles and runs on all four platforms without any platform-specific #ifdef directives in your game code. Platform differences (file system access, input methods, window management) are abstracted by the engine's platform layer.
WebAssembly — Games in the Browser
WebAssembly (Wasm) is a binary instruction format that allows code written in languages like C# to run directly in web browsers at near-native speed. Unlike older web game technologies that relied on plugins (Flash, Unity Web Player) or JavaScript transpilation, WebAssembly runs inside the browser's existing security sandbox with zero installation requirements for the end user.
When you build your Strawberry game for WebAssembly, the .NET runtime and your game code are compiled to a .wasm file and accompanying .js glue code. The browser downloads these files and executes them just like any other web application. The result is a game that:
- Requires no installation — Players click a link and play immediately.
- Runs at near-native speed — WebAssembly performance is typically within 10–30% of native code for compute-heavy workloads, and the gap continues to close as browser engines improve.
- Works everywhere — Any device with a modern browser (Chrome, Firefox, Safari, Edge) can run your game, including Chromebooks and locked-down corporate machines.
- Is fully sandboxed — No special permissions, no security warnings, no gatekeeping from app stores.
The engine's OpenGL rendering backend is automatically mapped to WebGL 2.0 when running under WebAssembly, so your rendering code works identically on the web without any changes.
For more technical details on .NET's WebAssembly support, see the .NET WebAssembly documentation.
OpenGL Rendering
Strawberry uses OpenGL as its rendering backend across all platforms. OpenGL is the most widely supported graphics API in the world — every desktop GPU, every mobile chipset, and every modern web browser implements it. This choice is deliberate: it allows Strawberry to maintain a single, consistent rendering path across Windows, Linux, Android, and WebAssembly without the complexity of juggling multiple graphics APIs.
What this means for you as a developer:
- Consistent behavior — Your sprites, shaders, and blend modes look identical on every platform because they all go through the same OpenGL rendering pipeline. There are no "works on DirectX but not on OpenGL" surprises.
- Custom shaders — Strawberry exposes a shader system that lets you write GLSL shaders directly. If you have written shaders for OpenGL before, you already know how to write them for Strawberry.
On Android and WebAssembly, OpenGL ES 3.0 / WebGL 2.0 is used. On Windows and Linux, the engine targets OpenGL 3.3 Core Profile. These are well-established versions that are supported by virtually all hardware manufactured in the last decade.
For more information about OpenGL, visit the official OpenGL wiki or LearnOpenGL — an excellent free resource for learning modern OpenGL.
What's Next?
Now that you know what Strawberry is and what it stands for, it is time to set up your development environment and write your first line of game code.