FlixelCommunity / flixel

Community fork of Adam “Atomic” Saltsman's popular game engine Flixel. Distilled from a variety of Flash games he worked on over the last couple years, including Gravity Hook, Fathom and Canabalt, its primary function is to provide some useful base classes that you can extend to make your own game objects.
http://flixelcommunity.org/
Other
84 stars 17 forks source link

Refactor and fix `FixCamera#follow()` #191

Closed IQAndreas closed 10 years ago

IQAndreas commented 10 years ago

So sorry I procrastinated this, I finally sat down and read through how FlxCamera handles following targets (and it was much more simple than I thought it would be).

This pull request fixes the last tiny error with FlxCamera (and I now understand why that *0.25 part was accidentally included), but also is tidies up FlxCamera#follow() by merging similar camera styles and renaming variable names to be more descriptive.

I have tested and confirmed that it works as expected, at least in Mode. If anyone else wants to test the resulting SWC:

IQAndreas commented 10 years ago

One thing though, I haven't actually observed the "jittering" bug (perhaps my eye is not as well trained as most), so I'm not sure if this change brought back the problem. @Dovyski, did you say you had a project with jittering, could you double check this?

WingEraser commented 10 years ago

@IQAndreas confirmed to be working, no "jittering" bug found in my test project.

Dovyski commented 10 years ago

I confirm that too, no jittering. It's good to go! I've tested using Flixel Sandbox, Mode and one of my games.