Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

1 decade ago by simple

I am wondering does ImpactJS support the TMX and/or XML format from Tiled (mapeditor.org)?

1 decade ago by Joncom

No, it doesn't. Weltmeister maps are made up of JSON and are wrapped in an ImpactJS JavaScript module.

1 decade ago by tharshan09

I am also wondering if there is an alternative to Weltmeister, is there a different way to lay out maps etc?

1 decade ago by Joncom

Quote from tharshan09
I am also wondering if there is an alternative to Weltmeister, is there a different way to lay out maps etc?
Of course! If you understand that levels are comprised of a CollisionMap and BackgroundMap's, then you can generate maps programmatically however you desire.

If you meant other "visual editors", then not really. Weltmeister is the only editor I know of that is designed to generate ImpactJS levels.

1 decade ago by dominic

Loading levels is not that difficult though. Have a look at the loadLevel() method in lib/impact/game.js - there&039;s no magic going on. It only looks through the JSON object, constructs #ig.CollisionMap and ig.BackgroundMap instances and Entities with the given names and properties.

So, loading an XML file shouldn't be too difficult: load it via AJAX, iterate through it and construct the maps with the given data.

1 decade ago by philwinkel

Tiled mapeditor can save maps as JSON. If you're just looking to import tile layers, it would be pretty easy to load it into a BackgroundMap.

You could go along with the ImpactJS convention, and have a tile layer named "collision" and import impact's collision tileset. Then you might be able to draw the collision layer in tiled and import it into impact. Otherwise it's probably not a big deal to just do the collision in weltmeister.

I am going to figure out something soon for importing tiled maps into impact; I'm developing a top down 2D rpg and I can't live without tiled terrains xD
Page 1 of 1
« first « previous next › last »