FlashPunk Angles


(Abel Toy) #1

So, FlashPunk angles are in degrees. The angle functions work in degrees and stuff…

And I don’t really like it. I mean, if we had everything as RADIANS it would work faster. The only conversion we’d have to do is to show the degrees as a number on the screen, that’s it.

Furthermore, we have them backwards in FlashPunk…

So, what do you think?


(Jacob Albano) #2

I’m not a fan of radians, myself. I do think the fact that angles are reversed is totally weird though.


(Zachary Lewis) #3

There’s an open issue on Github for this concern. Feel free to chime in on Angles are negated (and in degrees, but we’ll let that one slide).

To quote myself:

It is my belief that this should be corrected so angles are correctly calculated based on math and stuff.

Now, we could technically fix this without a major version increase, but it would make lots of games act strangely if they made use of rotation.


(Ultima2876) #4

That and it’s really super easy for someone to implement their own angle conversion function. I’ve done it on every engine I work with since they tend to use the traditional “0 degrees is east and incremented goes counter clockwise” type of degrees, that are a kind of radian-degree-bastard-child.

That said, if games are in active development it’s pretty trivial to replace a few angle values in most circumstances and would be for the greater good. I think it’s pretty rare that people will take an old game and update it to a new version of FlashPunk without expecting to work on it more anyway*… for instance, the old origin system change was massively beneficial for intuitiveness of that functionality, but did mean games needed to change to update. But it was totally for the best. With regards to the major version number issue though, yep, that is a conundrum indeed.

*Of course, at KickBack Games we base our Stage3DPunk engine on the latest branch of FlashPunk (and tend to work with older FlashPunk games using various different branches or versions of the engine) which means we will have to have some sort of solution to deal with the angle change… but that’s our problem and we will deal with that on our end :wink:


(Abel Toy) #5

We can always wait for a major version increase. I have a few plans for this that I want to work on later when I have more time, such as improving collisions and stuff, so yeahh


(Ultima2876) #6

True, that’s a possibility also! :slight_smile: Probably a good idea in fact.


(Dev Bot) #7

This topic was automatically closed after 30 days. New replies are no longer allowed.