I'm comfortable with the basics of C++, when do the games start?

Started by
14 comments, last by oliii 15 years, 10 months ago
My programming background is Turing for about 4 years in which I made scrolling 2D games as well as level editors, music programs, vector graphics tests, and what not. I was comfortable making old school games with an object oriented language. I've had a year of C experience and about 6 months of C + +. I'm comfortable with the basics. I'd like to know the fastest way to start throwing some sprites on screen, get input, and play some sound files. I have a friend that is going about this by learning how to program for Windows (I guess I've been programming for DOS?)and DirectX or something. Unfortunately I'm really ignorant has to how that works or relates to each other. While I'd one day like to have the knowledge to be able to draw an individual pixel on the screen, and expand that into drawing an image from a file. I'd much rather use something else if it exists. Any ideas? PS. I'm horribly ignorant as to what exactly API's are/how they work, and what/how you program for different OS's.... so take that into account while giving advice.
Advertisement
First of all, am I correct in thinking (since you mention working with an object-oriented language) that you're comfortable with object-oriented programming (classes, inheritance, what should end up in which class, etc.)?

If so, what have you managed to do thus far in C++? Bear in mind that, depending on how similar to C++ Turing is, there might be a fair bit to learn yet about C++, especially with regards to games.

Finally, you mention that you've had a year's experience in C. Given this, I would just like to bring up the caution to watch out for carrying over C idioms and code into C++.

Unfortunately, I think that if you want a quick way to make progress in getting sprites onto the screen and having sounds play, C++ is probably not the way to go. A better bet might be something like Python, along with a game-oriented tool of some sort (I've seen people recommend PyGame, but haven't used it myself. Depending on where you are in terms of game development and object-oriented programming, you might find success using an engine like Panda). Better yet would probably be a game creation tool, such as GameMaker (about which I've heard good things, and from which I've seen some good games come, I believe, although I've also gathered that it handles 3D slowly. I think that it's geared more towards 2D games than 3D).

MWAHAHAHAHAHAHA!!!

My Twitter Account: @EbornIan

Quote:Original post by Thaumaturge
First of all, am I correct in thinking (since you mention working with an object-oriented language) that you're comfortable with object-oriented programming (classes, inheritance, what should end up in which class, etc.)?

Yes I am.

Quote:Original post by Thaumaturge
If so, what have you managed to do thus far in C++? Bear in mind that, depending on how similar to C++ Turing is, there might be a fair bit to learn yet about C++, especially with regards to games.

Well I just finished my first year in college for a computer programming and analysis diploma. So with C++ most of what they had us make would be design a class for a bug. Bugs have public yadayadayada, and private yadayadayada, and these functions should, blah blah blah. Also derive a "ant" class and a "spider" class from "bug" that has .... I think you get the point.

Quote:Original post by Thaumaturge
Unfortunately, I think that if you want a quick way to make progress in getting sprites onto the screen and having sounds play, C++ is probably not the way to go. A better bet might be something like Python, along with a game-oriented tool of some sort (I've seen people recommend PyGame, but haven't used it myself.

I just came from a 'python like' language, Turing. Here's a quick link to a 2D side scroller I made with it a while ago. That thing took 2,000+ lines of code... which I'm sure to many here that is nothing.
Quote:Original post by Thaumaturge
Depending on where you are in terms of game development and object-oriented programming, you might find success using an engine like Panda). Better yet would probably be a game creation tool, such as GameMaker (about which I've heard good things, and from which I've seen some good games come, I believe, although I've also gathered that it handles 3D slowly. I think that it's geared more towards 2D games than 3D).

Unfortunately.. this is where my ignorance shows. I took a look at Panda and read it's features page. From what I can tell it looks to be a bit more than I need. As for GameMaker, I fully respect it and think it's a great tool for people to get started in making games. I don't want to go back there. By there I mean GameMakers grandfather... Klik'n'Play.

Is there something... that you can download and it gives you a few commands like foo[x] = Load.Image("image.gif"); and Draw.Image(foo[x], x, y);? Thats what I'm looking for.

I don't want to claim I am much further along in the process than you are, but I am hard at work on a game that does in fact have a few sprites on the screen and such. I am using SDL and have found it to be pretty easy to get into, though it is lacking when it comes to performance that shouldn't really bother anyone just starting out.

To that end I would highly recommend starting out here:

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

I can't say I have found better graphics tutorials for a beginner anywhere on the net. It walks you through the basics and covers the basics of sound as well (something many beginner's tutorials lack).

I'm working on a game! It's called "Spellbook Tactics". I'd love it if you checked it out, offered some feedback, etc. I am very excited about my progress thus far and confident about future progress as well!

http://infinityelephant.wordpress.com

Quote:Original post by JavaMava
Is there something... that you can download and it gives you a few commands like foo[x] = Load.Image("image.gif"); and Draw.Image(foo[x], x, y);? Thats what I'm looking for.


SDL is a common library for what you're trying to do.
http://www.libsdl.org/
Quote:Original post by Plethora
I don't want to claim I am much further along in the process than you are, but I am hard at work on a game that does in fact have a few sprites on the screen and such. I am using SDL and have found it to be pretty easy to get into, though it is lacking when it comes to performance that shouldn't really bother anyone just starting out.

To that end I would highly recommend starting out here:

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

I can't say I have found better graphics tutorials for a beginner anywhere on the net. It walks you through the basics and covers the basics of sound as well (something many beginner's tutorials lack).


Okay I've given that a quick glance and it looks to be exactly what I need. Thanks! Quite a bit more complicated than I was hoping, but it looks to be within my grasp. Thanks again!

Quote:Original post by bzroom

SDL is a common library for what you're trying to do.
http://www.libsdl.org/


;)
A couple of other libraries to consider are SFML (similar to SDL but more OO) and Allegro.
Quote:Original post by JavaMava
Unfortunately.. this is where my ignorance shows. I took a look at Panda and read it's features page. From what I can tell it looks to be a bit more than I need. As for GameMaker, I fully respect it and think it's a great tool for people to get started in making games. I don't want to go back there. By there I mean GameMakers grandfather... Klik'n'Play.



Actually they are two different companies. The newest and latest version of Klik'n'Play would be Multimedia Fusion 2 from Clickteam. Although I understand your point :) .




Get ahold of sample games and take a look at the structure of the program (I did this years ago with the DirectX SDK with the many working sample programs covering different game aspects).

Start to make modifications to the game to learn the stuff even better (actually doing it causes you to learn more...). Most of the components have lots of options that the sample only uses one flavor of. You will probably have to searchh thru tutorials and online search to find the specific info you need to do certain things (get used to that because lib documentation is usually pretty limited/ not well indexed).

Then start picking and chosing game mechanisms that YOU want for your test game and try to assemble it from parts of the samples .
--------------------------------------------[size="1"]Ratings are Opinion, not Fact
Quote:Original post by wodinoneeye
Get ahold of sample games and take a look at the structure of the program

Don't Read Source Code

This topic is closed to new replies.

Advertisement