Hitting a Wall - Editor/Tool creation

0fe338e327ceff65fc2df6da21f12488
0
neptune3d 101 Sep 23, 2011 at 14:55

Hi all,

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.

2 Replies

Please log in or register to post a reply.

A8433b04cb41dd57113740b779f61acb
0
Reedbeta 167 Sep 23, 2011 at 16:31

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.

Ceee4d1295c32a0c1c08a9eae8c9459d
0
v71 105 Sep 24, 2011 at 21:40

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