Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I am creating an iPhone game using cocos2d + box2d that needs a lot of levels. My friends and I are creating the game and most of them have no programming experience and end up with nothing to do. I want to make a level creator / editor java applet that can create a level file and then I can parse that file into a box2d level with objective-c

The only problem is that I have never done game programming with java so I'm not sure where to start. I want to create something like this level editor video and let the user add predefined shapes like circles and boxes.

I can do all the objective-c side of things so I just need help with the java side

Any advice? Thanks

share|improve this question

closed as too broad by Byte56 Jan 6 at 15:36

There are either too many possible answers, or good answers would be too long for this format. Please add details to narrow the answer set or to isolate an issue that can be answered in a few paragraphs.If this question can be reworded to fit the rules in the help center, please edit the question.

    
If you're comfortable writing Objective-C, why not coding your level editor with it? –  Laurent Couvidou Apr 16 '12 at 22:43
    
because none of my friends have macs. I know java well but I have never done game development in it –  GeeGoldz Apr 16 '12 at 22:57
    
This is a really broad question. Can you not use something off the shelf? gamedev.stackexchange.com/questions/8600/… –  Tetrad Apr 16 '12 at 23:00
    
I can't use something off the shelf because once the game is released, I want other people besides my friends to be able to make the levels specifically for my game. Sorry for the question being too broad, but I want something similar to the happy wheels level creator –  GeeGoldz Apr 16 '12 at 23:05
    
Did you think about using Adobe AIR (Actionscript) instead? It also allows you to create a desktop application for Mac/PC/Linux and writing visually oriented stuff like Editors is rather simple using Flash/Flex. –  bummzack Apr 17 '12 at 6:30

1 Answer 1

Since your game is written in objective-c and you have decided to use Java for the level editor, I assume that the level editor doesn't need to render the levels exactly as the game engine.

I have written many level editors for commercial mobile games with Java, and I can strongly recommend using Java2D, which is part of Java. If you don't need 3D graphics and the editor is not performance critical, you can get things done easily with Java2D. It is a strong 2D graphics library with features such as arbitrary shapes, Constructive Area Geometry, antialiasing, strokes, affine transformations, text rendering, arbitrary clipping and alpha blending. I have found these very useful when creating user interfaces for level editors. E.g. good looking marching ants is easy to implement for arbitrary selection shape. Images can be zoomed and rotated with filtering and there is no need to allocate textures, instead Java2D automatically uses hardware acceleration where possible.

You can also use Swing for creating some of the UI. Menus, toolbars, object choosers, dialogs can be implemented with Swing components with little effort and you can use Java2D inside them wherever you want.

These choices are good when making Java applets, since they don't require any native libraries outside JRE or additional downloadables.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.