   Looking for Very Simple 2d/3d library
  I'm at the point where I think I'm going to go crazy if I can't make any visuals in my code such as 2d or 3d. I have been doing c++ for a little while, maybe 4 months. I've used a basic language Called Dark Basic for about 2 years, so I know a lot of 3d and 2d concepts and have made many games with it. But as far as c++ goes, I've been working mainly with a black screen.Anyway, is there any library out there that simplifies 2d and/or 3d C++ development. I've heard of a few but I'm not sure which are good and simple. Also, would it be a good learning experience if I used these libraries?- Mason -   
  I'm a big proponent of SDL.When you want to do 3D with it, you'll have to use OpenGL (which SDL has bindings to), but that's not really a bad thing.  It's beneficial to learn and not too hard.I've heard good things about pyGamme, but that's only if you want to use Python.  Seeing as you know C++, I would imagine this is not the case.A lot of people here swear by Allegro.  I don't much care for it.Cheers,--Brian;  I'm currently downloading SDL. I see some tutorials for it, but they seem a little  confusing. I know some openGl like making basic primitives and such, but setting up a window has to be the most rediculous block of code I've ever seen.   ;  If you are developing for windows, check out my website.  It has my OpenGL wrapper class that does the window for you in one line.  Try it out.  It also has wrappers for Textures, Sound, GL display lists, multitexturing, and many other OpenGL things, as well as sound using DX8.  Also, it has input for you in another class using DX8 as well, so it is really made for windows developement.  If you try it, send me any questions you have as well.  I can give you a simple help if you need it.   ;  SDL has a little bit of a learning curve, but it isn't too bad.  For 2D, it's *much* easier than DirectDraw.Admittedly, setting up a window is one of the nastiest parts.  SDL is a little better than the Win32 API in this regard, but if you want a quick OpenGL window to play around with (if you're doing 3D), glut can give you that in about 10 lines of code.Cheers,--Brian;Quote:Original post by NairbSDL has a little bit of a learning curve, but it isn't too bad.  For 2D, it's *much* easier than DirectDraw.Admittedly, setting up a window is one of the nastiest parts.  SDL is a little better than the Win32 API in this regard, but if you want a quick OpenGL window to play around with (if you're doing 3D), glut can give you that in about 10 lines of code.Cheers,--BrianMine does it in about 3, one to make the class, one to Create Window, and one to destroy it, though in the end it uses the same Win32 code most use, I just have it wrapped up for easy use.   ;  Ya, I'm really liking this SDL. I'm taking the tutorials that the sdl site has to offer, and they are pretty good. The only thing is that they are using some really advanced maths, and I still haven't completed all my math classes yet. But I'm guessing the math isn't the point of the tutorial, as your supposed to benefit from learning the syntax and commands for sdl. kburkhart84: Is a "wrapper" like a function that holds all the actual window making code. So basically you call the function makeWindow(*paremeter list*) and then it does most of the work for you?Nairb: Ya, I have been using sdl for about an hour. There is some stuff in there that is a bit foggy, but I understand most of the concepts the tutorial throws out. Once I'm through this gigantic tutorial, I think I'll be able to make small games like pong possibly (not sure about the collision though) This tutorial teaches you how to make a 2d game, but if it doesn't cover collision I'm screwed :(. I've made a 2d and 3d pong in Darkbasic, but that isn't even comparable to c++  as far as difficulty goes.As for Sdl, is it capable of producing commercial games, just depending on the programmer(s)?Edit:By the way, I'm having trouble understanding a simple item in 2d. What exactly is pitch. In the tutorials they use the code  "yofs += screen->pitch / 4;" yofs is Y offset. His explanation for what this is doing is Quote:Thus, the pitch tells us how long a scanline is. The pitch is always at least as big as the width.  Unfortunately, that doesn't help me understand it.   ;  Pitch is the length in bytes of one line of a given image.Lets say you have an 8 bit color image thats 1 byte per pixel, if this image is 320 pixels wide then its pitch is 320*1 (1 bytes per pixel) wide.Same width image, now lets say its now 16 bit(2 bytes per pixel) So now pitch is 320*2 (2 bytes per pixel).And so on as the bpp increases.   ;Quote:Original post by NairbSDL is a little better than the Win32 API in this regard, but if you want a quick OpenGL window to play around with (if you're doing 3D), glut can give you that in about 10 lines of code.SDL can do it in about 7 or 8.Mason, here is my explanation of pitch.Here is a computer screen:==========================================================================================================================================================================Each '=' is a pixel. Each row of pixels is a scanline. The pitch is the width of a scanline multiplied by the number of bytes per pixel. So, basically, pitch is just a fancy way to say width.;  Ok, I think I understand now. So in my case, the bits per pixel is 4 since I'm using 32 bit. My width is 640 and my bpp is 4, so my pitch is 640*4 = 2560? So each scanline is 2560 pixels long?   