Sign in to follow this  

Intermediate C++ knowledge, where to from here?

This topic is 3296 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

Hi! I've hit a bit of a roadblock (or rather a fork in the road) and I'm not sure what to do next. I'm a 2nd going on 3rd year CompSci student, but unfortunetely my knowledge is largely theoretical. I have an reasonable grasp of c++, i.e. pointers, classes, virtual functions/abstract classes, arrays and whatnot... But largely only in theory, i.e. haven't written many projects with my knowledge. I went through the first 10 modules at http://msdn.microsoft.com/en-ca/beginner/cc305129.aspx, and am planning on finishing the last 2 shortly. I'm a little confused as to where to go after that. Ultimately, I'd like to develop first person adventure/shooter games, (my dream game would be first person survival horror,) and would be very excited to develop mods for the source engine. My question is, is it feasible/a good idea to start working with the source engine? Or should I learn directx/opengl first? And whatever you answer, can you recommend a good book/set of tutorials to read/follow along? I was looking at the book list recommended by the "for beginners" section, and, frankly, a lot of them seem very outdated. I know that many of the principles haven't changed much over time, but it still seems like i'd be better off reading more recently published books... Thanks in advance

Share this post


Link to post
Share on other sites
I suggest you just start putting your theoretical knowledge to the test, and get your feet dirty. Make a bunch of small programs that put your skills to use, or build programs that make you learn new some new C++ functionality.

Finish these small things to completion. Even if you aren't 100% happy with them. That's a skill a lot of people don't have, and they go on to tinker with things until the end of time. If you did something wrong, just admit what you did wrong, and use your new knowledge going forward. Rewriting something because you've discovered a slightly better way is a never ending trap.

There is always a better way to do something, and there is always one more feature to add.

As for books. Read whatever you can get your hands on. Read programming books, graphics books, maybe books about color theory so your shader output doesn't look like programmer art.

Share this post


Link to post
Share on other sites
Quote:
Original post by graydon0
Thanks for the advice. What little programs should i make? If you can think of any games that would be reasonably fun that would be great :D
I would do something that manages a lot of data just to make sure all my pointer, class, array, etc.. knowledge was intact. Maybe a media collection database that allows sorting, adding, removing, etc... Because you'll readily have the data to input and check against.

As for games, I suggest checking out an engine before diving into OpenGL or DirectX. Irrlicht or OGRE. You can focus more on getting your game done, instead of fiddling around with DX or GL. This will let you focus on your program, and what it does, instead of trying to figure out a bunch of complicated technical things about talking to your graphics card through an API.

You may even want something like C4: http://www.terathon.com/c4engine/index.php

But I would solidify my programming skills first! Jumping in to game programming too soon is a big mistake, because you'll have trouble understanding all the advanced constructs you'll have to work with.

Share this post


Link to post
Share on other sites
Quote:
Original post by graydon0
thanks alot, will do. Do you think the Source engine would be too difficult for me to jump into? (after brushing up on my C++ skills)


Yes. There's more to programming than syntax.

But that's why we recommend little programs to develop those ancillary skills. [grin]

Share this post


Link to post
Share on other sites
again, I'm asking if it would be too difficult for me AFTER writing several small programs, and getting comfortable with c++.

Would it be too difficult for me before picking up a simpler engine (ie ogre) or directx/opengl?

Share this post


Link to post
Share on other sites
The source engine is pretty easy to use if you want to change small stuff. It is though an enormously complicated piece of software, and making any large-scale changes in it will most certainly challenge even a hardened veteran of programming. This really is the case any time you sit down to a huge code base, and it is even more so the case when you sit down to a huge game code base. The reason for this is because game programmers tend to be willing to sacrifice code readability a bit in exchange for efficiency, and lets just say that the source engine is quite efficient. High level changes, like giving characters new attributes or certain types of in-game effects are actually very easy in Source, but if you get into it's guts, it gets real complicated real quick.

In short, it really depends on what you want to do with it. Small changes = easy. Big changes = really hard.

Learning DirectX previous to the Source engine won't likely earn you anything with respect to better understanding the Source engine. Source uses DirectX, but most of the renderer calls are buried so deep in it, that unless you want to fundamentally change how it deals with graphics, you won't ever even see DirectX code or anything that interacts with it.

