📜 ⬆️ ⬇️

Duality - easy and fast engine for igrostroya under Windows (Extras.)

Greetings reader.

This publication will discuss a promising and fairly young game engine, which unfairly remained in the shadow of such giants as Unity or the Unreal Engine.

Developers are an association of enthusiasts under the leadership of Adam's Lair.
')
As the official website tells us: “Duality is a modular 2D gaming engine that comes with its own editor. It is easily extensible, written in C #, and uses OpenGL to display graphics. ”A popular component-oriented architecture is used to write logic in Duality. We wrote a component, attached it to the game object and everything works, completely saving the programmer from the routine. Another advantage is the support of plug-ins that anyone can create and connect to their projects.

- Classic, - you will say and you will be right. Duality is not worse than other tools, it also takes control of resources, provides input-output subsystems, graphics, audio and physics simulation. If you add the convenient Dualitor editor to this, you can get an excellent environment for developing indie games.

So why do I need Duality when there are more extensive solutions like Unity?



It might be worth a try.


I think you want to see how it all looks.

Editor. Rustic, but functional. It shows the familiar Scene View, Project View, Inspector and Camera View. Below is a hidden panel logs.

Dualitor


And this is a sample code for the component that controls the movement of the spacecraft.

Code
using Duality; using Duality.Components.Physics; using Duality.Input; namespace Duality_ { [RequiredComponent(typeof(RigidBody))] public class Player : Component, ICmpUpdatable { public void OnUpdate() { RigidBody rb = GameObj.GetComponent<RigidBody>(); if (DualityApp.Keyboard[Key.Left]) rb.ApplyLocalForce(-0.001f * rb.Inertia); else if (DualityApp.Keyboard[Key.Right]) rb.ApplyLocalForce(0.001f * rb.Inertia); else rb.AngularVelocity -= rb.AngularVelocity * Time.TimeMult * 0.1f; if (DualityApp.Keyboard[Key.Up]) rb.ApplyLocalForce(Vector2.UnitY * rb.Mass * -0.2f); else if (DualityApp.Keyboard[Key.Down]) rb.ApplyLocalForce(Vector2.UnitY * rb.Mass * 0.2f); } } } 



I do not know about you, but I am pleasantly surprised by the simplicity of this framework. By the way, an indicator of the success of the engine are the games made on it. Since it is used by small teams, the games are not released at the AAA level. So there is really nothing to boast about. On this site you can see the finished games .
I also know of one serious project that is currently under development and posted on Steam, but it’s better to write about this another time.

What you shouldn’t expect from Duality


Cross-platform engine is one of its weaknesses. Only the Windows OS is fully supported, the rest are either supported by third-party developers, or not supported at all. There is also no built-in implementation of the UI, but since Duality is a modular engine, there are plugins that eliminate this disadvantage.
The next major drawback is the network API problem. At the moment there is no plug-in or kernel module that would implement multiplayer features.
And the main reason why the engine loses to competitors is a small community. Too few people who are engaged in the development of this good tool.

The main features of the engine:




In conclusion of this brief review, I want to say that there are many other game engines that may not be inferior to this and this is good. Of course, I do not urge you to abandon everything that you already use, but I present to your attention a quality project. If you are a lone developer or a small team looking for something simple and powerful enough, try Duality.

Official site.

Source: https://habr.com/ru/post/441608/


All Articles