Library questions


XxionxX

Active Member
Joined
Jan 22, 2010
Messages
549
Age
37
Location
Santa Rosa, CA
Website
www.mcdonaldranch.org
So I was following along the Lazy Foo SDL tutorials, and I skimmed ahead because I wanted to see where the tutorial would take me. I noticed that everything seems to be headed in the direction of OpenGl if you want to make 3d graphics, and that is cool but I thought that the OpenGl library was not ported to the Pandora yet(not that it matters because I don't have mine yet). Also there was this one lesson about alpha blending(which I have not finished yet) and I didn't understand when he said, "SDL's alpha transparency is notoriously slow". I just want to make 2D games for now, but I don't want them to be slow. Do I need OpenGl to make them faster? I don't mind the learning curve, I just don't understand.


I found this cool tutorial for QT(and more!). Would it be faster(game speed not dev speed) to make 2D games on? Is QT even ported to the Pandora? and QT is better for making apps right? If QT is good for both apps and games then why not just learn that instead of both SDL and OpenGL?


I just want to learn how to make my Pandora do cool stuff and have fun :( I feel like a kid who just got stuck in the seat of a jet fighter and told "it's easy! All you have to do is fly!" -_- I understand that to learn how to code I have to write code. But I have been through the intro chapters of like 20 books and none of them are telling me how to make anything more than a really shitty calculator, some arrays and the most useless classes that I have ever seen(that itty bitty QT tutorial is better than most $60 books). Now that I am looking at all of these classes in all of these libraries I feel like there are 6000 different tools that all do something complicated. It's like someone took the training wheels off and flung me down the Swiss Alps with a "No sweat right?" The more 'intro to language x' books I read the more everything seems exactly alike with a few changes. But when I actually want to make something with one of these nice libraries, it's like I never even touched a computer before!


Sorry, I didn't mean for that to turn into a rant. I just want to learn and I can't seem to find a good tool/direction. With HTML/CSS it was easy, one book got me started and Google took care of the rest! I even managed to muddle my way though some basic PHP to make my webpages easier to maintain. Am I doing something wrong? With HTML I kept making better and better things. With C++ I finish the book and I can make some useless arrays and a pop up window that says hello world. Do they expect me to know the entire IO library? Where are my tools?


Wall--> | Stuff that I want to do.


Thanks for reading. Sorry about the rant.
 
No tool is going to immediately make you able to do everything you want. Pick something small you want to get done to get you started. The first game I remember doing was a simple snake game in C. There's an endless swamp of learning in game development and you need to set some goals if you want to get something ready at some point. You mentioned 3D graphics, but IMO you really should start with 2D, because things are so much easier in it and most of it carries to 3D with some adapting.


Pick a goal, pick your tools, learn needed stuff, do until ready. I'm sure people will gladly help you in any of those steps, but it's easier when you tell where you are now :)


Qt is awesome, but not the answer to everything. There are no silver bullets. Qt is also a HUGE thing to learn properly, but you can do a lot with it without knowing everything. However, I'd suggest first learning the basics through for example SDL, so you have a good foundation to understand the tools it provides for game programming.


EDIT: also, Qt is viable for game programming on pandora. Wars: Commando is made with it for one.


EDIT2: Also sorry if that sounded condescending. Was not my intention if it does.
 
Last edited by a moderator:
Start with some basic working project code, and extend it. You don't have to do everything from scratch. If you want to write a 3D game for the Pandora right now, you can get the Wakebreaker sources, study them, modify/tweak/alter-unrecognizably, and away you go..


http://w1xer.at/pandora/


(Hint: you can build Wakebreaker on your Pandora, learn from it, extend it, and so on .. thats what its for!)
 
I wasn't clear from your post what level of programming you're at. If you're just starting out then how about taking graphics out of the loop and concentrate on the programming logic?


Yes most of the books are shitty calculators, so how about ASCII games (I assume ncurses is on the Pandora). So Snake, LightCyles or that robot game where you move and then all the robots move towards you, if they collide they leave rubble that other robots will collide with. Look at ASCIIpOrtal or the huge number of roguelikes; ASCII doesn't mean simple.


Stuff like that will get you to understand the basic layout of a game loop; input, logic, render and used to the pure programming side of without battling with how to get SDL/Qt/whatever working and how best to use it.
 
Last edited by a moderator:
Thanks for the advice, I was feeling really frustrated.


I am interested in 2D game programming because it seems like I can focus on the programming side instead of letting the graphics get in the way. 3D games seem to complex for now. It seems like I would like QT better, even though it may be harder to learn. I want to be able to make applications as well as games, and I don't want to have to learn a whole other library just to make apps.


I have seen some really great 2D games and from what I've learned so far I understand that if I can make good 2D games, I can make good 3D games. But the main goal for me is to become comfortable with programming in general. I am the kind of person that needs to see results for their work, and everything I have been doing up until now has been focusing on the syntax and grammar of C++. I understand why that stuff is important, but I can't make things stick in my brain unless I use them. I know that game programming is far removed from things like OS programming, but I am hoping to eventually get into some AI programming which I feel might be useful. I just want to be able to help out and grow my skillset while doing something rewarding.


I choose C++ because it seems to work on the most platforms and has a large following. I want to be able to branch out as I learn without having to learn another language. I would like to learn more languages eventually, but for now I just want to focus on the programming part without having to worry about why language xyz is better for whatever.
 
In the end of the day, the language dont matter much... nor does the API you use.


You dont need to know the full API of a library. I guess that nobody know all of QT by now (too wide now).


All you need to know is how to find the missing information between you and your target... google is your friend here ;)
 
