Sign in to follow this  
lucasloredo

going in circles?

Recommended Posts

Hello- I am about halfway through "Beginning C++ Game Programming" by Michael Dawson (im learning about arrays as of now). Looking ahead in the book, it has become apparent to me that i will not be making any "full-fledged" games (i.e. everything is text-based). What worries me is that by the time i finish the book I won't even know where to begin in terms of getting graphics/sound/animation into a game, or how to use it. So, my question is, are there other books out there that I should read after I finish this one? What should be my next step after finishing this book? Thanks in advance for your help...! -Lucas (by the way, the last chapter in the book is about inheritance and polymorphism, telling you where i will be at the end of my current study)

Share this post


Link to post
Share on other sites
My post is probably not helpfull however, yes there are other books that you should read after you finish this book. The type of book you'll need you'll understand better once you finish reading the book you're reading.

Share this post


Link to post
Share on other sites
Inheritance and polymorphism is the end?

Yegods.

Yes, there's many more books available to you. A decent C++ book would be a good start, maybe 'The C++ Standard Library' by Josuttis...

[in hindsight] I'd worry about learning the language first, and then some design/computer science before worrying about games, let alone pretty-shiny games.

Share this post


Link to post
Share on other sites
There's a lot you can do with text-based programs. In fact, nearly everything can be done, short of actually getting stuff on the screen. I know that sounds stupid, but too often people assume that once they learn how to display 3D graphics, that they'll be able to discard a lot of what they've learned, but this isn't true. You still have to know the math to determine exactly where everything goes, even if you make the computer do a lot of the actual rendering. That said, you have a lot of possible choices now. You can go and write your own rendering engine to see how it works (but it probably won't be applicable to any real projects, because it won't harness your GPU), you can teach yourself Direct3D or OpenGL (two API's; they use the GPU but still give you about as much control as they can, you'll have to choose one), or you can use a higher-level engine like Ogre. It depends on what you want to do as soon as you're done. Eventually, you'll probably want to be able to do it in as many ways as possible.

Share this post


Link to post
Share on other sites
Yes. A brief overview:

OpenGL and DirectX are graphics APIs for rendering rasterized triangles. What this means is that they do 3D graphics. They can be bound with several other APIs to make them easier to use.

For beginning with graphics, I would recommend SDL. SDL is a simple, easy-to-use API that has support for graphics, sound, threading, and has lots of add-ons that give it even more functionality. SDL is available from libsdl.org. SDL also supports use with OpenGL. It is fit for use in commercial games, and the game Civilization 4 used it for their game engine, I hear.

If you don't like SDL, another alternative is Allegro. I haven't used it, but I think it fulfills a similar purpose. Other posters can elaborate.

All of the above are free, very well used, and just rock-solid. I would suggest starting with SDL or Allegro, and going from there.

Share this post


Link to post
Share on other sites
Even before you have completely finished that book, try checking out these tutorials:

http://cone3d.gamedev.net/cgi-bin/index.pl
http://www.aaroncox.net/tutorials/2dtutorials/
http://sol.gfxile.net/

These will teach you how to do 2D graphics programming using SDL, a common graphics library. While a book is not necessary to learn SDL, it may help. I, personnally, have not read any SDL books, so I can't make any recommendations.

Check out nehe.gamedev.net for OpenGL tutorials, once your comfortable with SDL.

Share this post


Link to post
Share on other sites
Hello all, and thank you so much for your quick replies!

