Well, after some research and knowing the issues of having a single pipe for logic and rendering, I have decided to modify the Nytro rendering provider scheme, to render in a separate thread, so your logic will run on the main thread and the rendering will take place on a separate thread. It all goes like this: the logic thread fills a queue with rendering commands, while the rendering thread consumes a previous filled render commands queue, when the logic thread finishes to fill its queue, at the end of a logical frame, it switches the queues, and the render thread has a new queue to consume. No other change is needed in the engine, but that in the D3D render provider plugin. This will allow for example to have a uninterrupted render cycle in the editor window, at full fps, and in dual core systems, it will improve the fps, because you have two threads on each core, and for more than two cores, we’ll have other threads spawned for terrain loading, content streaming, etc., plus in the future, if the engine would have a PS3 version, it would benefit from its parallel architecture.
Archive for November, 2009
Multithreading rendering & logic
Sunday, November 22nd, 2009Editor progress in C# and Unreal3 UDK release
Wednesday, November 11th, 2009Well it seems that C# integration is working very fast for the moment, its a great thing that I can edit the UI, hit compile, and 1 second later all editor visual C# side is built. On the other note, Unreal 3 SDK is free for non-commercial use, no C++ headers/sources, only scripts for now, and they have some commercial license type also, so it may kill some commercial indie engines out there; me ? I’m going further on with Nytro
, because I think the engine is very nice to work with and it can be a great tool for making games, with C++ SDK included of course, has more power, instead Unreal3 with only scripts, but this Epic release will surely shake the world of indie game engines, we’ll see what the outcome will be in the next 6-12 months.
Editor GUI, C# is the winner!
Thursday, November 5th, 2009Yes, tried and tested all other APIs/UI sdks, but seems that C# .NET is the easier to use, tested an editor mockup, C# compiles fast, even with many controls, and even if you make modifications, its automated in many ways, also the P/Invoke works ok, exchanged structures/strings between the C# editor UI and some C++/CLI NytroEditor.DLL wrapper for the engine. So it works like this:
We have 3 components:
- NytroStudio.exe ( C# user interface )
- NytroEditor.dll ( C++/CLI engine glue/wrapper, for rendering the viewport, rendering debug info, handling mouse actions for the viewport, wrapping engine functionality, this DLL is used by the C# UI directly)
- nytro.dll ( the actual game engine core dll )
NytroStudio.exe —calls—> NytroEditor.dll —calls—> nytro.dll
( yes, pink NytroStudio, C# is gay
)
So, for now this will be the scheme for the world editor, compiling is fast, things are kept simple and clean, looks are nice, we shall see how its holding
.
