Jump to content


A few pointers please :)


11 replies to this topic

#1 adamlee123

    New Member

  • Members
  • Pip
  • 4 posts

Posted 30 May 2012 - 01:33 PM

Ok, so, I have recently started learning how to program in c++ (have the slightest little bit of knowledge in c# as well) and was just wonder what main topics i would need to learn before I could make my own simple text based RPG.

I have looked on google at different source codes for it but it all confuses me.

If someone could tell me what i would need to know that would be mega helpful :)

Thanks :)

#2 geon

    Senior Member

  • Members
  • PipPipPipPip
  • 939 posts

Posted 30 May 2012 - 09:55 PM

If you just want a text based game, don't use C++. It sacrifices flexibillity for speed, which you don't need. It also does not handle strings very well, which is annoying if you are going to process strings a lot.


#3 Reedbeta

    DevMaster Staff

  • Administrators
  • 5344 posts
  • LocationSanta Clara, CA

Posted 30 May 2012 - 10:06 PM

View Postgeon, on 30 May 2012 - 09:55 PM, said:

If you just want a text based game, don't use C++.

Agreed. C++ is also not the best language for a beginning programmer. Try Python instead. Here's a free online book to get you started: http://learnpythonthehardway.org/
reedbeta.com - developer blog, OpenGL demos, and other projects

#4 Vilem Otte

    Valued Member

  • Members
  • PipPipPipPip
  • 362 posts

Posted 31 May 2012 - 07:45 AM

On the other hand I disagree - I think C++ is as good as any other language for beginners (of course it needs to learn a little harder - but then you'll be grateful for learning the language, that sacrifaces flexibility for speed - meaning as soon as you start creating application that is performance heavy) ... maybe pure C is even better for start (it really contains just very little stuff - and is so damn powerful - especially for Operating systems development :D ).

For example, I started on standard C - even without objects :)

And as for strings and C++ ... what about boost? :ph34r:
My blog about game development (and not just game development) - http://gameprogramme...y.blogspot.com/

If you don't know how to speed up application, go "roarrrrrr!", hit the compiler with the club and use -O3 :D

#5 geon

    Senior Member

  • Members
  • PipPipPipPip
  • 939 posts

Posted 31 May 2012 - 08:14 AM

View PostVilem Otte, on 31 May 2012 - 07:45 AM, said:

And as for strings and C++ ... what about boost? :ph34r:

Exactly as you wrote; it's for ninjas.

Even just the basic stuff like getting SDL to work with in C++ is a hassle, and close to impossible for a beginner. I recently started a new project in C++ after a few years away from it, and boy, is it anal. You have to manually make sure headers won't redefine classes/functions if included twice, without a standardized naming convention for the macros to handle it. Just getting the code to compile was a minor challenge.

#6 adamlee123

    New Member

  • Members
  • Pip
  • 4 posts

Posted 31 May 2012 - 01:03 PM

I know how hard c++ is to learn as a complete beginner, I tried a few years back and gave up but this time I want to keep testing my self, set challenges for myself.

#7 TheNut

    Senior Member

  • Moderators
  • 1718 posts
  • LocationCyberspace

Posted 31 May 2012 - 04:33 PM

Exactly how much do you know? Are we talking about adding integers or are you fluent with class inheritance and polymorphism? I would put game dev on hold until you can comfortably work with a language. You should be comfortable with basic C/C++ such as working with loops, arrays, memory allocation, logical operators, pointers and references, etc. Moving forward you should then (optionally) familiarize yourself with object oriented programming such as working with classes, inheritance, polymorphism, abstraction, interfaces, etc. Write lots of test applications and use the debugger to see how things are constructed and destructed. Once you can talk to the machine, then you can start learning algorithms, libraries, and game development.

If you have some experience in C#, I would recommend sticking with that language for a little bit longer. The .NET BCL (base class library) is superior to anything else and it will help you learn faster. Getting familiar with the BCL will also give you some ideas how to construct your own classes in C/C++ when (if) you transfer over.
http://www.nutty.ca - Being a nut has its advantages.

#8 alphadog

    DevMaster Staff

  • Moderators
  • 1716 posts

Posted 01 June 2012 - 01:36 PM

Learn C# or Python. Not only do they have a large community, they are common enough in game dev. (As opposed to, say, Java or Ruby, which are generally equals of the two I mentioned, but are not as omnipresent in game development circles.)

First, learn all the basics (data structures, basic algorithms for sorting/searching/etc, basic IO, etc.) from complete online tutorials or books.

Then, learn how to build a basic game. Learn common game algos (ex: KD-trees) and patterns/architecture (ex: the game loop) while building a basic game.

At that point, you should have enough knowledge to be able to start self-guiding.
Hyperbole is, like, the absolute best, most wonderful thing ever! However, you'd be an idiot to not think dogmatism is always bad.

#9 adamlee123

    New Member

  • Members
  • Pip
  • 4 posts

Posted 06 June 2012 - 10:35 AM

im not sure about inheritance or polymorphism yet, but i'm going to have a look at them soon, I have an understanding of for/while/if loops etc. and a slight understanding of arrays. I also understand classes and a little bit about pointers, not alot though, and thats about all i know in c++ at the moment.

What steps would be the most logical to take at the moment to progress more in C++?

#10 TheNut

    Senior Member

  • Moderators
  • 1718 posts
  • LocationCyberspace

Posted 07 June 2012 - 01:29 AM

At this point I would recommend a good book. Not just to learn the rest of what you're missing, but to learn it properly. The last thing you want is to find some source code online that uses bad programming practices. I can't recommend any books for you because my stuff is from the 90s, which would probably do more harm than good for you :D Your best bet is to check out some of the books on Amazon.com and see if there's something there that has good reviews and fits your budget.
http://www.nutty.ca - Being a nut has its advantages.

#11 adamlee123

    New Member

  • Members
  • Pip
  • 4 posts

Posted 07 June 2012 - 09:47 AM

Thanks, i'm thinking about getting this book. Would this be helpful at all?

#12 TheNut

    Senior Member

  • Moderators
  • 1718 posts
  • LocationCyberspace

Posted 07 June 2012 - 10:54 AM

The reviews are fairly positive, although the "game programming" part is more on the logic side, not graphical or some such. Still, if I were learning C++ I'd rather be writing text based blackjack games than doing the standard employees and database stuff, which I actually did when I started ;p. I took at look at its table of contents and a sample page, it looks decent. Not sure if anyone here might have more to add with this book.
http://www.nutty.ca - Being a nut has its advantages.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users