Developing games is a rewarding endeavour – but also a difficult one. It really takes time to do most of the programming, create lots of game content and finally stitch it all together. This holds true especially when there are no tools for content integration and testing – or you’re the only one maintaining them.
Duality is a flexible 2D game framework written entirely in C# – and it’s here to make things a little easier for you. It provides both an extensible game engine and a visual editor to match. There will be no need for a level editor, testing environment or content manager because Duality is all that by itself. And best of all: It’s free.
The main goal of Duality is to help you developing your game – not biasing it by limiting you to use predefined elements. Duality is not a game maker. Its an engine that delivers basics for you to expand.
To allow you to do that, Duality is designed based on a plugin concept and able to load and reload plugins dynamically – even while the editor is still running! Notice some strange behavior? Just pause the game, tweak the source code, recompile and resume.
The Core Plugin contains your actual game logic. It’s the place where scripting happens and game rules live. Since Duality is a component-based game object system, this is usually done by writing your own Component types which can then be used in game and editor.
An Editor Plugin on the other hand is there to help you extend the user interface you’ll use when not writing source code. This is the place for custom content importers, preview generators, editor forms and whatever else you might need to improve your workflow.
When using Duality’s visual editor, what you see is what you get. It’s not only some GUI that emulates what your game might look like – there is actually an instance of your game running inside the editor and you are directly manipulating its state. You can even switch to Game Mode and play it while being able to use full editing functionality at the same time!
Cheating Playtesting has never been easier.
Editor layout and composition are fully configurable and can easily be adjusted to fit your personal workflow and preferences – all based on an intuitive docking behavior similar to the one you might know from Visual Studio.
Duality’s editor does its best to integrate itself into your development environment and is designed to interact with Visual Studio or Visual C# Express. A single mouse click generates a suitable Visual Studio solution containing a new game- or editor-plugin ready to be extended by your own source code. The editor is able to detect each recompile and automatically reloads plugins whenever necessary. When modifying content files externally, Duality will reload all related resources, allowing you to directly see the result of your adjustments.
If some parts of the editor are insufficient for your needs, Duality won’t be a roadblock. Just extend it via your own plugin or use your own external tool. Duality’s visual editor is designed to contribute to your workflow – not prevent you from optimizing it.
Key Features (Engine)
- Duality is based on OpenGL / OpenAL and C# / DotNet 4.0
- Its plugin architecture easily allows you to extend Duality – both engine and editor are designed to flexibly interact with whatever you might add.
- Component-based GameObjects provide a clear structure for game logic and allow your own additions to blend in seamlessly
- Duality already covers most of rendering, sound, user input and rigid body physics – just waiting to be used.
- An integrated content management system keeps track of the resources that are requested and assures nothing is loaded twice.
- For any kind of data, there is semi-automatic XML or binary serialization. In most cases, you don’t need to spend a single thought about how to load, save or clone even your own custom objects – but if you insist, you can still do it yourself.
- Lots of helper classes for logging, profiling, debugging, randomization, math, user data, transformed 2d rendering, text formatting, file paths, …
Key Features (Editor)
- The Duality editor (or ‘Dualitor’) is based on Winforms and WeifenLuo’s DockPanel Suite.
- It is designed to realize the WYSIWYG concept: Edit anything you see and see everything you edit. You can even do your playtests inside the editor while still having full access to all its editing capabilities.
- Using its plugin architecture, it is possible to extend the editor in every way – from simple user actions to whole new sub-editors.
- Don’t like how the interface is structured? Good thing it’s a fully customizable interface. Just re-arrange, add and remove editing elements until you’re comfortable.
- A lot of editing actions can be done in an intuitive way using intelligent dragdrop. You pick this thing and drop it over there - and the editor will try to figure out what you’re doing.
- The integrated help system knows where your mouse cursor points to and provides useful information whenever possible.
- To integrate itself into your development environment, Dualitor monitors its content- and plugin directories. Whenever files are modified externally, the editor automatically reloads the affected content.
Can I use it?
A very good point to start is the GitHub page of Duality where you can find Wiki articles and Downloads like techdemos or the latest binary release. If you want to actually start developing your first Duality project, you’re going to need a few simple things:
- Check whether you’ve already installed .Net 4.0. This is usually the case, so you could just skip this and come back here if you’re getting funny error messages. Otherwise, install it.
- You’re going to need some version of Visual Studio. If you have access to a professional version of Visual Studio, install it and assure the C#-Checkbox is checked when the respective dialog pops up. If you do not have access to a professional version, you can get an express version for free.
- That’s it! Now grab the latest Binary Package and start developing! In case you’d like to access the engines source code, you can check out the latest source revision and build the framework yourself – but that’s purely optional. For a more detailed guide on how to get started with Duality as well as more documentation, you might want to visit the google code project page as mentioned above.
Please keep in mind that Duality is still in development. Many things aren’t perfect yet – and many things may still change. You are encouraged to actively participate in the process of making Duality a reliable, comfortable game development framework. There are a lot of ways you can contribute – even if only by exploring Duality and giving feedback. Probably the best place to do that are the Community Forums. See you there! And have fun
How can I help?
First of all: Keep your eye open for bugs and report them. In a project of this size, it’s simply unlikely that I will find all the bugs by myself – there’ll always be some slipping through my test cases, but you can help me track them down. If you have any feature requests, the issue tracker will gladly accept them too! Even if you just want to note that something is counter-intuitive or is less-than-optimal regarding your workflow, just file an issue and I’ll take a look at that.
If you decide to build and release a game, I’m always glad to be credited for contributing Duality to your development progress. In case you want to do it the fancy way, here are some logo images you can use.
Well, what else can you do? Buy me a drink when you happen to run into me. Until then, you can remotely buy me a drink via PayPal. Here’s one of those neat buttons:
Ah, the wonders of technology.