So I was following along the Lazy Foo SDL tutorials, and I skimmed ahead because I wanted to see where the tutorial would take me. I noticed that everything seems to be headed in the direction of OpenGl


I found this cool tutorial for QT(and more!). Would it be faster(game speed not dev speed) to make 2D games on? Is QT even ported to the Pandora? and QT is better for making apps right? If QT is good for both apps and games then why not just learn that instead of both SDL and OpenGL?


I would recommend either SDL or QT. LazyFoo has a SMALL section on SDL with OpenGL, but it really does focus on 2D.


One advantage of Qt as you head towards 3d is it's actively developed and supports GLES. SDL seemed to be heading in that direction with 1.3, but 1.3 hasn't seemed to go anywhere in a while and almost everybody seems to continue to use 1.2. 1.2's not bad and it supports input devices maybe a little better than Qt...though talk to B-Zar about his game since it was developed in Qt. Either should work for 2d, though there seems to be more tutorials, for the moment, on SDL. LazyFoo's is pretty good.


If you want to CODE a game, theres a seemingly endless number of libraries, dependencies, and an ever changing landscape of things to learn on one hand... and when you make the transition to 3D watch out for the MATH. Ugh. (There are a lot of cheats to avoid math for 2D programming. I don't see any way out of it for 3d.)


On the other hand, especially with 2D, the principles probably won't change THAT horribly much now that just about anything you're going to code for will have enough power for true color, double buffering, etc. We're no longer dealing with a NES, color pallets, etc... though a lot of the tricks used to program on the older consoles may speed up modern games and are still valid for "special effects". I actually think SOUND is more of a pain than the graphics now. :-b


If you'd like to simply try creating games, there are game editors out there that may work better for you.


Or go the N-Curses route as somebody else suggested to try making a game. I just completed a kinda lame game for my CS-135 class. Basically connect-3 with five blocks of color. Each "block" was 3 wide by 2 tall. You'd basically clear the screen with your chosen console background color to draw the block.
 
I think there's a pretty huge jump from 2d to 3d. I think you can be a GREAT 2d game programmer and still be at a complete loss as a 3d programmer.


I'd definitely focus on getting some things working in 2d before taking on a 3d game.


For one, 2d game programming generally deals with a grid and blitting whole pictures. You MIGHT do some simple rotations or scales, but as a rule you don't have to.


It's also easier to "cheat" things like physics, acceleration, and what have you. Animation is simply going from one static sprite to another, as a rule. (There are plenty of exceptions, but you can deal with very simple math - mostly addition, subtraction, multiplication, and division for a TON of 2d games.)


______________


3D


A SIMPLE 3d game, wavebreaker: http://w1xer.at/pandora/


Somebody doing a 3d game, not sure if there's been any recent progress: http://www.gp32x.de/board/index.php?/topic/56174-opengles2-racing-game-developmenthttp://www.gp32x.de/board/index.php?/topic/56174-opengles2-racing-game-development/


And a "modern" game developer's blog: http://www.wolfire.com/


While it's possible to have a "relatively" simple 3d game - that relative is still much more complex than the equivalent 2d game. Even just creating your "sprite" - your game character, becomes much trickier. You, or your graphics person if you're lucky enough to have a second party for your game - needs to learn a tool like Blender, 3dStudio Max, or some other equivalent 3d modeling tool. You have to be able to export your character in a format your game can read - it won't be a standard .png, etc., and you'll most likely be doing the model loading code...


'Course, there's a workaround for some of this. Just simply use somebody else's engine, like the QIII engine - though even there you'll be doing a ton of work yourself.


You're definitely not going to be able to avoid the math in the 3d realm. Even just keeping track of the direction you're heading in involves trigonometry - vectors. You'll need to be able to handle Matrix transformations quickly, add lighting to a scene, etc. You'll have a lot more transitions between "world space" and "local space", and may end up transitioning between thing like quaternions for "smooth" animation of things like walk / run cycles and back to Matrix math for your graphics pipeline.


It's not IMPOSSIBLE, but it really does add a dimension to coding. Never mind the differences between GLES, OpenGL, the Windows 3D API, "classical" fixed function programming - probably something I'd learn AFTER learning how to program with Shaders, if you bother to learn it at all. ( Shaders are the future, for now. Everything from consoles, smart phones, PCs, etc. seem to use them now. It's what the Android, Pandora, iPhone, and modern OpenGL all support. )
 
Last edited by a moderator:
Last edited by a moderator:
Perhaps the commercial GLBasic could be a solution for easy game programming on the Pandora. You can buy it at the GLBasic website or at ED's shop. :)


At the German forums we are also trying to get Freepascal running, but there are still problems with OpenGL ES at the moment....


Other possible tools could be BennuGD or pyGame, but I don't know if the Pandora is supported.
 
Well, the tutorial starts off with 2D stuff, and then jumps to 3D a bit later. I can recommend going through the 2D stuff of this tutorial now and when you take the dimension leap to 3D later, continue where you left off.
 
I can't wait to make my first game! I really want to be able to help contribute to projects and learn how to work with the community. Making stuff that others can use is lots of fun.
 
Back
Top