@Telastyn: Im guessing polymorphism isn't that far in then...? =P
also, i think i might've been misunderstood, i'm not planning to make any "pretty-shiny" games for a while. My main concern is being able to do anything at all using graphics (as in, after finishing this book, i wouldn't even be able to make a graphical tic-tac-toe :-\)

@cowsarenotevil: thanks for your reply. I'm not exactly clear on all of what you said, but i think its safe to assume thats a long way off for me? =-P

@silverphyre673: what exactly is SDL? Is it similar to iostream? (in that it is a library of executables?). What exactly does SDL entail, and what sort of interface does it use? Do you simply write in C++ using different commands enabled by SDL?

@Ezbez: thanks for the links! I appreciate it. School has been very time consuming lately (please don't judge me, i'm still in highschool haha). Whenever I get some more time I will check those out.....!

Once again, I thank you all for your quick replies...!
This is, if I may say, one of the most useful forums I have ever used.

-Lucas

Share this post


Link to post
Share on other sites
Quote:
Original post by lucasloredo
@cowsarenotevil: thanks for your reply. I'm not exactly clear on all of what you said, but i think its safe to assume thats a long way off for me? =-P


It really doesn't need to be. SDL is an example of a higher-level library. It just uses your video card's 2D functions (or 3D if you use it with OpenGL). I've not used it, so I don't know the specifics, but it seems like a good choice. Using SDL with OpenGL is not much different from using OpenGL with the standard Windows (or whatever you use) setup, but it's more flexible and probably a better solution. But you might also want to consider Direct3D (Windows only) or, like I mentioned, Ogre and the like (Ogre is a 3D engine that is API independent-- it can use OpenGL or Direct3D). There's no need to learn 2D graphics first, either, provided you're willing to learn a little bit more math to do the 3D. 3D definitely needs a basis you can get from writing text-only programs, but there's not as much foundation that you'll get from using 2D graphics.


EDIT: I can use the quote tag. Really.

Share this post


Link to post
Share on other sites
Yeah, learn the language first, then move on to actual game programming. I would pick up Game Coding Complete 2nd Edition. I loved it. Tricks of The 3D Game Programming Gurus was also a great book if you're wanting to get into 3D. Although books are awesome you'll want to scour websites like GameDev and Gamasutra to get specific topics. And always look over the chapters before you buy the book to make sure it goes over what you're looking for. There are so many resources on the web for you to use. Once you learn a language Google things your interested learning, like AI, images, DX, OpenGL etc. There is a link somewhere on GDNet of tons of file formats, which will be very useful.

Share this post


Link to post
Share on other sites
thanks again for your replies

@I_smell_tuna: is there a certain level one should be at before attempting to make a game? Or, in my case, what would you suggest I understand before I move on to the books you mentioned?


On a general note, C++ is sometimes a bit difficult for me to fully understand. I can do the commands and statements, and understand when to use certain things (for the most part) but its hard for me to fully grasp something that i'm learning without knowing why its happening. My mind (and i'm assuming a lot of your minds as well) works best when i know what's happening behind the scenes.

I would guess that you guys would suggest taking a computer science course... however, being a sophomore in highschool limits my possibilities. Would you suggest a summer course in said subject? I live in Austin, TX and have easy access to the University of Texas.... are there any good programs there that you guys know of?

thanks again,
Lucas

Share this post


Link to post
Share on other sites
Quote:
Original post by lucasloredo
On a general note, C++ is sometimes a bit difficult for me to fully understand. I can do the commands and statements, and understand when to use certain things (for the most part) but its hard for me to fully grasp something that i'm learning without knowing why its happening. My mind (and i'm assuming a lot of your minds as well) works best when i know what's happening behind the scenes.

I would guess that you guys would suggest taking a computer science course... however, being a sophomore in highschool limits my possibilities. Would you suggest a summer course in said subject? I live in Austin, TX and have easy access to the University of Texas.... are there any good programs there that you guys know of?

thanks again,
Lucas


I'm a highschool sophmore too, actually. My recommendation is to read books (lots of books), read this forum (and don't be afraid to ask questions; In general the more specific a question is, the better), and read anything else you can. A good, college-level computer science course can be good (it helped me a lot), but any class that isn't good will only hurt you (and almost any highschool class at all will hurt you, too.)

If you feel like you don't really know what's going on, my suggestion is to read a book that goes a bit more in depth. Also, even if you don't read that great of books, if you have lots of good examples with at least some explanation of what it is that they do, you'll be able to get quite a lot. Be warned that if you see something and it doesn't seem like there's enough code to achieve the desired effect, then there almost certainly isn't. Beginning programmers usually are surprised that the code has to do more or less everything to produce the final output (of course, there are shortcuts to things like physics, but generally you'll end up needing to learn most of what a particular library does before you can use it correctly). Each bit of code itself is generally quite straightforward, though, so it's how you think of a game world that will really allow you to deal with it.

Share this post


Link to post
Share on other sites
There isn't really any level you should be at. I'm tackeling a video game with no video game specific development under my belt, although I have years of experience with programming a other tech related fields. In the last 6 months I've learned so much about game development through the use of books, GameDev, and Goole it's not funny. Just do a bunch of research man. Learn about the different sub-systems of a video game and make one when you feel comfortable with them. You can learn a lot by just watching the GDNet forums. When I get home from work I log in and go to the Active Topics link in the forums and just read for hours. Good luck with your endeavors.

Share this post


Link to post
Share on other sites
Quote:
Original post by lucasloredo
How long have you been programming cows? Where are you at in terms of skill level, and how did you get there?

its nice to know that im not there's other people out there my age that have had success =]


Probably... wow, I guess I've been programming for more than seven years, actually. I know a good bit of C++ and Java (C++ better than Java, but with Java you don't really have to deal with pointers in the same way), and quite a bit about data structures, etc. The game I'm trying to put together right now doesn't use anything beyond what's in your book aside from OpenGL, though.

Share this post


