Jump to content

Keeping the flame alive while learning C++

- - - - -

  • Please log in to reply
9 replies to this topic

#1
Twai

Twai

    Newbie

  • Members
  • Pip
  • 2 posts
I'm probably not the first to ask a question like this, but I couldn't find any good sources for this, and decided that the best thing to do is to ask experienced programmers. I went searching for a programming forum, and this one was appealing, so I decided to try my luck here!

I've been a gamer since I was a kid, but the thing that has always fascinated me most about games is not actually playing, but seeing how people are able to create those amazing things through code. Naturally, one of my biggest dreams has been to be able to make those games myself. I'm much of a dreamer, and I tend to spend a lot of time thinking about stuff before doing it, so this dream of game programming has just been floating by my side through life. When I was about 14 years old, I decided that it was time to make that dream come true, and as flash seemed to be easy to learn I picked up flash/Action Script. I learned some stuff, made some rather messy games and lost interest in the language as I found it very hard to make things work. (I realize now that I probably was a bit young to understand how the language worked.)

Although my game programming career didn't really work out, it had opened the door too learning through Internet for me, and I learned html, css and some php. It was fun, but it wasn't game programming.

About a year ago, at the age of 17, my mind was just screaming for game programming. I decided to do it right straight away, thus learning a language that can help me in a professional life as a programmer. I pretty much looked for the most advanced thing I could find, and decided on C++.
I spent several months of intense learning through online courses (mainly on learncpp.com) but it was all theory and I wasn't able to use my coding for anything. I slowly stopped learning again, and the programming became a dream again instead. Now here I am, at the age of 18, planning to study some form of game programming at college in a year. However, I can't wait until then, and this is where my question comes in.

(tl;dr, start reading here)
Assuming that I've learned a lot of basics in C++, including variables, headers, structs, classes, operator overloading (although I still find that tricky at times), pointers & loops. (Looking at learncpp.com, I think I did chapter 1 through 9)
What can I possibly do to keep the flame alive? I want to be programming games, I realize that I need to learn a lot more before doing well, but isn't there anything I can do along the way to actually get fruit out of all the work?

It was several months since I last launched visual c++, I will probably need to practice more even with the above mentioned things, but I want to get there this time, and although the game programming is a huge motivation, I need to have something along the way.

Thanks in advance for reading my wall of text and responding!

#2
Flying Dutchman

Flying Dutchman

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 889 posts
  • Location:::1
Start making games! :D You can start with SDL or SFML. Start by making really simple games, like Connect 4 or Tetris or Pacman... with gfx to get the basics. Then you can start by upgrading them or moving to a bigger and more complex one. Game programming wiki might offer some ideas aswell.
A conclusion is where you got tired of thinking.
#define class struct    // All is public.

#3
TeenChristian

TeenChristian

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 639 posts
Well, it sounds to me like you know enough C++ to begin programming some games :) I also learn from learncpp.com and right now I'm about half way through chapter five. I have already started programming games. Very simple games, but nevertheless, games. I'm using Visual C++ 2008 Express Edition with The Dark GDK (Game Development Kit) So far what I believe to be my most successful game is my basic Dog Whistle. Anyhow, I would use some type of game programming library (using C++ of course) and then just experiment with it. You'll learn things along the way that will make you a better game programmer. I hope I was able to help!

By the way, welcome to CodeCall! Nice to have you here ^^
My Personal Blog l Learning C++ l I'll be famous soon enough.

#4
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
  • Location:Upstate, South Carolina
  • Programming Language:C, C++, PL/SQL, Delphi/Object Pascal, Pascal, Transact-SQL, Others
  • Learning:Java, C#, PHP, JavaScript, Lisp, Fortran, Haskell, Others
Learning OpenGL or SDL is another option.
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#5
Alexander

Alexander

    It's Science!

  • Moderators
  • 4,118 posts
  • Location:Vancouver, Eh! Cleverness: 200
SDL is quite lightweight and easy to implement. +1 for that. :)
You are most welcome to put games (of any magnitude) in our "Member Projects" forum, so others can test and try it out in general, it's always rewarding to show your ideas first hand to people. Keep up the work!
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.

