Creating editors

Case
Unregistered
 
Post: #1
I was just wondering how I go about making an editor for a game. Sorry if this questions been asked before, or if it's a to broad a question.
I want to make a side scrolling game, but the levels will contain the same sort of objects. So I think an editor would probably be the best way to go, but I'm unsure of how to devlope one?

Thanks

Case
Quote this message in a reply
⌘-R in Chief
Posts: 1,254
Joined: 2002.05
Post: #2
Look up LevelCreator and you should get an idea. I believe it's a http://www.swarming.net/ but if not, go to http://www.spriteworld.org and look in the links section.
Quote this message in a reply
Feanor
Unregistered
 
Post: #3
The progam will mainly be concerned with three major tasks: getting level data in and out, presenting that level data to the user, and allowing the user to change that data. It's a universal high level model.

If you are learning (or interested in learning) Cocoa, you would be able to use Apple's document architecture, which would allow you to treat a level as a document.

In any case, you need a model with which to describe the level in a convenient to edit form, and you need program logic to allow the user to interact with the level model and know its current state.

Depending on your game, you might need code to convert (export) the in-editor level model into a level file for the game, which you might optimize. More specifically, your level document might be object-oriented, but the level file for the game might be raw data designed to be read into C structures, depending on how your game is written. An example that I have used is the Quake .map format used by Quiver, which gets converted into a .bsp file used by Quake itself. I'm sure yours won't be as complex, but the level editor would keep around a lot of data which the game probably wouldn't need.
Quote this message in a reply
Case
Unregistered
 
Post: #4
The Document Architecture sounds like a good way to go, yes I am learning cocoa, but I don't quite know which language to use cocoa with. Objective C? or Java? or C++. I know java (well not all of it but I'm capable in it). I'm learning C++
Whats the best way to learn objective C? Is the documentation the only book on it?

The level creator idea, is a bit useless, because when I downloaded it, it said that I need 16bit color. Unfortunatley I can't get that.

Thanks for the help so far!
Quote this message in a reply
⌘-R in Chief
Posts: 1,254
Joined: 2002.05
Post: #5
Quote:Originally posted by Case
The level creator idea, is a bit useless, because when I downloaded it, it said that I need 16bit color. Unfortunatley I can't get that.


Why can't you turn down your monitor's bit depth? Well anyway, all it is, is like an AppleWorks paint document with layers like in photoshop. You literally paint tiles onto a map and place sprite characters and objects on top within a "sprite" layer. It's really cool except that it only works in classic and can't be ported without a significant rewrite.
Quote this message in a reply
Feanor
Unregistered
 
Post: #6
You have to use Java or Objective-C to access the Cocoa frameworks, although you can mix C++ in with Objective-C. As mentioned elsewhere, Objective-C is an easy language to learn. The Cocoa environment depends upon:

Objective-C
the Objective-C runtime
the Cocoa frameworks

Apple's book, Inside Cocoa: the Objective-C Language, is fantastic -- the most thorough discussion of Objective-C available. It's on your computer and on their website. It will take about four to six hours to read, but you will probably read most of it two or three times while you are learning. It depends on your comfort with OOP, although the book includes a very informative section (more than one third of the text) on OOP concepts.

The runtime is not that hard, mostly its the necessity of coming to terms with the memory management system, which is simple but disconcerting. There are also a few compiler directives which are unique and very useful.

The document architecture is straightforward on the surface, but I have found that because so much is done for you, behind the scenes, it can be strange if you have to do anything atypical. In your case, that is unlikely. Sticking very close to orthodox would be the best approach.

It requires learning which key classes, and key methods of those classes, are used for what purpose. Apple's documentation is not bad, but it could use extending. Every Cocoa book I have seen does a general overview. Again, it is all written in Objective-C and requires use of either the Objective-C or Java interface. Be warned that if you use Java, you are using the Java runtime, which means the virtual machine and resultant loss of performance. Anyway, Objective-C is easier once you know it, and the freedom from Java packages is a blessing I cannot over-emphasize.
Quote this message in a reply
Post Reply