Delta Engine

Delta Engine Blog

All about multiplatform and game development

Game Development Tool Essentials book is out

Based on the book article Kirsten and me wrote 2 years ago a new book is out. Nice to see my name on a book cover again :)

The book has 220 pages and just 13 chapters and is a bit expensive at the moment. I suggest to wait until the price drops, the ebook is at least a bit cheaper.

Source code can be found in the DeltaEngine/Samples/Labyrinth directory when the next release is is out or on the book download page. The sample game will be available on the StarterKits page as well.

Automatic Mesh Optimizations via Triangle Welding

Not many news on the Delta Engine side, we have been very busy with an internal project that pays the bills. This is what this post is about. v1.2 is however a pretty good improvement over v1.0 and v1.1 and while not new platform or rendering features are coming (since no one is working on those at the moment) we have completely revamped entities (see last post) and the content system as well. Not only it is much easier to use and develop for, the editor is also in a much better state because of reduced functionality and much cleaner design. We are pretty proud and are planning the v1.2 release after our internal project is done in 1-2 months.

From the new "Automatic Mesh Optimizations via Triangle Welding" article in our public wiki:

Goal: Optimize imported complex 3D data from 180k vertices (140k triangles) to ~20k vertices (~30k triangles)

For an internal project we were given huge meshes with tons of vertices (180k unique vertices per mesh) to be rendered on mobile devices (especially slower Android devices, if possible multiple big meshes visible like 3-10). The process of importing needs to be automatic as we do not know which geometry is going to be imported and rendered, for just one geometry a human 3D modeler can obviously redo the geometry and bring it down to a reasonable polygon count. We found no good tool to do this either manually or programmatically, so we had to write our own library for it (not enough open source in the world as I am sure people have done this before). Rendering performance was really bad since each mesh had to be subdivided into 14 materials as well and some needed too many vertices to keep in index buffers with shorts.

Long story short we did 2 things: First we welded the vertices, everything closer than 0.25cm was collapsed into one vertex point, which reduced the mesh 40%. Next we also started welding triangles, which is much more difficult and constantly destroyed our geometry (while it is nice to have 90% merged, that is not really useful if it does not look like the original anymore). This is why we put a lot of extra checks in place to not merge any corner triangle points away and keep the outlines intact and sharp corners as well, but otherwise everything below 10cm (up to 50cm for straight lines) and below 22.5 degrees is collapsed into bigger triangles.

We are still testing, but in some tests we can get rid of 80% of the triangles, we will update this once we have tested it with huge geometries as well (quite slow, needs optimization and we are still refactoring, tests look good so far). All the code sits in the content service of the Delta Engine, so you won't find it in the rendering code of the Delta Engine.

Read the wiki entry for the rest of the article.

Entity Component System in Delta Engine v1.2

After finishing one internal project and now working on the next project (non-game) we found some common problems with content and entities in v1.0 and v1.1, especially when things change over time and the data is not longer compatible (happened mostly in UI controls). Instead of trying to patch things over and over again we redesigned the content system earlier this month to be more data driven. Thanks to that we had some ideas to improve entities as well to be more data driven. Most simple entities have really good performance in the Delta Engine and were highly optimized for the use cases we had (Sprites, Lines, 3D models, LogoApp), but once you start adding more logic, things got slow quickly. Obviously in each case we could optimize it again, but code is not getting prettier and doing it on the build service side is too much work for our now much smaller team.

So instead I experimented around a bit over Easter Holiday and came up with a cleaner Entity System for Delta Engine v1.2 than what we had before. In v1.1 entities can have update behaviors, draw behaviors, components, lerpable render data, any other type of data and have update and draw methods build in so you can derive from them and build things in an OOP way. All the functionality for component data driven design was in there, but only used when it made a solution easier. This added a lot of complexity on the build service side were we basically take all these approaches and make normal component data driven entities out of them again (tons of code gets generated). I ignored the complaining of the platform team and now that I have worked on this myself last month and got it finally working, I have to agree, things kind of got crazy. One of the problems with v1.0 and v1.1 was to support JavaScript and C++ for Android code generation for any kind of entity. Since we allowed so much, things easily got out of hand and something was always not working. Because we had no prior experience to this, we just said this is a big problem and there seems to be no easier solution (probably still true).

Starting with v1.2 entity is just an empty sealed class, you cannot derive it or do any OOP, it just has some optional tags to find things later if needed and some entities can have children (like Buttons nested in a Panel). You can also add components to describe what an entity is about, they are not stored in the entity and can even be reused by multiple entities. Examples are Position2D, Color, Material, Rotation, PhysicsBody, Trigger, Action, etc. Entities can also be just templates, which means no logic or rendering is executed for them, but the data is all there to create new alive instances from it. And you can turn a entity invisible, which turns off the attached renderers while keeping their components and render data alive. That is pretty much it, all of it is data driven, which means we can easily safe it in the editor, there is no functionality in any of the entities or components, it is all just data (in fact we enforce it, if you put anything but public fields in components, the system will detect it and throw an exception).