#6
mrlemke

mrlemke

    Learning Programmer

  • Members
  • PipPipPip
  • 68 posts
  • Location:Redding, CA
I should warn you first write now, from your post it sounds like you don't have a different kind of "flame," the programming one. It sounds like you just want to be involved in game development. Now, I'm not making this post to turn you away, but programming games is a rather complex task once you move past making simple games. If you don't have the programmer's flame, you will probably want to quit and not finish your project.

Therefore, I suggest you look up game design, texturing, modeling, or something else before you get too involved. You might find that you prefer these better than programming. Don't get me wrong, I'm not trying to turn you away from programming. I'm just merely trying to show you other options, because it didn't sound like you had a programmer's spirit.

#7
Twai

Twai

    Newbie

  • Members
  • Pip
  • 2 posts
Wow, a bunch of replies that fast, and very helpful ones too! I had the impression that I would need to understand every single thing there's to know before even trying to make a simple game, but from these replies it seems like I could already have a lot of fun with what I know. I'm going to give SDL a try, and I'll be sure to report back after trying some things out. :D

@daniel-lemke: The part that I find the most boring with a game is honestly the designing. I'm aware that programming gets very complex in bigger projects, but it's incredibly rewarding once you make something that turns out like you want it. As mentioned before, I've made some small games with AS, and I've also made some small programs using C during a course at school. Once I get into making a program I'm having a blast. I do believe that I have the programmer's spirit, I've never gotten bored during the project, what's gotten me bored lately with C++ is mainly that I didn't know how to use what I learned, but now that I've gotten a pointer into the right direction it should only be getting better!

Thanks once again for the replies and warm welcome. :)

#8
TeenChristian

TeenChristian

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 639 posts
Any time Twai ^^ let us know how you come along with SDL I would love to see some of your work once your et started!
My Personal Blog l Learning C++ l I'll be famous soon enough.

#9
agnl666

agnl666

    Programmer

  • Members
  • PipPipPipPip
  • 173 posts
  • Programming Language:C, Java, C++
  • Learning:Python, Assembly
try solving competition problems. i find that every time i do i competition problem i find hard i get a lot better at it and i learn a lot. it is also rewarding, though can be frustrating and very sleep depriving. in the past week i may have gotten to sleep once before 1 in the mourning and got up at 7:20 every mourning. all because programming is so addictive.

#10
Zer033

Zer033

    Learning Programmer

  • Members
  • PipPipPip
  • 79 posts
My first game was in SDL and DirectX, I made it in both. SDL is cross platform so that's why I did that, but it was a learning experience on both. I could remake it now with much better code as well I think. I'll post it up here if I can find it on my computer, if it's still on here.

Anyway, I would echo some of the other posts here about at least dabbling in SDL to see how game libraries and APIs are made and utilized. From there I would say try out some modding tools or a game engine. I would personally recommend Unity since it allows you to see results quick from some simple lines of code (C#, Java, or Boo) and also allows for some truly impressive games to be made.

You can also create games in command line that employ a lot of the same game concepts of more complicated games as simple practice. I posted the code for a small game I made in command line in this thread a long time ago: HERE

Anyway, it sounds like you might be more interested in gameplay programming than actual down and dirty technical data structures and bits and bytes programming. It took me a long time to figure out that that is the way I am, but by sticking with the gameplay programming I have little by little gotten better to where I can program the more complex stuff. I find looking at my old code for my SDL game pretty funny because I know I can do so much better/more complicated things now. You'll get there you just have to stick with it.

I have to go now, but I'll post up my old SDL game when I get a chance and I'll post up the code that you can take a look at as well. I think it might help you out a bit, maybe while you're making your own game if you stumble on any problems.

Edit-

I found it, but I couldn't find the latest version; I actually found the first versions I did without menus even. The latest version had power-ups, actual level progress visual changes, and a shrink ray thing that made the player smaller if they went past a certain point. You can download it and the source code for both SDL and DirectX here:

MEGAUPLOAD - The leading online storage and file delivery service

Hope it helps.

Edited by Zer033, 09 October 2010 - 11:07 PM.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users