Link to post
Share on other sites
I had the "EXACTLY" same experience. I read the book, and then I saw that inheritance and polymorphism. It had no graphics! But it came in useful. I wrote a letter to the author on his wesite (here) and he answered and said that I should check out SDL for graphics as it is pretty easy to pick up. After that my own suggestion would be OpenGL, as it seems sort of less confusing(to me). Good luck.

P.S. He also said to check out 'Focus on SDL'(a book) and to check out some of the MANY tutorials online.

Share this post


Link to post
Share on other sites
thanks again everyone for your replies.... i'll put your advice to good use!

just a few more things pertaining to schooling:

how much math do you use in C++ or other programming languages? I'm taking pre-cal right now as a sophomore. I'm very good at math, but I have a feeling a lot of this knowledge and advanced classes won't do me much good in the long run haha.


its still very early for me to be considering college options, but, when i think about it, i'm going to be applying next year....! (holy crap)
I'm still undecided as to what field i want to go into ( i know i want to make games, but, what aspect of them, i do not know). I have some experience with XSI Advanced, good experience with GTKradiant and Hammer, and some photoshop skills, and now beginning c++.... i just don't know what i want to do...!

any suggestions on what I should focus on....? Or should i continue what i'm doing, simply doing a bit of everything?

thanks again!
Lucas

Share this post


Link to post
Share on other sites
How much math you need is determined by domain area not programming language. For example, you'll probably want to take at least up to Calc III and/or linear algerbra (generally a 200 level college course) if you plan to do any 3D graphics or physics programming.

Share this post


Link to post
Share on other sites
Quote:
Original post by lucasloredo
how much math do you use in C++ or other programming languages? I'm taking pre-cal right now as a sophomore. I'm very good at math, but I have a feeling a lot of this knowledge and advanced classes won't do me much good in the long run haha.


Like SiCrane said, it depends. You'll use more than you think, particularly if you want to control the finer details of how your program works. None of the math is unmanageable, though. Even when I was younger I'd teach myself little bits of linear algebra or calculus to keep up with whatever I was reading, but it was little bits that you could grasp in a day, rather than years, particularly if you don't care exactly why something works, just how to use it. Math, though, is something you're much better off taking classes in (at least than programming). In general, there are better math teachers (more of them), and better-refined teaching (it's been around longer).

Share this post


Link to post
Share on other sites
im a little confused cows, you are a sophomore in highschool yet you have been programming for 7 years? .... making you, what, 8 when you started?

man if that's the case i really need to get going or i'll never catch up lol :-P

Share this post


Link to post
Share on other sites
Quote:
Original post by lucasloredo
im a little confused cows, you are a sophomore in highschool yet you have been programming for 7 years? .... making you, what, 8 when you started?

man if that's the case i really need to get going or i'll never catch up lol :-P


Yeah, actually eight is about right. Maybe 9. But it wasn't until I was 12 that I actually got a real grasp on what I was doing (I saw a good explanation of pointers and what they're actually used for, and I read a long thing about raycasting and actually took the time to get it (half) working). Before that I didn't make too much progress because I didn't have enough mathematical background and people didn't really take me seriously.

Keep in mind that there are five year olds who can program. In general, though, at least one of their parents is a professor of computer science who forces it down their throat. This is not preferable. But if you have access to the right materials, it really doesn't matter when you learn.

EDIT: As for "catching up," if you want to, you could catch up to me relatively easily. As it stands, I just finished up my roughly year-long break from programming. If you check my posting history, you'll see nothing but "GDNet Lounge" from sometime last year up to four days ago.

Share this post


Link to post
Share on other sites
In general, it involved books and a lot of very, very stupid mistakes. I do not recommend taking the steps I did, unless you really want to take the long route to game programming (it entails learning VBScript [I was convinced this was a good idea at one point. I don't even remember why]; that in itself should convince you it's largely a waste of time).

Share this post


Link to post
Share on other sites
Quote:

@Telastyn: Im guessing polymorphism isn't that far in then...? =P
also, i think i might've been misunderstood, i'm not planning to make any "pretty-shiny" games for a while. My main concern is being able to do anything at all using graphics (as in, after finishing this book, i wouldn't even be able to make a graphical tic-tac-toe :-\)


It's not so much the far, as much as it's something that's one of the most commonly used features of the language. Further, templates are usually after that, and they too are really useful in making exceptional problems into merely difficult.

Sorry for the unclarity. Just using graphics is 'pretty-shiny' in this context. Adding a UI, or rather trying to do the UI and the game at the same time increases the difficulty quite a bit.

Games are just rules. Graphics just provides an interface to them.

Onto other topics... I've taken upto Calc III, [2 full years of calculus/differential equations] and found it all useful at one point.

And my father was a programmer, so it was neat to just throw a few little things together. Programming is like abstract Lego's at that age.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this