r/flixel • • Oct 02 '11

Tutorial: Dimensions & Coordinates (swf, camera, level, hud, mouse)

http://www.funstormgames.com/blog/2011/10/flixel-setting-up-game-dimensions-swf-camera-level-hud-mouse/
9 Upvotes

2 comments sorted by

3

u/flkk Oct 02 '11
  • Why do we have to set multiple sizes?

  • How do I get the mouse position on screen?

  • How can I make things stay on screen when the camera moves?

  • Why are things not colliding past a certain point?

I see these questions come up on the flixel forums all the time and it took me a while at first to wrap my head around how flixel likes to be configured, so I wrote up a quick tutorial to help others.

It covers:

  • Swf size

  • Camera view size

  • Camera view zoom

  • Swf = camera * zoom

  • Level size

  • Camera travel limits

  • Hud Mouse cursor (world & screen positions)

1

u/flkk Oct 12 '11

Added a new tutorial on doing fullscreen & dynamic window resizing with Flixel:

http://www.funstormgames.com/blog/2011/10/flixel-fullscreen-mode-and-resizeable-windows/

Works very well when combined with the methods from the earlier tut!