Author Topic: Tutorial: Dimensions & Coordinates (swf, camera, level, hud, mouse, fullscreen)  (Read 7062 times)

wg/funstorm

  • Global Moderator
  • Key Contributor
  • *****
  • Posts: 596
  • Karma: +0/-0
    • View Profile
    • Funstorm
READ TUTORIAL HERE

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 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)

Released along with a demo and source code:

READ TUTORIAL HERE

« Last Edit: Mon, Oct 10, 2011 by wg/funstorm »

KunoNoOni

  • "Never tell me the odds"
  • Active Member
  • ***
  • Posts: 170
  • Karma: +0/-0
  • Code is Love
    • View Profile
Wow that was really informative! Appreciate the time you took to make it :)


-KunoNoOni

wg/funstorm

  • Global Moderator
  • Key Contributor
  • *****
  • Posts: 596
  • Karma: +0/-0
    • View Profile
    • Funstorm
New tutorial up!

How to use Flash's fullscreen mode with Flixel and dynamic window resizing:

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

Works well when paired with the previous tutorial :)

Kytin

  • Member
  • **
  • Posts: 22
  • Karma: +0/-0
    • View Profile
Just thought I would say that these are great.  :-*
Nicely made and easy for people to understand.
I have seen the future. You will not.

OldmanBiles

  • Member
  • **
  • Posts: 15
  • Karma: +0/-0
    • View Profile
I didn't see this hiding up here!
I've used a pretty much identical code here.
Nice one.