Diving into C++

Started by
11 comments, last by GigaGaming 18 years, 10 months ago
Hello, i'm a person who would like to join the creation of games, and would like to know: Would it be a smart idea for an experienced scripter in webdesigning(i've been doing this for 3 years and i know HTML,XML,XHTML,PHP,&#106avascript,CSS, and MySQL), to jump into programming? I'm designing a gaming site, called GigaGaming(with my artistic friend), and i really wanted to jump in, and create a 2d rpg, to help advertise the site. After reading your 'For Beginners' section, i feel discouraged. I do have a C++ Compiler, and i feel ready for it. I would just like to know if it would be a clean transition, and if anybody could assist me in this process. Thank you for reading this topic.
Advertisement
If you're farily good and understand PHP, and &#106avascript (languages with variables, and functions) you will have no problem picking up C++. You should start with some basic console programs, then learn a little win32 api, and once you're compertable with that jump to OpenGL with SDL or DirectX.

If you work hard and start with the basics it shouldn't take you long to learn and understand. (Although a 2d RPG is a big starter project)

And yes gamedev will assist you along the way, any question you have about programming can probably be answered on these forums. (or already has been)

Hope that helps ya out a bit?

ArchG
Thanks, do you have any good links to some tutorials out there on the web? I feel like learning now.
EDIT: I take way too long to write these posts, decent C++ tutorial
SDL Documentation
Opengl programming guide
Opengl Reference Manual
Thanks googly and Arch. I'll get going on this now. And i'm ready to spend months and months on a game.
Quote:Original post by GigaGaming
Hello, i'm a person who would like to join the creation of games, and would like to know:

Would it be a smart idea for an experienced scripter in webdesigning(i've been doing this for 3 years and i know HTML,XML,XHTML,PHP,&#106avascript,CSS, and MySQL), to jump into programming?

I'm designing a gaming site, called GigaGaming(with my artistic friend), and i really wanted to jump in, and create a 2d rpg, to help advertise the site. After reading your 'For Beginners' section, i feel discouraged.

I do have a C++ Compiler, and i feel ready for it. I would just like to know if it would be a clean transition, and if anybody could assist me in this process.

Thank you for reading this topic.


I hope the Beginners forum isn't *too* discouraging. In any case, if you're at home with PHP, C++ won't be too difficult. (Or rather, understanding/learning it won't be too difficult. Actually making it do what you want it to is a bit trickier)

The main question is whether you're willing to put enough work into it. It does take a while to get good enough at programming to make anything like a game, and then it takes even longer to actuall make a game.
If you don't mind those terms, go right ahead. :)

First, a bit of practical advice. This forum is a brilliant source of information. There's practically nothing that can't be answered here. But on the other hand, please try to restrain yourself. Use Google before asking your questions, don't post them more than once, and basically look at it as a safety net when you need information you can't find anywhere else. People tend to get less helpful when you abuse their willingness to help. ;)
(Hope you don't take this personally. Just mentioning it because previously a few people have tried to ask everything here, and act terribly insulted when people suggest they could try Google first)

Second, my suggestion for getting started:

1: Forget about graphics.
2: Buy a good book on C++ (yeah, you can find online tutorials as well, but personally I'd recommend at least one book anyway, simply because it's more comprehensive, and you can be reasonably sure it covers all the basics. You can (and should) supplement it with online tutorials.
3: Read the book, and make sure to do the exercises, even if you believe you understand the chapter. (Alternatively, you might just skim the entire book without doing any exercises, and then go back and try to use all the stuff you've learned, using the book to look up and re-read the specifics)

Up until now, you'll have worked with pure console-based C++. No fancy graphics or windows or mouse cursors, just a command line program. This might seem discouraging, but it is pretty much the only way to learn C++.

4: Stick with text-based programs, but try to write some of your own, rather than just copying from the book.
5: At some point you'll be comfortable enough with C++ that you're ready to start looking at 3rd party libraries or API's. A good starting point would be learning to use the Win32 API, because it lets you make simple graphics very very easily, and it's neccesary to create a window for your program. At this point, I'd suggest making a Tetris clone (because it's a simple game, it doesn't have to be fast, and the Win32/GDI API is perfect for making coloured rectangles moving slowly across the screen [wink])

While doing all this keep en eye out for interesting threads here, or articles/tutorials on the net, about anything game-programming related. You won't be able to make much sense of any of it, but I find that it's a good way to prepare for jumping into more advanced topics, just reading what you can find, even if you can't use it, and even if you don't understand all of it.

6: Begin looking at DirectX, OpenGL or SDL to do more advanced/more efficient graphics, and... well, jump into it.

At some point you also need to look into learning about algorithms and data structures, the two magic words that allow you to solve the problems you encounter efficiently, and making a game that actually runs more than 0.1 FPS.

Yeah, this sounds like quite a list, and it will take a while. It's not impossible though, and in a year from now, you might have a small rpg running. (Depending on how fast you learn, of course. Could be more, could be less)
okay. Thanks. One more question, are any of you guys willing to tutor a complete C++ newb? Like, giving me a demonstration of code, and telling me to work something out with it.
PHP is one language that can spoil a programmer though, especially if it's their first one.

I know you could learn C++, however remember that a lower level language like C++ may have similar syntax to PHP, but it's much different. PHP has stuff like implicit variable declarations, automatic datatype conversion, lots of built-in convenience libraries, etc. That kind of stuff can make using C++ irritating at first, but once you get used to it, it rocks.

Good luck!
Here is a good source of books to read and the order you should read them, from a complete newb on: Game Programmer Guide
what about a 2D &#106avascript RPG?

This topic is closed to new replies.

Advertisement