I have created the basics of a small engine to play with, it's working the way I want but I am hitting a wall when it comes to an editor.
My initial plan was to use a basic winform with controls in a grid pattern that are dynamically generated on startup and use an XML file to populate the grid with the proper component for that space. It works, but is slow as @\\$#% (has over 1000 controls, lol, shoulda thought that one through a bit more).
So...I am interested, instead, in doing it right. I was looking at the innovation engine tutorials for a way to create an engine and then use that engine to create an editor, but the tutorials are incomplete. I have checked many, many books for a proper engine design/editor but they all seem to be focused on implementing pieces of an engine and not the whole design.
Can anyone recomend a book or site that covers rolling an engine into an editor (of your own design, I want to understand the theory and not just use something already designed like unity).
Any suggesetions are appreciated, this has been driving me crazy for a week. :wallbash:
Thx Guys and Gals.
There's two general approaches that I can see succeeding: one would be to pull out the loading, object-management, and rendering parts into a library separate from the game executable. The game and the editor could then be two applications that both use that library, but each would have its own controls and logic. (Actually, some of the logic, e.g. for animations, FX, and suchlike, might be in the library so you could preview those things in the editor.)
The other approach, which seems more difficult to me, is to keep it all as one application that lets you switch between engine-mode and editor-mode at will. This is probably the ideal from a workflow point of view as it allows the quickest iteration time, but it also seems like the code will be much messier, with the game parts and editor parts ending up more closely intertwined. You would have to do some very good up-front planning to avoid that.
For my engine i am using mfc , i have used the visual studio template, the one which is mot likely similar to the visual studio editor itself.
Its not difficult to readapt to your needs, much more easyer than the previous visual studio versions.
I have used an opengl rendering context in the view class.
Everything is much smoother now you can make windows componets interact between each other trhough the use of dedicated functions in the main.cpp class.
So basically i call the init engine function in the view precreate window class member, and i call the engine destructor in the view.cpp destructor as well.
I render everything in the draw function.
So basically you can write your engine and just call init, draw, and clase functions in the corresponding view.cpp 's class data members, mfc if fast loading buttons , toolbars and whatever.
Maybe i am off topic i think but its 23.42 here