Henryk

Snap to pixels or why the use of floats?

Recommended Posts

Hi folks,

 

I've realised, that ME applies Sprites positions, width etc. with up to, I don't know, ten numbers behind the dot. Is there any advantage over integers?

 

It's nothing super important I just wonder. Wouldn't it make things faster for calculations? I don't know, if you have hundreds of elements all at XY.759412357 position instead of only XY, isn't that slowing done things at some point? 

 

 

Share this post


Link to post
Share on other sites

it just happens automatically when zoom is involved.. e.g. moving mouse by 1px while having 200% zoom - sprite will be moved by 0.5px

 

I will add an option *use integers for coordinates. It will also benefit for pixel art graphics.

 

I'm not sure if it has any impact on performance - need to make some benchmarks :)

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.