Isometric mode: How to make transitions between areas?
GentleRain

Greetings,

While working on designing areas I began to think that it may be wise to make smaller areas and link them together than to try to create one really large area for the entire game. But, then I began wondering how will I be able to leave one area behind and move the character to another area? So that is my question. What is the best way to make an isometric object take you to a different area when it is clicked and thereby leave the old area behind? And, will you be able to create a similar clickable object in the second area to return back to the first area?

Thankyou,
GentleRain

All 4 Comments
foxcode

Hi Gentle Rain. I can think of 2 ways to do this but I'm unsure about the second.

In the first method, you would simply split your areas by empty tiles. You could either make the areas far enough apart that only the current one is in view, or add a property to each tile, an area id or something similar so you only draw tiles that have an id matching the current active area.

You wanted to use an object to move the character on being clicked. To make this easier, I would give your character a name in the editor so "character" or "player" for example. You also want to store a set of target co-ordinates, x and z in the object. The onClick handler for the object should look like this. I will pretend for this example the clickable object is a door, that "teleports" you to the next area.
 

var target = {x:10, z:25}; // An example target location
var character = wade.getSceneObject("player"); // The parameter must be the characters name

// There is a 4th parameter which is a speed.
// Not defining this or setting to 0 should make the move instant
wade.iso.moveObjectToTile(character, target.x, target.z);

The above code should move your character to the target location. Just remember on the isometic grid we use x and z, not x and y.

 

The second method is a lot more complex and I'm not sure about it. You could create your areas in different scenes then load scene every time you click on one of these objects instead of using moveObjectToTile, however I suspect that would cause problems with loading assets, and you may end up with a delay while the scene was loaded.

 

I do not know exactly what you are doing but I would definitely try the first method first.

GentleRain

Thankyou foxcode,

I greatly appreciate your help! I think it will be fun to try this one out.This definately will improve the options I have while creating game maps.

Thanks again,
GentleRain

Shri

GentleRain,

I have been doing a modified version of what you are talking about to load different levels for iso games. I put together a quick demo for you to take a look. I have attached a zip file which should run out of the box. Click the iso terrain to fly the dragon around. Hit the 'j' key to jump to a different world. You could easily change the method the scene transitions to whatever you like (pick up a key, fly over a transport tile, etc. )  It isn't too hard to load more complex scenes. You just have to modify the level json file. The latency between scenes isn't  bad, and if you were to load a transition  "new level" screen, the player would never see the level changeover. If you go to my website and play the hammies game, that is what happens when you advance levels.

Anyway, I have attached the zip file to this post, hope it helps you out.

One last note, the dragon asset does not belong to me, I got it from here  please respect the rights of the original content creator.

cheers,

Shri

GentleRain

Thankyou Shri

I'm busy right now getting ready to re-install windows on my pc since I accidentally forgot my login password for the admin account lol. But, I have backups of everything so I was prepared for things like this. Anyways, I am so happy you posted this and I'm planning to try it out once I've got everything set up again. I appreciate all the help I can get with learning WADE.

Thankyou bunches,
GentleRain

Post a reply
Add Attachment
Submit Reply
Login to Reply