Jump to content

  • Log In with Google      Sign In   
  • Create Account

Fetze

Member Since 13 Nov 2008
Offline Last Active Sep 19 2014 07:32 AM

Topics I've Started

Duality - A 2D GameDev Framework

22 December 2013 - 07:00 PM

Hey guys,
 
as some of you might know I'm working on this game engine called Duality, and this thread aims to be a mixture of occasional devblog and discussion platform for anything related to it. There's been a lot of progress in the past months, and I'm slowly beginning to think that this project can be of actual use to others, so... let's find out!
 
What is Duality?

  • It's a 2D game engine that comes with a visual editor.
  • Both engine and editor are Open Source (MIT license).
  • It's all based on C# and OpenTK.
  • The frameworks architecture incorporates a plugin system with hotswap support.
  • It is highly extensible, even without touching the original source code.
  • Work on this project began somewhere around November 2011. It's still in active development.
     

Asteroids.jpgTetris.jpgdynlight.jpg


Why does it exist?

  • My initial goal was to stop writing a new engine for every game I made, and instead create one framework that can serve as a basis for all of my future projects, regardless of genre or gameplay elements. This would allow me to spend less time on engine coding and more time on making games. Ironically, where I ended up at first is doing even more engine coding for quite a while - but by now, Duality has grown to be pretty usable, and I've developed a lot of projects just using it.
     
  • Duality exists, because I've always wanted a C# framework like this, but there was none that "had it all": Focused on 2D games, fast iteration times and visual editing, but at the same time free, Open Source and designed to be vastly extensible. While there are a lot of products on the engine market that do a really great job, most of them are still closed systems: Something that you might buy in a shop and use regularly, but wouldn't bother modifying, because it is generally a bad idea or downright impossible. On the other hand, Duality is kind of a construction kit.
     
  • Also, I have always been a fan of modding, i.e. being able to take an existing game as a player, and add my own stuff. One of the core ideas behind Duality is, that you, the developer, will use it to build your game and extend it wherever necessary. It's visual editor can serve as level editor, content database, sandbox and testing environment. When releasing your game - just leave the editor in there. It doesn't cost you anything, but your players get to use the same editing system you had: Duality, tailored exactly to fit your game.
     

Cc8rBXPh.jpgphysics5.pngMateTerrain.jpg


What can it do?

  • Content and Resource Management
    Serialization, Importing and Updating Content, Custom Resource format using Binary or XML data, Friendly to Version Control systems, Robust in case of errors and old data
  • Scene Graph and Object Management
    Component based GameObjects, Parent-child relations and transformation, Shared extensible Component interfaces, Scene queries
  • Audio
    Playing and configuring sound effects and music, Streaming, Randomized sounds, 3D audio
  • Rendering
    Camera based, Multiple Renderpasses, Postprocessing, Automated Batching and Z Sorting, Fake perspective using parallax scaling and scrolling
  • Physics
    Based on a custom OpenTK version of Farseer Physics, Collision Detection, Rigidbody Physics, Visual Shape Editing
  • User Input
    Keyboard, Mouse, Joysticks, Gamepads, Open to Custom Input methods
  • Visual Editor
    What-You-See-Is-What-You-Get, Resource Hotswap, Plugin Hotswap, User Advice based on XML code comments, Extensive Dragdrop support, Multiple Views, Docking based on WeifenLuo library
  • A lot of other fancy stuff
    Profiling, Logging, Text Formatting, Animation, Prefabs, Cloning, etc.
     

oDjnZEMh.jpgnullpunkt_screenshot_1.jpgdualitor4.jpg


Where can I find more information?

physics4.pngdualitor1.jpgdualitor3.jpg


What now?

Well, I guess that's up to you. Maybe take a closer look on Duality? Use it for your upcoming project? Or even contribute to the project yourself? Whatever it is, feedback is always welcome and I'm looking forward to versatile discussions and constructive criticism. Let me know what you think!


First Duality Demonstration

25 May 2011 - 12:25 PM

Hi everyone,

