Author Topic: Tiny Framework  (Read 3811 times)

Offline spicypixel

  • Prof. Inline
  • *****
  • Posts: 646
  • Pixel Artist
    • View Profile
    • SpicyPixel.net
Tiny Framework
« 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.

« Last Edit: 2013-Jun-01 by spicypixel »
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.

Offline bigsofty

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 2671
    • View Profile
Re: Tiny Framework
« Reply #1 on: 2013-May-30 »
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)

Offline spicypixel

  • Prof. Inline
  • *****
  • Posts: 646
  • Pixel Artist
    • View Profile
    • SpicyPixel.net
Tiny Framework
« Reply #2 on: 2013-May-30 »
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.

Offline fuzzy70

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 828
  • Look left, Look right, LOOK OUT!!
    • View Profile
Re: Tiny Framework
« Reply #3 on: 2013-May-30 »
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)

Offline Moru

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 1787
    • View Profile
    • Homepage
Re: Tiny Framework
« Reply #4 on: 2013-May-30 »
Thanks for sharing, that will make life much easier!

Offline spicypixel

  • Prof. Inline
  • *****
  • Posts: 646
  • Pixel Artist
    • View Profile
    • SpicyPixel.net
Re: Tiny Framework
« Reply #5 on: 2013-May-30 »
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.

Offline Heiko

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 502
    • View Profile
Re: Tiny Framework
« Reply #6 on: 2013-May-30 »
Thanks....nice stuff  =D
Ryzen 5 2400G - MSI B450 Tomahawk

Offline mentalthink

  • Prof. Inline
  • *****
  • Posts: 3372
  • Integrated Brain
    • View Profile
Re: Tiny Framework
« Reply #7 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:

Offline aroldo

  • Mr. Polyvector
  • ***
  • Posts: 143
    • View Profile
    • APD Consulting, Inc.
Re: Tiny Framework
« Reply #8 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.
« Last Edit: 2013-Jul-26 by aroldo »
[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