Begin with editor or "main" game?

Started by
13 comments, last by MaulingMonkey 18 years, 7 months ago
Quote:Original post by Basiror
i wouldn t start with the engine and especially i would share the same renderer for the editor with the engine this makes things too complexe

before starting with an engine or a editor i would build a library which features most of the things needed to get something going

e.g.:
- a file system with pak file support
- a general purpose image loading class
- several manager classes that coordinate the core of the engine
- a network wrapper if you plan to integrate a network at all
- math library vector2d vector3d matrix plan bbox cylinder sphere...
- math library with several other implementations you might need to in your future projects
- a pool allocator implementation compatible with STL list and STL vector
- bitpacking class for fast bitpacking of network packets
- maybe a compression lib huffman .... whatever you like
- a shader implementation that allows you to specify how to use a certain texture in your renderer

these are a few things most engines need and designing them properly with a consistent implementation will spare you are lot of time and trouble so you can start of with your engine/editorproject without interupting your work for a ton of side by problems to solve


I considered that to be part of implementing the engine, though you´re surely right most of these things are not strictly part of the engine itself.

Quote:Original post by markr
Sounds like, one way or another, it's basically a tile map.

Therefore I strongly encourage you not to write an editor, instead use another tilemap editor, of which there are several already installed on your machine (I promise) if you think laterally. Candidates are notepad and mspaint (Assuming you are using Windows - if not, you will have equivalents anyway).

There is likely to be some map-editing which is not easy enough to be done with notepad or paint, but you can probably worry about that later (setting object coords, properties etc)

Write the game (or at least the main bits of the engine) first. In the meantime, have a hard-coded map which you create at runtime (could be random too, or generated according to a pattern).

Mark


good point to use some small "hard-coded" map or some extremely simple map format which can be stitched together in notepad or something like that. But I´m quite positive there are lots of things I´ll need an editor for when the engine and the game progresses, e.g. placing triggers, items, NPCs, logic entities and so on around the map. Also I want to use seperate meshes for the background of the tile and the platform (i.e. floor / ceiling) in that tile, which would be quite painful to do with something like notepad on the long run.
Oh, and yes, it will definitely be a tile map. Though it´s not 100% settled whether we need a simple 2D tile map, or perhaps we need a 3D tile map, because we might want to be able to connect 2 different halls in the Z-direction, would add something to the game... but that´s not settled yet and is probably something to be added quite a time later on.
At least that simple "handcrafted" map will serve well while implementing the most basic features of the engine.
Thx for the input!

@evolutional:
A nice idea, too, I think. So you essentially fire up the game app and enter some kind of "edit mode" where you´re able to change the map the way you want it? Will have to think about that when the complexity of the game itself becomes more clear, don´t know yet, whether it´s a feasible approach for that project, since it might well include many scripts... but an in-game editor with scripting functionality would be great :)
Advertisement
you can consider the whole shader and image processing implementation relevant for your editor

why writing 2 implementations for one and the same thing

this gives you the possibility to test you implementation before you use it in the engine

http://www.8ung.at/basiror/theironcross.html
Assuming you've got your libraries and support stuff down, the editor. You will save a lot of time in the long run if you know you can quickly make good test data.
I did the first period of game development with a routine that would build a map from a simple text file.

Here is an example :

        group map        {            string 000 = "eeeeeeeeeeeeeeee";            string 001 = "ehhhhhhhhhhhhhhe";	    string 002 = "ehhhhhhhhhhhhhhe";	    string 003 = "ehhhhhhhhhhhhhhe";            string 004 = "ehhhhhhhhhhhhhhe";            string 005 = "ehhhhhhhhhhhhhhe";	    string 006 = "e--------------e";	    string 007 = "e-HHHHHffHHHHH-e";            string 008 = "e-HHHHHffHHHHH-e";            string 009 = "e-HHHHHHHHHHHH-e";	    string 010 = "e-HHHHHffHHHHH-e";	    string 011 = "e-HHHHHffHHHHH-e";            string 012 = "e-HHHHHffHHHHH-e";            string 013 = "e-HHHHHffHHHHH-e";	    string 014 = "e--------------e";	    string 015 = "eeeeeeeeeeeeeeee";         }                                                                                                                         group entities        {            string 000 = "eeeeeeeeeeeeeeee";            string 001 = "ehhhhhhhhhhhhhhe";	    string 002 = "ehhhhhhhhhhhhhhe";	    string 003 = "ehhhhhhhhhhhhhhe";            string 004 = "ehhhhhhhhhhhhhhe";            string 005 = "ehhhhhhhhhhhhhhe";	    string 006 = "e--------------e";	    string 007 = "eHHHHHHffHHHHHHe";            string 008 = "eHHH%HHffHH*HHHe";            string 009 = "eHHHHHHHHHHHHHHe";	    string 010 = "eHHHHHHffHHHHHHe";	    string 011 = "eHHHHHHffHHHHHHe";            string 012 = "e-HHHHHffHHHHHHe";            string 013 = "e-HHHHHffHHHHHHe";	    string 014 = "eHHHHHHf&HHHHHHe";	    string 015 = "@eeeeeeeeeeeeeee";	}                                                                                                                 


I also had other sections to define what each letter represented.

This way I could flesh out the game before diving into the editor.

Now that I have a real editor, I switch back and forth all the time as I add features to both the editor and game.
I tend to advocate iterative development, which would mean I'd answer "both".

Write a base framework for the game. Prehaps it does nothing more than parse and store a crude tilemap format. Create a stub "editor" which prehaps does nothing more than view it using Qt components (or whatever you choose). Create a stub "game" framework which does the same thing using OpenGL (or whatever you choose).

Viola. Add in more pieces on top as you desire. You get to provide maps using the editor to test out the next piece of the game, and you get the game to test that you and the editor are on the same page :-).

This topic is closed to new replies.

Advertisement