Chuck & Zeke – I’ve been working on this too. You are correct that collision.bin has all the collision segments used in the game (see screenshot below.) The collision segment tile indexes are stored in the collision layer of the level so that each tile in the game has a collision tile index referencing back to collision.bin.
As for tile editors I took a look at several – I liked Tiled (www.mapeditor.org) but there’s hardly any sample code / documentation for writing plugins so I didn’t venture down that path – I guess I could have figured it out, but I was looking for something a little more agile. After all, level designers and the integration into the game engine is a whole project unto itself!
I really wanted to roll my own tile editor but didn’t want to start from scratch so I found some code floating around out there. I contacted the dev and asked him if he wanted to help extend the code but never heard back from him. In the meantime I modified the code enough to read at least one layer of Chris’s level format. At this time I still don’t have an editor that will write back because as I said a tile editor is quite a project.
That sounds good. You guys are definitely on the right track.
- If you’re planning on reusing Chris’s LevelSystem and TiledWorld Loaders (loadLevel & parseInput) to read your level data then you’re going to have to write a Tiled plug-in to export in that format.
- Or you could re-write the level loaders within replicaIsland to accept Tiled csv / xml formats
In order to mark a layer as collision set its layer type=1. It’s hardcoded in loadLevel.
Here is some additional information on the level.bin file format If it would help (see image below)
Ok I though that’s what you meant. Just to clarify – I’m not using Tiled – I’m using a different much smaller tile editor implementation – and it’s only handling one layer at the moment. I’m also keeping with the Binary format so I don’t have anything that’s “human” readable for you to look at – sorry about that.
Chuck if you do a detailed code review of LevelSystem and TiledWorld that’s all you need. The lights will start going on.
--
You received this message because you are subscribed to the Google Groups "ReplicaIsland Coding Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to replica-island-coding...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.