I've just released a first demonstration version of my 2D game engine and game creation toolset Duality. Both engine and toolset are written in C# and based on .Net 4.0 and OpenTK. Long story short: There is a demo video on youtube showing what you can do with the current toolset version, and how to do it and I'm collecting feedback.

http://www.youtube.com/watch?v=g3FmwBSEy-U


If you want to test it yourself, you will need .Net 4.0 and Visual C# Express 2010 (or Visual Studio 2010). Here's the download. If you want more information on development or internals of Duality, you might want to check out my blog.


Any feedback is appreciated - comments, bug reports, feature requests, anything will help me improve future versions. :)


[Release] "Nullpunkt" / "Point Zero"

03 November 2010 - 09:47 AM

Hey there, GameDev. :)

I've just finished my recent game project. It is a 2D space shooter named "Nullpunkt" (or "Point Zero") I've been working on the last 2 years. The game engine is written entirely in C# and based on OpenGL and OpenAL.

Long story short, here it is:




--[ Trailer ]--
--[ Download (German) ]--
--[ Download (English subtitles) ]--


A note on the english version: This game was developed and targetted to be entirely german. In response to some requests, I did a subtitled english version, but the translation might lack quality; I did my best, but.. well.. it's not my native language or something ;)

If you understand german, choose the original version.




Ah, and special credit to Tim Suleymanov who did most of the (in my eyes) great soundtrack. He's also registered here, so in case you need music - he might be your man ;) Thanks, Tim!

2.5D realtime shadowing advice?

02 October 2010 - 11:25 PM

Hey there,

I'm currently thinking about how I would create a modern version of a 2D tile-based RPG engine. You know, something like that:


Only with the twist to inject a little more "graphic awesome". Dynamically lighting tilesets and objects, equipping them with normal- and height/slopemaps is a good start and I've done that before. In my first try, the environment was real 2d and it was terrible fiddling with shader parameters to correctly handle walls/floor tiles, height levels and such. My second try is to generate 3d coordinates like this:



You won't be able to turn the camera like I did for illustrative purposes, but you get the idea. Using the z-buffer should also make some things a little easier. I think, some kind of deferred rendering would'nt be a bad idea as the screen resolution will be naturally small and fixed (e.g. no need for big fullscreen textures) and it could make lighting a little easier to handle. Not sure about this, though.

Lighting everything shouldn't be a problem now, but I want shadows. In the best case: Soft shadows. I've gone through a terribly ineffective multipass idea and rejected it. I took a look at stencil shadowing but such sharp shadow edges won't look good in a graphical environment like that. I also looked at some pure-2d shadowing techniques but I will run into problems with them due to different height levels, wall tiles and objects. Any ideas or suggestions on this?

[.net] Perf considerations: Optional component methods

20 August 2010 - 06:41 AM

Assume the situation of a component-based gameobject system where you derive all your components from a general "Component" class. There are a lot of situation-specific update calls and not every component needs all of them. In fact, most components only utilize few of them.

Let's say we've got this set of methods that could, possibly, be overridden by derived components:
--> OnUpdate
--> OnPreUpdate
--> OnPostUpdate
--> OnRender
--> OnInit
--> OnFirstUpdate
--> OnActivate
--> OnDeactivate

--> OnCollisionBegin
--> OnCollisionEnd
--> OnCollision

--> OnMouseEnter
--> OnMouseLeave
--> OnMouseOver

--> etc. etc.

While there are general methods like OnUpdate that any component will override, more specifiv ones like OnCollision, OnPreUpdate, etc. won't be used much.

Now, to the point: With all those virtual per-frame calls, it looks like a "huge" performance loss, compared to the gain (zero, mostly). Would it be significantly faster to keep a set of delegates, manually created via reflection and null-checking them before calling any of the methods? This would avoid unneccessary calls but include an initialization overhead for each object because each object will need to generate its own delegates.

Another alternative: Using virtual overridden methods (No delegate creation overhead) but a reflection-generated bitmask which of them are actually used. To me, this sounds like the best method. What do ypou think?

PARTNERS