To make things simple in code as well plus support old v1.1 code as well as we can, an EntityCreator class is available. Obviously not having Update or Draw methods or OOP in entities is going to break all kinds of things inside the engine and some of the games utilizing this. For example Line2D, Sprite or Model are not longer entities, but derive from EntityCreator, which internally just creates a entity and adds all the required components. This way the code stays mostly compatible, is easy to use for newbies not knowing or wanting to use or extend entities, but you are totally free to create your own entities and customize it as much as you want. This is pretty much the only way to create anything in the Delta Engine anyway (as opposed to other engines where you have a huge list of existing classes you can use that do not use the same system as you). Unreal Engine 4 Blueprint system is also an inspiration on what could be done, but we do not plan to do anything as complex and complete, we still like writing code in C#, much faster that way (both in writing and execution speed).

Here are two quick pictures I drew in the last 2 hours while explaining the new system. Maybe next time we should record it so users can benefit from our training as well :)

First whiteboard image is just a bunch of ideas from during the week (going into a more data driven "MVC" way, was changed back to "Systems" and "Renderers" for clarity later):

The next whiteboard image is about the new entity component system in all its glory with data locality explained, components and examples plus how the editor works:

If you want to know more and read additional articles about entity systems check out our wiki page on this topic.

Feedback and Ideas

Hi Community,

we have added a new feature on our website called UserVoice which you can find as light bulb at the top-right directly on each page
or at the menu under "About" -> "Customer Feedback".
This allows you to tell us your ideas which you have for the engine and also gives you the opportunity to vote for each listed idea
and give feedback about it.
This helps us to focus on the things which you really want to see in the engine
and helps you to know what is coming next in then future releases of the Delta Engine Wink.                               

Since we like to make our engine even more attractive to you, we are looking forward to hearing from you. Smile.

                                          

Entries welcome for the Monthly Contest

Every winner in each category (Best Game, Best Tutorial and Best Code) gets these cool prizes with a value of over $300 each.

To participate, post your submission in this thread. For general information about the contest, look here.

 

The Creeps are closer and closer!

 

Creepy Towers release is imminent! While you are waiting, why don't you take a look at a short gameplay video of its prototype?

Delta Engine Grand Prix!

Turn on your engine! But this time it's not the virtual one: we are talking about real go-kart engines! 

Last Tuesday the company organized a company trip to the closer indoor go-karts circuit. Most of the guys joined the event and this made it possible to have quite a heated but friendly competition. 

The track is not very big or long,but it is pretty funny anyway, featuring several tight turns and a pretty long straight road. Overtakings are not easy at all, but this made things even more thrilling, with some small bump here and there and a few harmless accidents.  

The race did not contemplate a real grand prix, the challenge was to clear a lap in the shortest time possible. The final results were quite surprisingly: a few of us were really happy, while some others a little less...  

Jupiter is out there!

 

 

 

 A few days ago the fifth Delta Engine Milestone was released: Jupiter

As you might know, each release takes name from one of the Solar System planets; starting from Neputune and going toward the Sun, we covered half of the path. If you are curious about our road-map and want to know more, feel free to visit the proper page on our website.

To find and freely download DeltaEngine in its 1.0 version, visit the download page. For more info, support or want to discuss any of the engine features, please visit the forum and talk with us!

Get prepared! The Creeps are coming...

Not much time left before Creepy Towers is released! To keep its halo of mystery on, we will not unveil the precise date yet, but be aware that it is not taking long! 
You will have to fight hordes and hordes of Creeps! To face scary and powerful Villains! To defend yourself from a dark and cruel menace. But fear not, because you will not be alone! Brave and loyal heroes will stand your side: small in size but huge in courage and willpower; they are the Toy Squad!

Creepy Towers and its most epic battles will be available on Android, Web, Windows 8 and Windows Phone devices from the very beginning! But, soon, it will be released on more other platforms too!
Stay tuned for more infos, visit Creepy Towers Website and Like! it on Facebook for being up to date!

Milestone 5 is about to be released

The fifth Milestone of Delta Engine is about to be finally released! This is Delta Engine v1.0, the first real, stable one. 

It contains the super cool Editor and all the tools needed for starting your own project and easily deploy it on Windows, Web HTML5 and Android. And it is open soucre!

What are you waiting for? Watch the introductory video and visit the download page and get your free version now! GitHub, CodePlex and nuget support are coming next week. The current download is the release candidate (RC) and will go through an extra week of testing.