I've been reading about how to design code for a game. One thing I haven't been able to figure out is - how do you manage writing an outside-game level editor (not an 'in-game level editor') without 'copying' code from the game? For example, you might have to copy all code about the different types of entities you can have. You'll have to add the game rendering code.
My guess is this can be done by making a DLL out of the 'engine' part of the game. Then, share it between the actual game and the level editor.
Or is there a better/easier way to do this?