Isometric Depth is not Working Properly

All things HTML5 or text based engines, or really any web based engines.
Post Reply
dsteve
Posts: 16
Joined: Mon Oct 07, 2013 6:25 pm

Isometric Depth is not Working Properly

Post by dsteve »

Dear Rob,

I am confused about how to create an isometric depth in isoislands example,
hereby I include the picture of my problem,


Screen Shot 2013-10-08 at 1.53.21 AM.png

Steven
User avatar
coolbloke1324
Posts: 181
Joined: Mon Jan 23, 2012 5:20 pm

Re: Isometric Depth is not Working Properly

Post by coolbloke1324 »

dsteve wrote:Dear Rob,

I am confused about how to create an isometric depth in isoislands example,
hereby I include the picture of my problem,


Screen Shot 2013-10-08 at 1.53.21 AM.png

Steven
Hey ya!

So there is some info on the isometric sorting system avaiable here: http://www.isogenicengine.com/documenta ... nd-images/

The basics of it is that you have one entity that acts as a 3d-positioned cuboid and inside that entity you have your image which can be positioned as you wish to provide the correct location to line up with the iso grid

Let me know if you need more help!
CEO & Lead Developer
Irrelon Software Limited
http://www.isogenicengine.com
dsteve
Posts: 16
Joined: Mon Oct 07, 2013 6:25 pm

Re: Isometric Depth is not Working Properly

Post by dsteve »

Dear Rob,

Oh, I finally understand,
Well then, thank you very much Rob

Steven
User avatar
coolbloke1324
Posts: 181
Joined: Mon Jan 23, 2012 5:20 pm

Re: Isometric Depth is not Working Properly

Post by coolbloke1324 »

A new video tutorial on how to create isometric entities will be online within 30 minutes, I made it just for you! :) Will post the link here when it has finished encoding and uploading.

Cheers,

Rob
CEO & Lead Developer
Irrelon Software Limited
http://www.isogenicengine.com
dsteve
Posts: 16
Joined: Mon Oct 07, 2013 6:25 pm

Re: Isometric Depth is not Working Properly

Post by dsteve »

Dear All,

I finally managed to overcome this, by using
.depthSortMode(1)

Thanks
User avatar
coolbloke1324
Posts: 181
Joined: Mon Jan 23, 2012 5:20 pm

Re: Isometric Depth is not Working Properly

Post by coolbloke1324 »

The isometric tutorial is now available at: http://youtu.be/7eKZM8uevNU
CEO & Lead Developer
Irrelon Software Limited
http://www.isogenicengine.com
dsteve
Posts: 16
Joined: Mon Oct 07, 2013 6:25 pm

Re: Isometric Depth is not Working Properly

Post by dsteve »

Dear Rob,

I am really sorry,
I didn't see your last reply,
That is fantastic, thank you very much Rob

Best Regards,
Steven
dsteve
Posts: 16
Joined: Mon Oct 07, 2013 6:25 pm

Re: Isometric Depth is not Working Properly

Post by dsteve »

Dear Rob,

Eventually I am facing this problem,
The image entity is not mergin with the red spot,
actually I expand the size3d parameters,
but it didn't achieve what I really want,
Screen Shot 2013-10-08 at 1.32.41 PM.png
Also, here's my code :

Code: Select all

	Airport: ClientItem.extend({
		classId: 'Airport',

		init: function (parent, tileX, tileY) {
			ClientItem.prototype.init.call(this, tileX, tileY, 8, 8);
			console.log("std tilex "+tileX+"tiley "+tileY);
			var self = this;

			// Setup the 3d bounds container (this)
			this.isometric(true)
				.mount(parent)
				.size3d(8 * parent._tileWidth, 8 * parent._tileHeight, parent._tileHeight *2.9)
				.translateToTile((tileX) + 0, (tileY) + 0, 0)
				.mouseOver(function () { this.drawBounds(true); this.drawBoundsData(true); })
				.mouseOut(function () { this.drawBounds(false); this.drawBoundsData(false); })
				.drawBounds(false)
				.drawBoundsData(false)
				.occupyTile(tileX, tileY, 8, 8);

			// Create the "image" entity
			this.imageEntity = new IgeEntity()
				.texture(ige.client.gameTexture.airport)
				.dimensionsFromCell()
				.drawBounds(true)
				.drawBoundsData(false)
				.mount(this);
		}
	}),
Thanks
dsteve
Posts: 16
Joined: Mon Oct 07, 2013 6:25 pm

Re: Isometric Depth is not Working Properly

Post by dsteve »

Dear Rob,


Apparently, the problem is in the cursor position,
where it located directly at the center of the "ghost item"
Screen Shot 2013-10-09 at 4.33.58 PM.png
Hopefully you are willingly to help me

Steven
User avatar
coolbloke1324
Posts: 181
Joined: Mon Jan 23, 2012 5:20 pm

Re: Isometric Depth is not Working Properly

Post by coolbloke1324 »

Can you zip up your whole project and attach to a reply here so I can test your code? Thanks!
CEO & Lead Developer
Irrelon Software Limited
http://www.isogenicengine.com
Post Reply

Return to “HTML5/Web Engines”