Monte's Corner

Slick2D and Tile Map Editor

by Mike - June 1st, 2010.
Filed under: Game Dev, Slick2D.

I put together a test game today just to get a feel for Slick2D, unintentionally I also got a feel for Tiled(Tile Map Editor)(Thanks Thorbjørn) . I was already planning on using Tiled for building my levels, however today my aim was only to get my little stick figure guy to jump on a platform, move around, and fall. Somewhere in the middle I realized I would need to come up with some quick little collision detection to make that all work.

Good programmers are lazy, lazy in the way that makes them look for a pre-made solution to a problem. As long as this solution is fast and efficient, or will work quickly for what they want to do.*

Now I consider myself a decent programmer, but I try  to reach for higher standards when I can. So before I decided to implement a bunch of collision detection functions, I figure I would check to see if Slick2D had some library for doing it already. Come to find out that it sorta does, at least it makes my job much easier as long as I am using Tiled, which I was planning on using anyway. Turns out that, among other things, one of the nifty thing you can do is set properties on specific tiles in Tiled, and these properties can be easily read by a library provided by slick2D. That’s what I like to see, cooperation between software developers and different projects. So basically I check to see what tile my stick figure guy is moving to, and if it has that certain property, don’t go there. Granted I still have to write code to check for that tile on all sides of my bounding box, but for me it eliminates having to do all that work of building a tool to generate that level. This was one of the things that slowed me down when I initially started to build a game from scratch. That was awhile ago, and now it seems there are better tools out to help the beginners out. Time to get coding.


*Good programmers are also lazy in the way that they will take some time to code something if it will make their life easier down the road.

2 Responses to Slick2D and Tile Map Editor

  1. Hey Mike. I’m glad you like Tiled and it’s also good to hear the support in Slick2D works for you! However, please make sure you call my map editor Tiled and not TME, since there is another tile map editor actually called TME. 🙂

    Good luck with your project!

  2. Hey Thorbjørn, thanks for stopping by. It seems I ran into TME awhile back and got a little confused. Thanks for the correction!

    Mike

Leave a Reply