Jump to content

  • Log In with Google      Sign In   
  • Create Account


Finished book on C++ where do I go from here


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
10 replies to this topic

#1 Dugusadams   Members   -  Reputation: 105

Like
0Likes
Like

Posted 11 December 2012 - 06:35 PM

I just finished Programming: Principles and Practice Using C++ but I have no idea how to start game development. Can anyone recommend a book that teaches game programming for people who already know a little c++

Sponsor:

#2 L. Spiro   Crossbones+   -  Reputation: 11881

Like
0Likes
Like

Posted 11 December 2012 - 07:01 PM

You aren’t ready to learn graphics coding, game architecture, sound programming, etc.
From the sounds of it, you have exactly the experience of reading one book.

Have you actually coded anything?
Can you even make a window in Windows®?

Where do you go from here? To your nearest compiler.
What do you do next? Practice what you have studied. You haven’t even gotten a good feel for the language yet—trying to apply too many new concepts on top of that is just going to burn you out. Don’t be in such a hurry. Everyone learns one step at a time.


L. Spiro

Edited by L. Spiro, 13 December 2012 - 08:11 AM.

It is amazing how often people try to be unique, and yet they are always trying to make others be like them. - L. Spiro 2011
I spent most of my life learning the courage it takes to go out and get what I want. Now that I have it, I am not sure exactly what it is that I want. - L. Spiro 2013
I went to my local Subway once to find some guy yelling at the staff. When someone finally came to take my order and asked, “May I help you?”, I replied, “Yeah, I’ll have one asshole to go.”
L. Spiro Engine: http://lspiroengine.com
L. Spiro Engine Forums: http://lspiroengine.com/forums

#3 jbadams   Senior Staff   -  Reputation: 16978

Like
7Likes
Like

Posted 11 December 2012 - 07:25 PM

I posted some suggested reading an exercises for improving your C++ (and just general programming) knowledge here.

I'd agree with L. Spiro though: if you've really just read through the book you need to do some actual programming -- there's absolutely no substitute for real experience. Work through any exercises provided, and experiment with writing small programs, intentionally causing errors, etc. to learn as much as possible, and if you feel like you need to perhaps look at additional books.


Once you feel you're ready to try tackling a game, you'll want to choose and learn an API that provides windowing, graphics, input handling, etc. One such popular choice is SDL, using Lazy Foo's tutorials to get started, but SFML or Allegro are also very popular and capable choices.

