• Welcome to Dark Bit Factory & Gravity.
 

Might this be useful?

Started by ferris, October 25, 2010

Previous topic - Next topic

0 Members and 0 Guests are viewing this topic.

ferris

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:

ferris

Here is an example of a simple program to test the lib by the way:



// 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:

benny!

@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:

LittleWhite

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!

Clyde

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:

ninogenio

#5
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.
Challenge Trophies Won: