Jump to content
  • Advertisement
Sign in to follow this  
Mad_Koder

2D OpenGL SDL Engine Help

This topic is 4232 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have decided that writeing my own 2d engine is way too much work for a mere 2d side scrolling gravity defineing game, so before loseing an arm and leg from doing so, I was wondering if thier is any free Engines for SDL&&OGL that would be good for a 2D side scroller? If not how about Win32&&OGL? Imensly Apreciated -Mad_Koder (spoof)

Share this post


Link to post
Share on other sites
Advertisement
Hidden
I don't know of any such engine. But I'm not sure exactly what it is you're asking for....

Do you want a GAME engine, something you can just add content to and you're done? If yes, then I guess you're looking for some kind of game maker... unfortunately I cannot help you with that, but I know there are lots of them out there.

If you are looking for some kind of GRAPHICS engine though, then look no further. SDL has everything you need for handling keyboard and mouse input, sound, etc etc. For graphics, you can use OpenGL for 2D graphics as well.

Have you programmed any SDL before? I mean, do you know how to blit and animate sprites, etc etc? If yes, then I assume you wanna use OpenGL to speed up graphics (since SDL is pretty slow at high resolutions). For this, you can write a simple function for loading SDL_Surfaces to GL textures and blit them as quads on the screen instead. (I can also give you this function 100% working, as I wrote one myself just 2-3 days ago...)

If this was not the answer you were looking for, let me know and I will try to help you better. :)

Share this post


Link to post
SDL, would work good yes, but dont know how too make trees and liked list so i cant really code a great oop design, so is it fine to make a game in a non oop style, or will it be a lot harder (how much so)? And yes I do know SDL and how to blit image etc., I could review the tutorials though as i am a tad rusty. Is it a lot faster if you include gl.h and glu.h instead of SDL_opengl.h?

Thanks

~Mad_Koder (spoof)

Share this post


Link to post
Share on other sites
Hidden
I don't know any C++ I'm afraid, as I only program in old C. But you don't need any linked lists and stuff for the game you wanna do... if you were writing a game server linked lists would probably be better, but in your case you'll be just fine with arrays.

To add 100 bullets to you game, you can do something like:


struct {
int xpos;
int ypos;
int direction;
int velocity;
} Bullet[100];



You should always use the SDL_opengl.h header file when you're programming SDL with OpenGL. I think it has to do with cross-platform compability.

Share this post


Link to post
I have a SDL and OpenGL library that was originally intended for 2D game development (I've made a few games with it so far). I use it for all new development, so might be worth a check.

I'm still planning on doing a better release in the new year with nicer namespacing, cleaner shader class design and more stuff, but the 2D core of the library is there and works well.

You'll probably need to roll your own level format, map collision and whatnot, but there's enough stuff there to make a decent sized game without having to spend time writing texture and font loaders (for one).

If you have questions, I'm generally online so you can harass me over AIM or MSN like it says on the site, or use the forums and IRC channel (I'm generally on IRC when I'm online).

Share this post


Link to post
Share on other sites
Quote:
Original post by Ravuya
I have a SDL and OpenGL library that was originally intended for 2D game development (I've made a few games with it so far). I use it for all new development, so might be worth a check.

I'm still planning on doing a better release in the new year with nicer namespacing, cleaner shader class design and more stuff, but the 2D core of the library is there and works well.

You'll probably need to roll your own level format, map collision and whatnot, but there's enough stuff there to make a decent sized game without having to spend time writing texture and font loaders (for one).

If you have questions, I'm generally online so you can harass me over AIM or MSN like it says on the site, or use the forums and IRC channel (I'm generally on IRC when I'm online).

Hey, I tried building PropaneInjector using Xcode using your tutorial, and I recieved this error:

http://img85.imageshack.us/img85/4803/picture1jc1.png

Could you help me out?

Thanks

Share this post


Link to post
Share on other sites
Quote:
Original post by Max Piano
Have you linked (inserted in the project) the cpp files?

Yes, I have followed this tutorial exactly
http://ravuya.ballofdoom.com/propaneinjector/howto/Xcode/

Share this post


Link to post
Share on other sites
For v0.7, I think it's been re-namespaced so instead of PI_initSDL and PI_initGL you'll have to use Propane::initSDL and Propane::initGL/initGL3D. It's part of the reason I recommend using v0.4 -- I haven't yet updated the documentation for the 1.0 release effort.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!