Monster Racer Rush
Select between 5 monster racers, upgrade your monster skill and win the competition!
4.23 / 5.00 3,881 ViewsBuild and Base
Build most powerful forces, unleash hordes of monster and control your soldiers!
3.93 / 5.00 4,634 ViewsQuick question: When I am creating MC to specific dimensions, for example 50x50 pixels, sometimes it will change it to
50.5x50. Even if I try to correct the 50.5 to 50 it will just snap back to 50.5. Why does it do this?
Is there a way to make it snap to the precise pixels I want. I know that with this small amount it isn't noticeable on screen but I'm not sure if it could make hit detection less accurate. Or maybe I'm just OCD about it haha
At 12/8/13 05:15 PM, Hero101 wrote: Quick question: When I am creating MC to specific dimensions, for example 50x50 pixels, sometimes it will change it to
50.5x50. Even if I try to correct the 50.5 to 50 it will just snap back to 50.5. Why does it do this?
Happens often. Has something to do with floating point and imprecise computations.
Ain't nothing you can do other than make some slight changes to the shape and try again.
If you're referencing width or height, expecting them to be round values, you're better off manually typing those values out in your code.
Ah ok. Thanks for the reply dude.
If you're worried about extremely accurate hit detection then you shouldn't be using the Flash IDE, you should be generating your objects in code, or using pngs. Realize that when you're working in the Flash IDE a lot of your values are going to be rounded wishy-washy decimals.
At 12/8/13 05:49 PM, MintPaw wrote: If you're worried about extremely accurate hit detection then you shouldn't be using the Flash IDE, you should be generating your objects in code, or using pngs. Realize that when you're working in the Flash IDE a lot of your values are going to be rounded wishy-washy decimals.
Thanks for the advice. I will eventually get to that point but right now I'm just making a demo game to practice grasping something else coding-wise. I'll definitely look into what you suggested for future work. Thanks again.