Iso_Terrain and Isometric Objects

Hey folks,

I have a basic question about iso_terrain and isometric objects. Should an Isometric object only occupy 1X1 tile or can an object occupy 3X3 or 4X4 of the isometric tiles on iso_terrain? 1X1 is too small for my art assets. I'd really appreciate if someone could tell me more about this. This way of objects occupying more than 1 tile, if it is a good practice or should I have my objects occupying only one tile at most? Thanks!

All 5 Comments

Hi Prajwal

There's nothing wrong with having objects that are larger than 1 tile. In fact it's quite normal to have some objects (like a tree) that occupy 1 tile, and other objects (like a house) that are larger so they are 4x4 tiles or something like that. Just be sure to set them up correctly. In the editor this is quite easy, once you go the the Properties tab of an isometric object (the Grid Type must be set to Isometric).

See those buttons at the top-right of the preview window? They allow you to edit the grid map and the collision map separately.

The grid map is used by Wade to determine which object(s) are in which tile, and in the editor is represented in green. You can edit it by toggling the green button at the top.

The collision map is used by Wade to determine which tiles are blocked, so no other objects can go to those same tiles. In the editor these are red, and you can edit the collision map by toggling the red button.

If you want to mark a tile as being used in both the grid map and collision map (which is very common), then you can do that by toggling both the green and red button. Tiles that are both in the grid map and the collision map will appear as yellow.

While it's possible to edit the collision map and the grid map separately, in the vast majority of cases you'll want to edit them together, and only have yellow tiles.

Depending on how you want to move these objects, however, it may be tricky to get a smooth experience in terms of movement when you have objects with large collision maps that can move around freely. I would say that for most game characters, it's generally easier if they can fit in 1x1 tile. But for static objects, there's no problem with them being larger.

Thanks for the detailed answer Gio. Got how it works now

Hey Gio, I have another noob question with isometric objects.

So I am creating isometric objects with code by using wade.iso.addSceneObject() as directed in the change log v 4.0. But while creating the sceneobject with code (not in editor), I'm having trouble setting the grid.type property to 'isometric'. I tried adding grid and setting it to isometic, but it adds as a custom property than change the object grid to isometric.

So my question is is there a way to set the grid property to 'isometric' easily or within the SceneObject constructor? A small snippet on how to set the grid.type to isometric so it can be added as an isometric object, will be highly appreciated... 


You are right, this changed in version 4.0. I probably need to clarify how it works in the documentation. Now you do not need to call wade.iso.addSceneObject() but simply wade.addSceneObject() and, if your object is isometric (its grid type is set to isometric), then it also gets added to the isometric world (i.e. wade.iso.addSceneObject is called automatically).

If you have a SceneObject and want to change its grid property, you can do:

myObject.setGrid({type: isometric, gridCoords: {x:10, z:6}, gridMap: [{x:0, z:0}], collisionMap: [{x:0, z:0}]);

I realize that this is currently undocumented. I've added a comment to the source code so with the next build this will show up in the documentation.

You can also use a grid parameter in the SceneObject constructor if you prefer:

var myObject = new SceneObject({sprites: ..., grid: {type: isometric}});

If you do it that way, you may want to add addToScene: true in the SceneObject constructor too, so you don't have to call wade.addSceneObject at all, as it gets added to the current scene automatically when it's constructed.

Thank you so much for the snippet and I have got it working in the way I desired to. And yes, I could not find setGrid function on docs but thanks for pointing it out. I chose to just add sprite in my constructor and later added on all isometric properties. Thanks once again!

Post a reply
Add Attachment
Submit Reply
Login to Reply