PDA

View Full Version : Open Source 2D game engines or chunks?



crazyfuturamanoob
November 3rd, 2008, 06:42 PM
I am looking for a small easy-to-use 2D game engine, written in C, or any small game chunk
containing basic libraries for drawing sprites, animations, collision detection, networking etc.

Of course I could do this myself, but I wouldn't want to reinvent wheel when it is already done so many times.

Perhaps there is something I could use as a base when building my game?
If not, then I will just stick with OpenGL and SDL.. :roll:

Thanks.

jamescox84
November 3rd, 2008, 08:37 PM
Maybe have a look at SuperTux as a starting point:

http://supertux.lethargik.org/

hessiess
November 4th, 2008, 12:16 AM
Use a 3D engine such as Irrlicht, map your 'sprites' to quads, position everything on a 2D plane and render it with an iso camera. This gives you advantages such as texture filtering, none-pixalated scaling and rotation. the only problem is most 3D engines don't come with 2D colithion detection.

jimi_hendrix
November 4th, 2008, 01:08 AM
semi-on topic question;

whats the advantage of using an engine over using something like SDL (my favorite)

crazyfuturamanoob
November 4th, 2008, 07:38 AM
semi-on topic question;

whats the advantage of using an engine over using something like SDL (my favorite)

I am actually looking for a collection of libraries for 2D collision detection and stuff.

Greyed
November 4th, 2008, 11:17 AM
Well, all save the C part, PyGame.

http://en.wikipedia.org/wiki/Pygame

Of particular note would be the link to PGU.

crazyfuturamanoob
November 4th, 2008, 03:42 PM
Well, all save the C part, PyGame.

http://en.wikipedia.org/wiki/Pygame

Of particular note would be the link to PGU.

But I'm looking for C libraries, not python.

Greyed
November 4th, 2008, 04:45 PM
Well, I did preface my comment that I acknowledged you were looking for C. :p

I mean it isn't as if the suggestion isn't viable. http://fretsonfire.sourceforge.net/ If you know you need C, great. If you only suspect you need C but you're not sure other than C's what everyone else talks about then I am presenting a viable alternative for your consideration knowing full well it doesn't meet your specified language but does pretty much nail your specified goal.

crazyfuturamanoob
November 4th, 2008, 05:04 PM
Well, I did preface my comment that I acknowledged you were looking for C. :p

I mean it isn't as if the suggestion isn't viable. http://fretsonfire.sourceforge.net/ If you know you need C, great. If you only suspect you need C but you're not sure other than C's what everyone else talks about then I am presenting a viable alternative for your consideration knowing full well it doesn't meet your specified language but does pretty much nail your specified goal.

I know basics of Python and I have made games with PyGame. But I want C.

Greyed
November 4th, 2008, 05:40 PM
Hokay. G'luck. :)

nihilocrat
November 4th, 2008, 07:56 PM
He's probably insisting on C so much because, through personal experience, I've found that Python is really embarassingly slow (even with psyco) for all but the simplest games. I guess it could teach you to learn the language internals, write really efficient code, etc., but the whole point of using a dynamic language is ease-of-use and reduced development time.

Check out ClanLib (http://www.clanlib.org/). Of course it's C++ and not C, so maybe you really do mean to say you want a C library. Honestly, in that case, the options are few. It would be more productive to scrounge for open source games in C and try to learn from / repurpose their code.

crazyfuturamanoob
November 4th, 2008, 09:27 PM
One of the greatest games ever made is written in C, Quake.

jimi_hendrix
November 4th, 2008, 10:40 PM
well about the collsion detection part...here's a bunch of sdl tutorials...including 3 chapters of collision detection, but im not sure if this is just C or C++

http://lazyfoo.net/SDL_tutorials/index.php

Ferrat
November 5th, 2008, 12:33 AM
well about the collsion detection part...here's a bunch of sdl tutorials...including 3 chapters of collision detection, but im not sure if this is just C or C++

http://lazyfoo.net/SDL_tutorials/index.php

they are C++ and using classes

Mickeysofine1972
November 5th, 2008, 11:10 PM
Ok well this is a C++ answer but you can get all the stuff you mentioned using MirthKit

www.mirthkit.com

It total rocks and if you make a good game you can distribute it freely and on ALL the main OS platforms!

Mike