Frustrated, learning to program.

Started by
7 comments, last by M2tM 15 years, 3 months ago
I have been studying all the features of C++, but I don't know how to put them altogether. Books teach me what features are, not when and where to use it. I'm just pretty lost. I think I'm getting a good grasp of the language, I can read most code, but I just find it impossible to get started on my own engine. Any advice for a frustrated beginner? Should I volunteer for other projects instead of working on my own?
Advertisement
Are you trying to make a game engine? Or a game? Do you know a graphics API?
Game engine. No, don't know any graphics API yet. I'm having a hard time even writing a text-based game.
Quote:Original post by Isodream
Any advice for a frustrated beginner? Should I volunteer for other projects instead of working on my own?
I don't mean to sound harsh, but tt's unlikely that you'd get taken on, or if you did you'd probably be out of your depth.

I'd recommend starting out small, only doing text based stuff for a while. If you try to jump into doing graphical stuff you'll just get extremely lost. Try making a single player text RPG of some sort as a starting point. If you're having any specific problems, post your code here and say what you expect to happen, what actually happens, and what you've tried to solve the problem yourself. That'll give you the best chance of someone being able to help you with your problem.
Like Steve said, write games, not engines.

Try to solve a specific problems, and over time you will see that you keep writing or copying the same pieces of code. You should make these pieces of code general and formalise them into a useful class set if you're interested in engine code.


Quote:
Books teach me what features are, not when and where to use it.

Knowing when, where, and how to use a feature is part of programming. Knowing if a piece of functionality requires a function, a class, a template, or whatever, is just something that will come to you with time. All you can do is try it the way that seems the most sensible, then evaulate if it works.
Cries after some game tutorials. Have a look at (linking over to external resources, make sure to also check GDNet's search function):
Quote:
I have been studying all the features of C++, but I don't know how to put them altogether. Books teach me what features are, not when and where to use it.

I'm just pretty lost. I think I'm getting a good grasp of the language, I can read most code, but I just find it impossible to get started on my own engine.

Any advice for a frustrated beginner? Should I volunteer for other projects instead of working on my own?

Perhaps you're approaching learning in the wrong way, now. Programming is a means to an end -- the creation of some kind of program. People in your situation generally got there because they were focused on memorizing or otherwise acquainting themselves with aspects of the language in isolation -- perhaps by reading a bunch of C++ texts cover-to-cover, or something. This is great to an extent, but after a point you have to stop worrying about this (the means) and focus on the end (programs).

It's like dancing. You can go to YouTube and look up instructional videos for salsa patterns all you want. Maybe you can even pick up the basic steps that way. But no matter how much you watch a video of two people doing a clever sequence of turns and cross body leads, until you actually get out there on the floor with a pretty girl and try it, and fail miserably the first few times, you're never going to reach the point where you can do it without thinking.

So think of little programs you can write. They don't have to be complex, or even useful. Number guessing games, hangman, CD or book cataloging programs... whatever. Try to write them. When you get stuck, when you can't figure out how you should do some aspect of the program, leaf through your books to see if there is a similar example, or ask here for help on the specific question. In time, it will become second nature to you.

The smaller these projects are, the better. The satisfaction of finishing a project will go a long way towards bolstering your confidence and ameliorating your frustration. If you pick projects that are too big (such as most projects other people would be looking for help on), you'll remain frustrated longer.
This may come a bit pricey, and I'm sure there are other texts that might teach the material better, but I've found my current C++ textbook to be immensely helpful in terms of exercises to practice with. Each chapter ends with a good 20-30 exercises that have comprehensive coverage of everything you've read up until that point.

If you're looking for a good practice tool and are having trouble coming up with your own ideas, this book's well worth the money. (IMHO, YMMV)

Hazard Pay :: FPS/RTS in SharpDX (gathering dust, retained for... historical purposes)
DeviantArt :: Because right-brain needs love too (also pretty neglected these days)

As others have said. It is impossible for you to get started on your own game engine because the problem is too big for your experience. It would definitely serve you better to start on some easier to define project. I mean, what does "get started on your engine" even mean, I don't think you even know. This isn't a criticism of your character, I'm just pointing out that it isn't really possible to get started building something you can't even define. I'm also not saying engines are not possible to define, just that I am not convinced that you have a clear idea of your intention in writing an engine.

What are the requirements? What is it supposed to do? Those are questions you need to be able to answer in pretty fine detail, you shouldn't know every aspect of those details (waterfall development model which has been proven to be ineffective for projects of any scope.) You should however be able to map out a general diagram of the system. If you cannot do that, do not approach the project until you can.

And again, as others have said, a better place to begin would be to apply your knowledge to something tangible. I typically suggest making a text based dungeon crawler type map system, then move on to add items, then move on to add monsters and if you want to get super fancy and you feel the itch for a real challenge try adding multiplayer support with networking.

There's a lot you can do with your current knowledge, but all that potential means nothing if you never get started. Probably one of the most important traits in any creative field is the ability to just get down and dirty and get yourself embroiled in the medium. An artist wouldn't stare at the clay and read tons of books about it, sure that may be part of the process... But at some point they've got to begin shaping it. Similar example to the dancing above. Re-stated for emphasis.

It's also true with math, if you sit in class and watch the professor explaining all the concepts you may be able to follow along because solved examples read a lot easier than the actual process it takes to get to the solved state. But it takes a lot of practice and actually getting in there and solving things for yourself before anything -really- makes sense.

Similar to the above two examples, you may read a ton of programming books and you may believe that you've got a good handle on things. Unfortunately while you may be good at reading contrived learning examples chances are you are not so hot with actually composing a program (as it seems you have found out by saying "Books teach me what features are, not when and where to use it[sic].") You only really learn how to use what you learn by doing.
_______________________"You're using a screwdriver to nail some glue to a ming vase. " -ToohrVyk

This topic is closed to new replies.

Advertisement