GLBasic forum

Codesnippets => Code Snippets => Topic started by: spicypixel on 2013-May-29

Title: Tiny Framework
Post by: spicypixel on 2013-May-29
This is a fairly small framework which allows for scaling on differing devices, there is a texture atlas included which I use for the bitmap printing, and text is scaled in either x/y or both. I have written a couple of button functions which work with scaling also, these include ON_HOVER, ON_CLICK and ON_RELEASE. It includes an independent frame loop for logic and drawing which is delta-timed (grabbed from this forum props for that), and a couple of screens showing menu and gameloop just to demonstrate how it can interact etc..

The demo does very little but it has enough to see how things work, I have ripped most of this code from my current projects and removed unnecessary code, hope you guys like it :-)

** ADDED **
Some math fixes :)
Couple of new Sprite functions (standard sprites not PV's)
Changed demo to show it works with portrait too
Using 1080x1920 as my base gfx now
kept original attachment to see changes and the demo of landscape

Marcus.

Title: Re: Tiny Framework
Post by: bigsofty on 2013-May-30
Thanks Marc, lots of handy stuff in here!  :good:
Title: Tiny Framework
Post by: spicypixel on 2013-May-30
Thank you :-)
Title: Re: Tiny Framework
Post by: fuzzy70 on 2013-May-30
Thanks for sharing this Marcus, some very useful code in that  :booze:

Lee
Title: Re: Tiny Framework
Post by: Moru on 2013-May-30
Thanks for sharing, that will make life much easier!
Title: Re: Tiny Framework
Post by: spicypixel on 2013-May-30
With so many decent coders liking it I'm hoping my math is ok :D
Title: Re: Tiny Framework
Post by: Heiko on 2013-May-30
Thanks....nice stuff  =D
Title: Re: Tiny Framework
Post by: mentalthink on 2013-Jun-09
Thanks spicyPIxel I question about this make a lot of time whitout reply, and I forget to develop for my Android tablet for the Scaling cause..

Cery very usefull!!! Thanks.  :good:
Title: Re: Tiny Framework
Post by: aroldo on 2013-Jul-26
Spicypixel,

Nice job! I do have a framework to re-size for all kind of screen size formats and devices.
When I have some time I will create a version to Share in this forum.