Bug Reports

Post your help queries and engine programming questions here

Bug Reports

Postby DrDynamic » Fri Apr 21, 2017 12:54 pm

Hi,

i think, that i found a bug in the IgeEntity and want to communicate it.
At first I had a look at the Issue-tracker on the official Github Repo, but there is a note to report bugs to the Isogenic Forum.
So I looked in here but couldn't find the right thread.

So my question is: Where do i report bugs?


Here is what I've found:
When setting heightByTile() and widthByTile() on an isometric IgeEntity (with lockAspect = false), it has twice the height that it should have.
Looking in the Method heightByTile() I saw this line:
Code: Select all
var tileSize = this._mode === 0 ? this._parent._tileHeight : this._parent._tileHeight * 2

And changed it to
Code: Select all
var tileSize = this._mode === 0 ? this._parent._tileHeight : this._parent._tileHeight


that fixed it.

Because I'm relatively new to the Isogenic Engine, I'm not sure if I found a bug or just misinterpreted the method.

If you agree whith me about this Issue i could make a pull request to fix it.
(Sorry about the bad english, I hope you can get what I want to say ^^ )
DrDynamic
 
Posts: 3
Joined: Tue Apr 11, 2017 12:39 pm

Re: Bug Reports

Postby rob » Mon Apr 24, 2017 11:34 am

Hey ya,

I don't think it is a bug... if I remember correctly it's something to do with isometric sizing. If it works for you that way then by all means change it, I don't know if there is any knock-on effect to other parts of the engine but it should be ok if it's working for you.
CEO & Lead Developer
Irrelon Software Limited
http://www.isogenicengine.com
User avatar
rob
Site Admin
 
Posts: 310
Joined: Tue Oct 22, 2013 5:08 pm

Re: Bug Reports

Postby DrDynamic » Mon Apr 24, 2017 1:02 pm

Hi,

Thanks for the Quick answer. :)

Maybe I haven't explained it right (or enough).

Because I left the IgeTileMap2d to default values, the cells have a size of 40 x 40. I assumed, that this would represent the size in the "3d" Isometric Grid system, because if I measure the pixel of the rendered Grid the actual size is 80 x 40 Pixel.

Now when i add a IgeEntity to the TileMap and call the Methods widthByTile(1, false) and heightByTile(1, false), the Entity gets a size of 80 x 80 which doesn't fit into the Grid.


By Stepping through the code (with the Chrome debugger) I've seen, that both heightByTile and widthByTile multiply the tileWidth of the _parent (IgeTileMap2d) by 2.
By removing the Multiplication in the heightByTile Method, i get exactly the dimensions of the Grid.

I extended the IgeEntity class to modify the code, because I don't want to edit Library Code. If you are interested I could upload the class I've created or a little example to show this behavior.
DrDynamic
 
Posts: 3
Joined: Tue Apr 11, 2017 12:39 pm


Return to Help & Questions

Who is online

Users browsing this forum: No registered users and 1 guest
cron