Well I finally broke down and listened to others. They thought my problems with C++ was the language and insisted that I learn other languages to solve the problem. I asked for advice for the normal list of languages and started with Python. I've been surprised at how easy it was to pick up Python thus far (reading and doing Learning Python the Hard Way site), but upon trying to do my own code I've run into the same problem as C++. I open the editor and just draw a blank. I was trying to do Python exercise 36 which says to make a game like the one here http://learnpythonthehardway.org/book/ex35.html and just lock up.
Just seeking advice on what other programmers think the problem could be. It has become plainly obvious that it isn't the language like others thought. Is it me or something else?
Maybe you struggle with what I struggle with: Creating something new. I am able to code contest problems, but ask me to make a new app/game and I probably will spend days thinking of something to make, and then give up. For this specific problem, I would suggest playing a game like zork, or other text based games and either copy or get ideas form them.
Yeah, that sounds about right. You need a goal or something...can't really help you there. Script Coder has a nice idea though: just try to copy/steal ideas from somewhere else...hell, that's what most games do now anyway.
I always have a goal as a beginner, theres so much that i dont know how it works, like sockets for example, so i got that, im interested in data at the moment, so i been trying to make pretty patterns with numbers and then i discovered mandlebrot shapes and had fun with that.
Now i got sockets down i might build an extra simple packet sniffer, lol but rather than decrypting the info and exploiting it im just gonna make pretty patterns.
psychologists say that unlike other animals the human remains in its juvenile mental state its whole life, lambs learn fast and bounce around and have fun but grow into boring sheep who just follow the status quo it learns fastest it its juvenile state, and theres lots of reasons kids learn fast too, one is the way they use their imagination to experiment and get their goals shift as fast as their concentration span, Basicaly so long as they are having fun they are interested, whatever you do specter, if its practice it shoud be fun.
So why so serious? i have goal, build a packet sniffer i wont be able to do it for a while i dont even know networking, so i have sub goals, my main goal is to build awsome shooter that can wait though.
Well what I mean is that I am doing Exercise 36 from here ( http://learnpythonthehardway.org/book/ ) which says to write a game similar to the one in Exercise 35 (I'll paste 35's code to save clicking). Though, when I started my Exercise 36 I have just from sys import exit and def, then just go blank. Don't know how to classify that. I have ideas of my own, but in C++ I usually end up with a few includes before going blank.
from sys import exit
print "This room is full of gold. How much do you take?"
next = raw_input("> ")
if"0" in next or "1" in next:
how_much = int(next)
dead("Man, learn to type a number.")
if how_much < 50:
print "Nice, you're not greedy, you win!"
dead("You greedy bastard!")
print "There is a bear here."
print "The bear has a bunch of honey."
print "The fat bear is in front of another door."
print "How are you going to move the bear?"
bear_moved = False
next = raw_input("> ")
if next == "take honey":
dead("The bear looks at you then slaps your face off.")
elif next == "taunt bear" and not bear_moved:
print "The bear has moved from the door. You can go through it now."
bear_moved = True
elif next == "taunt bear" and bear_moved:
dead("The bear gets pissed off and chews your lef off.")
elif next == "open door" and bear_moved:
print "I got no idea what that means."
print "Here you see the great evil Cthulhu."
print "He, it, whatever stares at you and you go insane."
print "Do you flee for you life or eat your head?"
next = raw_input("> ")
if"flee" in next:
elif "head" in next:
dead("Well that was tasty!")
print why, "Good job!"
print "You are in a dark room."
print "There is a door to your right and left."
print "Which one do you take?"
next = raw_input("> ")
if next == "left":
elif next == "right":
dead("You stumble around the room until you starve.")
Maybe you need to start with a hand written outline of how you want it to "flow", the way you would for an essay. Then use the outline to design the general structure of the app in pseudo code. Then write the code.
EDIT: Looking at the ex36 page the author writes
There is one catch though, write up your idea for the game first. Before you start coding you must write up a map for your game. Create the rooms, monsters, and traps that the player must go through on paper before you code.
Once you have your map, try to code it up. If you find problems with the map then adjust it and make the code match.
One final word of advice: Every programmer becomes paralyzed by irrational fear starting a new large project. They then use procrastination to avoid confronting this fear and end up not getting their program working or even started. I do this. Everyone does this. The best way to avoid this is to make a list of things you should do, and then do them one at a time.
Just start doing it, do a small version, make it bigger, keep a list of things to do, and do them.
In general, it comes down to you trying to do too many things at once and not knowing where to start because, by definition of the process, there is no "start". There isn't a beginning to everything, there's a beginning to the parts that make up everything.
By sitting down and just trying to program you're trying to define the limits of the game's functionality, the specifics of the game, the program flow, and the structures required for the game to operate all at once. As the above quote mentions, a list is really helpful to break up these processes, and it helps even more if you make a list of things for you to list. The smaller the chunks you work with the easier it is to design an application.
I'm currently working on a game where we wrote up all of the individual pieces of functionality for the game (AI, combat, inventory, questing, etc.) into their most fundamental parts, wrote them on index cards, threw them everywhere and started to group them. From there we took our groups of functionality, revised them, modified them, and created our systems and generalizations from what seemed to stick together. In that situation we completely separated the process of developing the game's functionality from the structures and developed our systems successfully as a result of that separation.
At least everyone here are helping me. When I posted this problem elsewhere I was told just to program or that it meant I wasn't cut out for programming. I'm just glad to know it is fixable and that I'm not a lost cause. Thank you everyone.