Set yourself a goal of some simple game to make -- I normally suggest "Pong" as a first game -- and set about breaking it down into smaller tasks you can approach one at a time. For the example of Pong, a starting set of goals might be:
  • Learn to create a window.
  • Learn to draw a rectangle (which you will eventually use as the player's paddle).
  • Learn to move your rectangle in response to player input...
  • ...and so on and so forth...

//EDIT: It's absolutely worth spending the time to try some simple text-based games before moving on to graphics as others have suggested. This is a relevant goal (you get to make some playable games) but can really help to solidify your knowledge before moving on to more complex topics. Only you can decide when you want to move on however, and you can always come back to the basics if you find things too difficult.


Does that help? Posted Image

Edited by jbadams, 11 December 2012 - 07:30 PM.


#4 Servant of the Lord   Crossbones+   -  Reputation: 16679

Like
5Likes
Like

Posted 11 December 2012 - 07:26 PM

I would start not with another book, but with online tutorials and articles, and try and make a text based game.

Don't search for "text based game tutorial". You'll find plenty, but right now what you probably ought to do is apply the knowledge you already know, without being hand-held by a tutorial. See what you can do on your own.

Think it through and try. Make it a really small scoped game first, with only several features, then build off of there.

Suggested phases:
  • Basic world
    • Display room description (loaded from file).
  • World movement
    • Connect multiple rooms together
    • Allow movement from room to room ("North" goes north, etc...)
  • World interaction
    • Add locked doors and keys
    • Add NPCs that you can talk with
    • Add dialog choices with NPCs in response to their text
  • Content creation
    • Create rooms and doors and keys and NPCs and put it all together in a tiny game.

Instead of searching for "text game tutorial", try to see what you can do on your own. When you encounter a problem, search for specific tutorials and articles, not general ones. Search for "How to load text files", not "How to read text rpg rooms from files" and not "How to make text games". Break the work down into chunks and pieces, and try to solve the problems on your own, only searching for solutions to individual chunks and pieces when you are stuck.

It's perfectly fine to abbreviate my username to 'Servant' rather than copy+pasting it all the time.

[Fly with me on Twitter] [Google+] [My broken website]

All glory be to the Man at the right hand... On David's throne the King will reign, and the Government will rest upon His shoulders. All the earth will see the salvation of God.                                                                                                                                                       [Need free cloud storage? I personally like DropBox]

Of Stranger Flames - [indie turn-based rpg set in a para-historical French colony] | Indie RPG development journal


#5 Aldacron   GDNet+   -  Reputation: 3035

Like
2Likes
Like

Posted 11 December 2012 - 07:26 PM

I want to reinforce L. Spiro's recommendation to practice. Practice, practice, practice. A good way to do that at this stage is to make several little console-based apps and games using standard input and output (cin & cout). Examples: a number guessing game, an app that performs a number of different conversions (km<->miles, lbs<->kg, etc...), blackjack using numbers to represent the cards, a small text-based adventure game where the player is offered multiple choices for each step of the game, another adventure game where the player can directly input commands to move around, and so on. Each little app you make will help you become more familiar and comfortable with the language and the process. And as your apps get progressively more complex you'll learn more along the way. Eventually, you'll be ready to look into moving beyond the console and into the world of 2D games. Doing otherwise will likely result in a much longer learning process accompanied by a good deal of frustration, disappointment, and unfinished projects.

#6 Shaquil   Members   -  Reputation: 811

Like
0Likes
Like

Posted 11 December 2012 - 07:38 PM

I always found text adventures super boring to implement. If you know how to use fstream, maybe it'd make more sense. But otherwise, here are some more interesting ideas:

Hangman
Tic tac toe
a calculator - you can decide how to implement it and what 'extra' features you want to add. I remember implementing factorial and exponents. That was moderately challenging as a beginner because I had never had to think about implementing even something so simple before. But it helps you think more like a programmer.

If you wanna practice memory management and OOP, make a "database" program, where the user specifies the number of entries in the database, and fills out info. The entries can be an array of objects, and the user fills out info that's put into their member variables. Again, unless you use fstream or i/o redirection in unix, this'll be a little odd, but why not? It's pretty interesting.

#7 Dugusadams   Members   -  Reputation: 105

Like
1Likes
Like

Posted 11 December 2012 - 11:09 PM

Can anyone recommend programming practice books? Is there even one? Preferably with graded questions.

#8 Riphath   Members   -  Reputation: 151

Like
0Likes
Like

Posted 12 December 2012 - 12:04 AM

I'm sure that there are plenty of practice books out there, but I think a lot of people would agree that you don't really need one. Make up some challenges for yourself. Learn how to break a problem down into its individual parts and figure out how to solve it and put it in code. If you are really at a lack for ideas, whenever I need to sharpen my skills or refresh myself on a language I haven't used in a while, I google search for "programming puzzles" and or something similar. Things like the classic "print the numbers 1 to 100, except for the multiples of 3 print foo, multiples of 5 print bar, multiples of both print foobar". Usually there are answers somewhere on the net, so you know if you have a bug and got it wrong, and you can also check to see if the answer code is faster or better written than yours, so that you know where you can improve. Other than that, just try to make some simple games like Pong, Breakout, or Tetris, or simple text based games. I hope that helps!

#9 jbadams   Senior Staff   -  Reputation: 16978

Like
0Likes
Like

Posted 12 December 2012 - 01:07 AM

I don't know of any books that just offer exercises, but try some exercises from Project Euler and Code Kata. Most "learn to program" type books also offer some exercises that go with the material as it is taught. The lessons at LearnCpp.com are quite good and include quiz questions with solutions, so you might also try those.

Otherwise you can do as suggested and just set progressively more difficult goals to approach. Posted Image

#10 Poigahn   Crossbones+   -  Reputation: 516

Like
0Likes
Like

Posted 12 December 2012 - 08:12 AM

Alot of very good suggestions on where to go next or what to do next.
I would like to just add 1 thing to all of the above - As you start coding, also include some game mechanics of simple Table Top games that you all ready know.
For example - Roling dice - 2 dice = 2 sets of random numbers - Programming that and looking at the results ( Individual results as well as combined results ) re-inforces your learing experience if you can apply these newly learned skills to something that interest you.
Doing a text based set of cards - Moving around a virtual Game board combines rolling dice ( Random Numbers ) as well as contrlling location say on a 40 square game board and getting back to the beginning adds data elements.
At least for learning while doing what I wanted greatly helped me. Build from there everytime you turn on the computer, set a new simple goal, acheive it and build more.

Your Brain contains the Best Program Ever Written : Manage Your Data Wisely !!


#11 black_darkness   Members   -  Reputation: 280

Like
0Likes
Like

Posted 13 December 2012 - 03:08 PM

I read this book also. I learned a-lot from it. But I never really needed another book. I suggest reading on the internet. There is only so much a book can teach you and if you get another one you will probably be recovering a-lot of bases and get bored. I think Bjarne Stroustrup wrote a primer also but I think that is for reference only. Here are some c++ practice problems you could use. http://www.cprogramming.com/challenge.html




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS