Difficulty in Creating own Game Editor

Started by
5 comments, last by markr 11 years, 3 months ago
Good Day Guys!
I am trying to create a game,in the process of designing, use some arts, programming/coding but, suddenly a thought comes to my mind
" I know it is very hard & time consuming in creating a game so I think that I have to create my own GAME MAKER or somewhat a LEVEL EDITOR to create and manage my game contents, to reduce the time and stress in coding and coding of the game itself, and I also want to use that created editor for my future games to create".
Well, my question is that:
1. What are the informations I need or to learn to create such editor?
2. What are the steps in creating the editor? I appreciate even such small, general/not expanded steps.
3. Is the game size will become bigger if I use an editor than the game that didn't use one?
4. Do I have to mess with the compiler?
(I am somewhat confuse with these two)
5. How can I make the created game MADE with the editor DO its instructions sequentially?
6. How can I put assets/ resources (e.g. sprites) together so that the created game will have that file but not letting know the player see what the raw content is in that directory (e.g. use Photo Viewer to see what's the resources look like or use Media Players to play the files).
7. Lastly, What are the other concerns that I have to mind?
(Apology for some, but I always list my questions this way if I have many questions)
I listed my questions to avoid confusions and for future ones who has a question like this.
Thanks for taking the time to help me I appreciated every answer :D
Advertisement

If you think coding a game is hard... Coding a game making tool is often much harder (or certainly less fun) unfortunately.

Perhaps instead modify other tools (such as GtkRadiant) to do your bidding for you. Perhaps even tailor your game's code to be able to read assets given out by existing editors (even though it may not be an ideal format).

I often reimplement closed source tools so I can use them on UNIX... and speaking from experience, developing tools is as boring as sin!

There is a reason why the internal tools at a game development company are so flakey... It is because no-one wants to spend time fixing them lol.

http://tinyurl.com/shewonyay - Thanks so much for those who voted on my GF's Competition Cosplay Entry for Cosplayzine. She won! I owe you all beers :)

Mutiny - Open-source C++ Unity re-implementation.
Defile of Eden 2 - FreeBSD and OpenBSD binaries of our latest game.

[quote name='nightrobin' timestamp='1357574465' post='5018615']

1. What are the informations I need or to learn to create such editor?

[/quote]

Really, nothing that you wouldn't need to create the game.

Some features of a "good" editor, such as "Undo", are potentially complicated to implement. You should not implement them unless absolutely necessary.

Consider using a third party editor, and writing converters, plugins or other tools instead. It will probably be easier / quicker, and you'll have more time to make the game.


2. What are the steps in creating the editor? I appreciate even such small, general/not expanded steps.

[/quote]

Well, chiefly you need to implement a level save as well as load. Otherwise, it's just an extension of your game. I usually build the editor into the game (if necessary) or just use conversion tools with third party editors.

Approaches can be combined - you might use an in-game editor e.g. for monster placement, but an external editor for map creation.


3. Is the game size will become bigger if I use an editor than the game that didn't use one?

[/quote]

Do you mean the .exe file size? No, not really. You don't care anyway, as your assets will probably be 100x bigger than your exe files. You could also disable building the editor in production-builds, if you really care.

4. Do I have to mess with the compiler?

[/quote]

If you can compile the game, you can compile the editor. At least, unless the game is running exclusively on a platform which is not suited to level editing (e.g. console, smartphone)


(I am somewhat confuse with these two)
5. How can I make the created game MADE with the editor DO its instructions sequentially?

[/quote]

You'd need some kind of scripting or trigger system.


6. How can I put assets/ resources (e.g. sprites) together so that the created game will have that file but not letting know the player see what the raw content is in that directory (e.g. use Photo Viewer to see what's the resources look like or use Media Players to play the files).

[/quote]

It is easy for a determined attacker to extract your assets. Don't bother trying to protect them with any means which makes the game development harder or builds more complicated, etc.


7. Lastly, What are the other concerns that I have to mind?
[/quote]

You need to be very concerned about the amount of effort you spend building tools. Do your level editors really need all these features?

Can you use a third party editor unmodified? (NB: It might not be a game-specific editor; I've used notepad.exe before now)

Can you adapt a third party editor? Plugin for a third party editor

Can you write conversion tools instead? A conversion tool is likely to be 100x simpler to write than a fully fledged editor.

In general, in my opinion, the order of preference should be:

1. Third party editor unmodified (NB: your game needs to load the assets in the same format the third party editor saves it)

2. Third party editor with conversion tools.

3. Third party editor with modifications / plugins

4. Custom editor.

You don't need to use the same approach for all of your game data. You might have, for example, level design and object-placement, which are related but not synonymous.

Also, things such as scripts and triggers might be quite customised, but these could be added e.g. by a steering file to an existing level, with placeholders. If you can add tags into your world-data, then you can write a .txt file which contains descriptions (in some format) of what the tags do. Etc.

Don't sweat over tools. They are not as important as the final product.

1. What are the informations I need or to learn to create such editor?
You need to know how to write a fairly complicated modeless event-driven GUI application on the platform of your choice. How hard this is depends entirely on the type of game that you want to make an editor for. You haven't specified this, but if you are thinking about anything 3D then writing an editor from scratch will not be easy.
2. What are the steps in creating the editor? I appreciate even such small, general/not expanded steps.
This is way too general of a question. Basically if you have to ask you are not ready to do it. Decide which GUI framework you are going to use (Qt, WPF, WinForms, Win32, wxWidgets, etc. etc.) and learn how write applications with it.
3. Is the game size will become bigger if I use an editor than the game that didn't use one?
We need to define what we are talking about when we talk about an editor.
4. Do I have to mess with the compiler?
You will probably have to mess with the compiler, which is actually a good definition of programming i.e. what do you do for a living? I mess with the compiler!
5. How can I make the created game MADE with the editor DO its instructions sequentially?
I think what you want is an editor for art assets plus embedded scripts in some scripting language and then a "player" application that loads the assets and runs the scripts?
6. How can I put assets/ resources (e.g. sprites) together so that the created game will have that file but not letting know the player see what the raw content is in that directory (e.g. use Photo Viewer to see what's the resources look like or use Media Players to play the files).
Use zip files but with a different extension than .zip

When making your game editor try to reuse as much code that makes sense. The core of your game should be the core of your editor, do the design well enough and your editor could allow you to play sections of your level right in the editor. With a lot of code overlap you will have a lot less code you need to write. Now to address some of your questions.

  • Having a easy to use interface is important. Try to keep things simple and flexible. If any part of your editor is difficult to use think of ways to improve its use
  • In the editors I have built I start with getting the editor to draw a game scene (with mostly the same code used in the actual game), then work on adding the menus and buttons used to add objects to the scene, get the scene to save, get the scene to load, then proceed to add additional menus and tools used to manipulate the scene as needed. You may have to jump between these steps as some features may add new data that needs to be saved and loaded.
  • Probably will be bigger but the media content to your game will far outweigh the size increase an editor will add
  • I am not sure if I understand the question but your editor wont have to use the compiler. If you want to be able control game logic with your editor then I would use a scripting language, my personal preference is lua
  • Are you talking about being able to add game logic and game flow, such as menus, using the editor? A good way to control transitioning from one piece of the game to the next is to break up the game into scenes. Each scene is edited separately and you can add transition points, for example. If the player passes through section X of your map, transition to scene Y. I also would not recommend trying to allow every aspect of your game, such as menus or in game huds, to be edited with the editor. A game editor should speed up the production of a game, not complicate it.
  • There is no way to lock your resources entirely. The best you can do is make it hard enough that it wont be worth it to the average person. You could also package your resources in some custom file format, unencrypted. It could be as simple as a short header with some file information followed by the data from the image file. Somebody could still figure out your format, but most people wont.
  • Don't try to do too much right away. You may have to sacrifice features you want to allow you to complete the project. Start simple, get things working, then expand your game with features later. You shouldn't, for example, be adding particle effects, cool animations, and cutscenes until you have your map, basic character movement, and object interaction done.

And a simple suggestion when you start adding different tools to your editor is to create a separate class for each tool. You should have a tool base class that all of the other tools extend. A simple example could look something like this.


abstract class Tool
{
public MouseDown(Point position, ButtonState buttonState);
public MouseMove(Point position, ButtonState buttonState);
public KeyDown(KeyCode keyCode);
/// any other methods a tool should need
}

class TileTool extends Tool
{
/// here you have the code for drawing tiles and such
}

class GameObjectTool
{
/// here you have the code for adding, removing, and modifying objects in a scene
}


This makes it easy to change tools and will allow to add additional tools to your editor as needed

My current game project Platform RPG

Thank you very much guys! I know I can count on you smile.png

[quote name='jwezorek' timestamp='1357583561' post='5018669']
Use zip files but with a different extension than .zip
[/quote]

I like that idea. This is probably the most effort you should put into avoiding reverse-engineering.

Alternatively, just use.png files but call them .zzz or something.

This topic is closed to new replies.

Advertisement