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 making a little 2d overhead RPG type game just for fun. I have almost all the basic stuff set up, but I just need a little help on level creation. I can already make a level and place each tile how I want it, but having to place each tile gets annoying after a while.

I noticed that in a lot of games, even extremely simple ones, they have LOTS of levels with LOTS of tiles in each. Creating all that in this fashion would take forever. So I guess my question is, as a game developer, am I supposed to do all that, or maybe make a little level editor so I can see things as I create it? What do game developers do? I'm using Java.

EDIT: Okay, say if I had an image for a map, that I made in MS paint or photoshop, and each pixel represent a tile value, could I somehow in Java detect what color an individual pixel is? If so, that would be perfect. If so, how?

share|improve this question
2  
Small projects will either hard-code the levels, or write their own level-editor. Since you're the one making both the editor and the levels, it's up to you to decide if it's worth the effort. –  BlueRaja - Danny Pflughoeft Jun 23 '11 at 21:01

2 Answers 2

up vote 3 down vote accepted

You want to use a map editor, such as Tiled.

EDIT: You can save it as an image if you really want, but that means you must have a rectangular map. What if you want an irregular one?

Also, you are then making it much harder to have an editor spit out the level code for you. I would advise against it, personally. Especially if your image is going to be many milions of pixels.

share|improve this answer
1  
I completely fail to see the problems you describe. Lots of games use rectangular maps just fine, if he want a different shape he can just leave out using a part of the image. As for scale, image editors are amongst the few types of programs that will flawlessly handle millions of data points. –  eBusiness Jun 23 '11 at 22:22
    
Each map would be at most probably 128x128 tiles. If each tile is represented bu a pixel, that's a 128x128 pixel image. Don't think that's an issue. But do you know how I could get Java to get an individual pixel's color? –  Brandon oubiub Jun 23 '11 at 22:30
    
@Brandon oubiub I'm not really into Java, but Google is my friend, so I now know there is a PixelGrabber class which should do pretty much what you need. –  eBusiness Jun 23 '11 at 22:56
    
@The Communist Duck Tiled is great! i didn't know it but i think is love at first sight –  FxIII Jun 24 '11 at 7:53
    
@Brandon oubiub I wasn't sure if you were doing pixel per tile, or real sized tile per tile. I personally don't think you'll get much advantage out of it. Chances are it will be much slower. –  The Communist Duck Jun 24 '11 at 8:46

try tiled. it's a opensource level editor. and working with it is really simple. it's also opensource so you can easily implement your own file format for it. although many 2d game engines use tmx file format (it's an xml based format) and tiled have all tmx export options.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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