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

1 decade ago by tarrent

Hi, I'd like to ask if has browser compatibility issues because a sample game of mine using this works well in Mozilla Firefox but doesn't in Chrome.

I'm using to sort out entities specially the square characters. Without sortEntitiesDeferred(), they would spill out the top golden frame when going up for a spin. The game works well in Chrome if I remove this, but the characters spill out of the top frame.

I call after the characters have been finalized in place. To be exact, here are the entities' zIndices:

- red background = 3
- violet background = 1
- buttons = 3
- blurred spinning animation = none
- square characters = 2

When would be the best time to use Do this really mess up in chrome? Thanks.

1 decade ago by lazer

I use this to resort after spawning an entity and setting its zIndex; haven't seen any problems in Chrome so far. Example of usage:

	generateObstacles: function() {
		var rand=Math.floor(Math.random()*100);
		if (rand < 1 && this.terrain === 'land') {
			var e = (EntityPit1, + 700, 420);
			e.zIndex = -1;
		else { EntityCollision, + 300, 420 );

1 decade ago by tarrent

Thanks lazer for your info I see you call everytime you spawn an entity whereas I call this only after all entities have been randomly generated.

I have tried your way, on every spawnEntity but the results are the same :(

1 decade ago by dominic

What exactly happens in Chrome when you sort the entities? I can't see any difference with Firefox vs. Chrome. Can you provide a screenshot, maybe?

1 decade ago by tarrent

Hi dominic does my game seem ok for you in chrome? I wish it were so for me, browser version perhaps? :) Btw I'm using Chrome 19.0.1084.56 m and Firefox 13.0.1.

I've provided game play videos of my sample game in Firefox and Chrome.



I hope you could help correct what I may have done wrong in using .sortEntitiesDeferred(), if this is the problem. Thanks!

1 decade ago by tarrent

Just updating this thread :)

I'm not sure what I did but its ok now. I cleaned up my codes, removed unnecessary functions and variables and then no more zIndex issues.
Page 1 of 1
« first « previous next › last »