6

My name is Sael and I'm 14 years old. Since I was 12 and I got my first computer I instantly go interested in making games. So of course like any other I googled it, got discouraged and forgot about it for a few months. When I was 13 I decided to continue programming, and decided that java would best suit me. Now after a year, I have a basic understanding of java and how it works (it just clicked instantly one day). Anyways, my problem is that I know how I'm going to make a simple game in my head, but as soon as I click that "New Project" button on eclipse, I'm instantly lost and can't figure out where to start. I can't do much without a tutorial beside me since my mind is so dependent on it. So here's the question : what can I do to get past this problem of mine, and have any of you felt like this before?

  • sorry if my English is a bit incorrect, Spanish is my main language*

I've made Minecraft mods before

  • This will probably get closed as "off topic". This is not a general discussion forum, it is a place to ask and answer specific programming questions. – Jay Elston Oct 29 '13 at 23:59
  • 3
    Don't be discouraged by this question being closed. The problem is not that the question is bad - its a very good question in fact, but that this site is not suited to the style of question. – mattnz Oct 30 '13 at 1:15
5

It helps to have a basic understanding of the essence of programming. At its core, programming is creating instructions for a computer. A computer is essentially a box with an IQ of 5, so programming consists of figuring out how to explain yourself so clearly that a box with an IQ of 5 can understand you.

The main part of this is breaking down large issues into smaller ones. For example, you have a large issue to solve: "build a simple game." So, what are the sub-issues here? (Let's say it's a Tetris game, just to have a concrete example to go by.)

  • Create a main screen
  • Create the gameplay itself
  • Create a leaderboard to store high scores

Now let's break those down further:

  • Create a main screen
    • Get a background image
    • Create a menu
    • Respond to player input for starting a new game, quitting the game, and displaying the leaderboard
  • Create the gameplay itself
    • Devise a way to represent the well
    • Define the different types of pieces, and how they rotate
    • Figure out how to draw the well and the pieces to the screen
    • Figure out how to make the pieces fall, one square at a time, on a fixed time step.
    • Figure out how to make the piece stop falling when it can't move down further.
    • Devise a way to get input from the player to move and rotate the pieces.
    • Extend the code where the piece stops falling to check for newly filled lines, and clear them.
    • Implement a game-over condition when the well fills up
    • Implement scoring.
  • Create a leaderboard to store high scores
    • Figure out how to store data to a file
    • Choose/devise a file format
    • Write code that loads the high score file into memory when the game starts
    • At the end of each match, check the current score against the high score data and update it as appropriate
    • Implement a screen that displays the leaderboard. Make sure it has a way to get back to the main menu.

...and so on. The trick to not getting overwhelmed by large, complex projects is by breaking them down into smaller pieces, and breaking them down into smaller pieces still, until you end up with problems small enough that you know how to solve them. That's really half of what learning programming is: learning how to break down problems into smaller ones. (The other half is expanding your repertoire of solutions to small problems!)

| improve this answer | |
  • 1
    This is the best answer i have read! Thank you for this great explanation on how to make it less overwhelming. I wish the best of you, and i thank you a million times! – zoomerzoom25 Oct 30 '13 at 0:33
  • This is much clearer to me now, thank you very much! – zoomerzoom25 Oct 30 '13 at 0:38
  • 1
    You would think the computer ought to have an IQ around 0 and 1 but sure, 5 is just as good as any other arbitrary bottom line. – John Leidegren Nov 27 '13 at 18:25
2

ah the blank page hurdle the most hated and under appreciated of all obstacles to creativity.

in my experience there are 2 places you can start,

  1. develop the background logic of the game first using unit tests for verification

  2. start with the interface and showing the pretty stuff first even if the backing logic is lacking

in both cases having a basic idea of what the logic should do before you start will be an essential guiding line.

I'm going to burst a bubble here and say you are probably not going to make the next minecraft here. You will make mistakes, either in logic or implementation. Don't be afraid to make them and learn from them, ask yourself: why did you choose this and why was it a bad idea. You could even deliberately try some anti-patterns and find out why they are anti-patterns.

| improve this answer | |
  • I have now realized " the blank page hurdle" is whats mostly holding me back! I did everything else you said pretty fast in my mind! – zoomerzoom25 Oct 30 '13 at 0:37
  • I was going to give an answer, saying it's analysis paralysis, but blank page hurdle pretty much says the same thing. He doesn't know where to start, and so doesn't start anywhere. Solution: do something, if it's the wrong thing, then fix it. – jmoreno Oct 30 '13 at 5:06
1

Just keep coding dude! We've all been there. Nothing wrong with following tutorials to learn - I'm doing the same thing myself, after having programmed for 20 years I'm following an objective-c tutorial right now. It's not a problem. Starting from an empty project is really hard and something you only need to do much later on. Just sit back and enjoy learning to code.

| improve this answer | |
  • Alright thanks! I guess that blank page just mocks me! Thanks for the encouragement! – zoomerzoom25 Oct 30 '13 at 0:36
1

Get a book. I started learning Java with "Thinking in Java", there might be other better books available by now. Main problem I see with Java is that it's object-oriented - I believe it adds unnecessary complexity for new developers.

You may also consider other languages - I see that Python is considered more approachable. I would still very much recommend starting with a book.

You did Minecraft mods - good. Did you consider experimenting with something like Unity3d? Those game engines have scripting support that will force and motivate you to start coding.

| improve this answer | |
1

You are young. Don't worry about that. I struggled much more when I was your age.

If you want to learn programming properly though, Java is a horrible language to start with. It's full of accedental complexities, and you'll find yourself doing lots of boilerplates. It is widely used because it has been well marketed in the past, but unless you're only into money-oriented programming, it's not what you want to start with.

You want to learn programming, not Java. I suggest you have a look at this book freely available online How to Design Programs. The second edition of the book is still in draft but very readable. The language these books use is (simplified) Racket, which is simple, fun to learn yet very powerful. And these books teach you real programming concepts, not syntax fiddling.

Another book you can look at is Realm of Racket, which teaches you programming by writing up a game throughout the chapters, dealing with stuff like graphics and networkings along the way.

You are young, so take your time and enjoy the joy of understanding new things. And when you have questions, don't hesititate to ask on StackOverflow :)

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.