Author Topic: Might this be useful?  (Read 3695 times)

0 Members and 1 Guest are viewing this topic.

Offline ferris

  • Pentium
  • *****
  • Posts: 841
  • Karma: 84
    • View Profile
    • Youth Uprising Home
Might this be useful?
« on: October 25, 2010 »
So here at the college, a couple of kids in my hall wanted to start making 2D games. Originally I was going to point them to Blitz 2D, since that's where I learned and it did me a ton of good. However, they're in basic C++ classes here and I didn't think it'd be smart for them to learn another language.

So, I started thinking, hey, it's been awhile since I did any 2D framebuffer stuff anyways. Why not write my own lib? I could use it myself anyways.

After some research, I found PixelToaster, written by the same author who wrote Open/Tiny PTC (my beloved old framebuffer lib's). It seems very nice, but had some syntactical things that were a bit too advanced for the target users. So, I started abstracting it.

Long story short, I now have a lib that encompasses PixelToaster, FModEx, and stb_image and wraps them in functions that are [almost] identical to Blitz 2D. It's very much WIP and I'm pretty much just adding features as demanded (still following Blitz' drawing models). Would it be beneficial to post that up here? If I recall some people were getting a bit confused moving to C/C++ and it might help.

What do you guys think?
http://iamferris.com/
http://youth-uprising.com/

Where the fun's at.
Challenge Trophies Won:

Offline ferris

  • Pentium
  • *****
  • Posts: 841
  • Karma: 84
    • View Profile
    • Youth Uprising Home
Re: Might this be useful?
« Reply #1 on: October 25, 2010 »
Here is an example of a simple program to test the lib by the way:

Code: [Select]

// Spyro Avenger - Test Program
//  Abstraction layer for simple 2D development. Wraps PixelToaster, FModEx, and stb_image.

// (C) 2010 Jake Taylor [ Ferris / Youth Uprising ]

#include "..\SpyroAvenger\SpyroAvenger.hpp"
using namespace SpyroAvenger;

int main() {
Window window("Test",800,600,false);
Image mario("evil_cloud_hermit.png");
mario.transparentcolor(255,0,255);
float an = 0.0f;
while(window.getopen()) {
window.clear();
window.tileimage(&mario,(int) (sin(an) * 400.0f),(int) (sin(an * .67f) * 400.0f));
an += .01f;
window.update();
}
return 0;
}

...and yes, the lib is called SpyroAvenger. I had watched Hot Rod that day and I wanted a melodramatic 80's-sounding title :)
http://iamferris.com/
http://youth-uprising.com/

Where the fun's at.
Challenge Trophies Won:

Offline benny!

  • Senior Member
  • DBF Aficionado
  • ********
  • Posts: 4384
  • Karma: 228
  • in this place forever!
    • View Profile
    • bennyschuetz.com - mycroBlog
Re: Might this be useful?
« Reply #2 on: October 25, 2010 »
@Ferris:
The code/usage looks pretty straight forward to me. Nicely done! I myself already
touched PixelToaster and liked it so far.

Good luck with that project!
[ mycroBLOG - POUET :: whatever keeps us longing - for another breath of air - is getting rare ]

Challenge Trophies Won:

Offline LittleWhite

  • Senior Member
  • Amiga 1200
  • ********
  • Posts: 418
  • Karma: 31
  • It's me!
    • View Profile
Re: Might this be useful?
« Reply #3 on: October 26, 2010 »
Useful, it can be for your student. In my uni, my teacher is making a simple library for us (that force us to reimplement blitting function)
Otherwise, maybe you should look at SFML ... it can be that you needed (not sure).

Finally, of course it is always welcomed to post it here :) (Ok, I am curious)
The demoscene will never die, never!

Offline Clyde

  • A Little Fuzzy Wuzzy
  • DBF Aficionado
  • ******
  • Posts: 7271
  • Karma: 71
    • View Profile
Re: Might this be useful?
« Reply #4 on: October 26, 2010 »
Nice going Ferris, see if your students would like to have a butchers over 'ere.
The framework that Jim has kindly Coded up in C is very akin to tinyptc / pixel toaster using dx9.
Still Putting The IT Into Gravy
If Only I Knew Then What I Know Now.

Challenge Trophies Won:

Offline ninogenio

  • Pentium
  • *****
  • Posts: 1668
  • Karma: 133
    • View Profile
Re: Might this be useful?
« Reply #5 on: October 26, 2010 »
ahh hot rod ftw lol.
good times one of the funnyest movies ever!.

btw that looks like a great little lib im sure if you post it up many folks could get good use out of it.
« Last Edit: October 26, 2010 by ninogenio »
Challenge Trophies Won: