Tiny Framework

Previous topic - Next topic

spicypixel

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.

http://www.spicypixel.net | http://www.facebook.com/SpicyPixel.NET

Comps Owned - ZX.81, ZX.48K, ZX.128K+2, Vic20, C64, Atari-ST, A500.600.1200, PC, Apple Mini-Mac.

bigsofty

Thanks Marc, lots of handy stuff in here!  :good:
Cheers,

Ian.

"It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration."
(E. W. Dijkstra)

spicypixel

Thank you :-)
http://www.spicypixel.net | http://www.facebook.com/SpicyPixel.NET

Comps Owned - ZX.81, ZX.48K, ZX.128K+2, Vic20, C64, Atari-ST, A500.600.1200, PC, Apple Mini-Mac.

fuzzy70

Thanks for sharing this Marcus, some very useful code in that  :booze:

Lee
"Why don't you just make ten louder and make ten be the top number and make that a little louder?"
- "These go to eleven."

This Is Spinal Tap (1984)

Moru

Thanks for sharing, that will make life much easier!

spicypixel

With so many decent coders liking it I'm hoping my math is ok :D
http://www.spicypixel.net | http://www.facebook.com/SpicyPixel.NET

Comps Owned - ZX.81, ZX.48K, ZX.128K+2, Vic20, C64, Atari-ST, A500.600.1200, PC, Apple Mini-Mac.

Heiko

Thanks....nice stuff  =D

mentalthink

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:

aroldo

#8
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.
[a http://apd-games.com/][img http://apd-games.com/images/APDGames135.png][/a]
MacBook Pro OS X El Capitan
XCode Version 7
iPhone 6 running  iOS 9
iPad Mini running  iOS 7.1
Galaxy S5
Dell Latitude Windows 8 Enterprise
Palm Pre, Palm Pre2