Osnowa — a roguelike framework for C# with ECS and Unity integration
The goal of Osnowa is to simplify creation of roguelike games. It provides a set of tools useful in this genre, as well as a template game. It’s also flexible — the framework code is quite decoupled and you can plug your own implementations of interfaces almost everywhere.
The name (spelled osnohvah) comes from Polish word for warp and indicates Osnowa’s purpose to be a solid base for creating grid-based games.
The framework is well integrated with Unity in order not to reinvent the wheel. Unity’s features like UI, sprites, tilemaps and assets are used as a presentation and configuration tool. That being said, Osnowa’s code is not very tightly bound to Unity engine and after some modifications it would still be possible to use it with something else. It’s also possible to use only some modules of Osnowa, like pathfinding or field of view calculation.
If you haven’t noticed yet, Osnowa is free and open-source.
Made with Osnowa:
The easiest way to see what can be made with Osnowa is to check out these games made for 7DRLs 2018-2020:
- ECS architecture (using Entitas),
- pathfinding using JPS and A*,
- Field of View (FOV) calculation,
- utility-based AI basing on pluggable skills which represent coded activities,
- energy-based turn management system (following Robert Nyström’s article),
- 2D tilemap with multiple layers integrated with Unity tilemap; auto-generating context-aware RuleTiles,
- fast and memory-efficient flood runs / Dijsktra maps (using FloodSpill library),
- map generator (loosely based on Amit Patel’s article),
- storing game assets like configuration and entity definitions using Unity’s ScriptableObjects.
- generator of Unity neighbourhood-aware tiles based on prepared tilesheet
Some open-source resources I’m using in the project are:
Osnowa is confirmed to be compatible with 2019.2.9-2019.2.21 versions and probably newer ones. It’s not compatible with Unity 2018.
State of the project
The framework started its life in 2019 when I realised that after over 1 year of full-time development of my own roguelike game I’m more interested in good architecture and tools than in the game itself. Since then I made decision to publish the good parts of what I’ve made and make it an open-source project. After a few months of refactoring, polishing and simplifying I reached the current state of the framework where it’s ready to be used by the others.
However, keep in mind it’s just the beginning of its public life. Until February 2020 Osnowa hasn’t been used by developers other than myself (this luckily changed during 7DRL 2020). Hopefully it will grow, the documentation will be improved and some problems will be solved. But its future will depend on interest, my free time and contributions of other developers. Also yours. Engagement in the project will be welcome with open hands.
At the current stage of development consider Osnowa to possibly have breaking changes for each minor version (e.g. between 0.1 and 0.2). Of course many changes may still be merged without problems to your project.
Currently the easiest way for getting familiar with Osnowa is to open the example project built on top of it and look around. This instruction will guide you around the project. In the wiki there are also more docs about specific features.
Then you should be able to modify the code of the template game which is attached to the project or to try taking some parts of Osnowa to your project.
Feel free to join the Gitter chat if you want to talk about the project: https://gitter.im/Osnowa/community
Here’s the Twitter account of the creator: https://twitter.com/PawelRoguelikes