Sign in to follow this  

Diving into C++

This topic is 4556 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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,javascript,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.

Share this post


Link to post
Share on other sites
If you're farily good and understand PHP, and javascript (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

Share this post


Link to post
Share on other sites
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,javascript,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)

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
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!

Share this post


Link to post
Share on other sites
Quote:
Original post by GigaGaming
eedok, i think you're thinking of Java, not javascript. javascript is used in interactive web design, not gaming.


Well, you could make a RPG running on javascript in a browser, so that might be what he meant. Don't see much point though. ;)

As someone said, PHP lets you ignore a lot of things that you have to deal with in C++, but the basic process of programming is the same (you should already know what functions or variables are, for example), so you should be able to pick it up quickly.

As for tutoring, I doubt anyone has the time to spare for that, but when you get stuck or need something explained, you can always just ask here, and I'm sure someone will be happy to explain what's going on, with or without code.
I usually like helping people out when I can, so feel free to send me a PM or email occasionally too. My email address is listed in my profile.

But still, you should try to learn on your own, and just ask for help when you get stuck, rather than trying to get others to dictate what you should do next, or plan everything out for you, because that would quickly become a full-time job for whoever is helping you. [wink]

Share this post


Link to post
Share on other sites
hah, good point. Well, thanks for asking all of my questions guys. I'm surprised how fast you posted. On other boards it takes DAYS to get a response. lol.

(and i totally dislike browser based games. They're so boring.)

Share this post


Link to post
Share on other sites

This topic is 4556 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this