Flixel-like Zoom?

28 views
Skip to first unread message

Berzee

unread,
Dec 6, 2012, 3:59:25 PM12/6/12
to libzo...@googlegroups.com
Oh hi! I'm new to Lua, LOVE, and Zoetrope all, so apologies if this is something obvious I missed.

Flixel has that nice feature which lets you zoom the window in so that, effectively, each pixel is 2 or 3 or X times bigger than usual. Can Zoetrope or LOVE do anything similar? I see there's a "scale" attribute on individual sprites, but I assume that will just change the size but keep pixels tiny (so that movement is suddenly smoother than the apparent resolution and other wacky things).

I don't particularly need it right now. Just curious. =)

Berzee

unread,
Dec 6, 2012, 4:14:38 PM12/6/12
to libzo...@googlegroups.com
P.S. So that this whole board isn't full of JUST feature requests, let me say that I'm trying and quite enjoying Zoetrope thus far. The recorder is especially fun =)

Chris Klimas

unread,
Dec 7, 2012, 9:30:54 AM12/7/12
to libzo...@googlegroups.com
Hey, glad you are liking it so far! Global zoom and rotation is something I toyed with in the past but there are some weird bugs that crop up with it that need to be cleaned up, i.e. gaps appear in tilemaps, I think because I am rounding off sprite positions to the nearest pixel when drawing (ironically, to avoid gaps appearing at 1x). There's also a few design decisions to make --
 
-- the biggest one I'm aware of in my tinkering is tracking the mouse position. My first inclination would be to make zoom/rotation a property of Views, so that your game view can scale/rotate without the debug console being affected. The console sits in a special meta view that is drawn above the main view; the mouse, keys, and gamepad objects do too, since they don't change across views either. The problem then is that if you scale the main view 2x but not the meta view, your mouse pointing at (100, 100) now acts as if it is pointing at (50, 50). It gets worse when you rotate the view, too.
 
So I'm not sure what the right way to approach the problem is, but I'm open to suggestions.
 
chris
Reply all
Reply to author
Forward
0 new messages