Realisticly though, if you haven't ever confronted a non-trivially sized code base before, you would be better served by just getting yourself a project that you can beat up on on your own. There is a lot to be said for learning how to structure a decently sized project. 99% of the projects you do in your classes can likely be dealt with in a few files [if your classes were anything like my classes], or at least fewer than a dozen files, and thus are the types of things that you can just jump straight into coding and hack your way through it with minimal formal planning. What you really need is a project that you can't take that approach to development on [unless I am mistaken, and you have confronted larger projects in the past], which is a project that will force you to design things before you start mashing away at the keyboard.

Unfortunately there isn't a known weakest pass/fail sort of project that meets this criteria, where the brute force style of programming fails, a more formal approach succeeds, and the project is easier than all other such projects. *Most* small-scale and simple games fall into this category though. I'd advise pick something that is minimally graphical, and something that is real-time. Use a graphical package to handle the graphics for you, since that is largely grunt work until you get into the more sophisticated stuff [might want to check out SDL], and concentrate on making something that actually responds to the player, and transitions states. My first such game project was a simplistic re-creation of 'Defender', an arcade classic. You might want to give it a try if you're looking for something you can't very easily just charge straight into, but only just barely so. If you are instead looking for a game that you can just straight finish, pick something easier. In my experience though, this really is the sort of thing that bridges the gap between what you learn in class, and what you need in reality. That depends on what you want out of a project though: Do you want to add to your skill set, or do you want to get *something* made.

Either way, good luck.

Share this post


Link to post
Share on other sites
I appreciate your answer alot! thanks, I think i'll tinker around with source for a few hours, just to take a peak so to speak.

After that I'll follow you're advice and give defenders clone a try!

Thanks for the clear explaination.

Share this post


Link to post
Share on other sites
Quote:
Original post by graydon0
again, I'm asking if it would be too difficult for me AFTER writing several small programs, and getting comfortable with c++.
In my opinion, jumping into modding with the source engine or a similar product would be an excellent way to continue when you feel you're comfortable enough with C++ to give it a try. If you find you're in too deep and need more experience you can always go back to writing simpler programs or study again, and modding is an excellent way to get some good results (and potentially practice at working in a team) without having to do all the groundwork yourself.

In the meantime, clones or small changes to simpler oldschool arcade games are an excellent way to practice your skills and turn that theory you've learned into real experience. Asteroids, tetris, defender, etc. are all excellent choices for this.

Share this post


Link to post
Share on other sites
Quote:
Original post by graydon0
again, I'm asking if it would be too difficult for me AFTER writing several small programs, and getting comfortable with c++.
From experience, it doesn't matter how much you know about C++ or any language, a game is always difficult to make, even simple ones. There is a lot of problem solving that goes on.

You learn a lot of things, like that input devices don't give the quality of feedback you might have always thought, that only the inner 80% of a screen is guaranteed to be visible, or that the mechanics or your game can't be 100% logical, and you might have to mask something or cheat a bit just to get something to work. And you come up with ways to deal with it.

The more you figure out C++ beforehand, the better you'll be able to deal with all these little problems that come up, and the less likely these things will be to ground your project to a halt.

Share this post


Link to post
Share on other sites
Considering your interest in games programming, I think it's time to wet your feet a little. Have an attempt at drawing a lot of things on a screen with SDL / OpenGL / DirectX. It doesn't have to be a game.

Make it well first. Then, make it faster.


That should teach you about advanced data structures and optimization techniques available, e.g. Scenegraph, quadtree, octree, BSP, culling, LOD, clipping, double buffering. Later on when you need to pick an engine, you should be able to understand which one will suit your need, and how you can utilize the engine better.

Modding with the Source engine is cool too, but that would limit your knowledge to that specific SDK/tool.

/rant:
Making games is a long and taxing journey. Creating new ideas and putting it on paper is easy. It's implementing the said idea in lines of codes that's repetitive and time-consuming. And nobody wants to review your whole code.

Don't give up too quickly, take small steps and have some breaks in-between.

Share this post


Link to post
Share on other sites
Thanks for the input everyone. I'm still a bit confused with where to go from here, but i think the general consensus is to work on some small arcade games.

What is a a good bet for graphics for said games?

Share this post


Link to post
Share on other sites

This topic is 3296 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