Hey Garry, I was just wondering, could you do a post about learning to code? I’ve probably wasted so much money on different textbooks, and I end up going through them several times but come out knowing only how to use the basic functions with no application to anything what so ever. Is there a language you recommend picking up first? Thanks for the help!

First of all you need a reason to code. You can’t just say I want to learn to code – and then be able to code. It’s mis-targetted. You need to think about WHAT you want to code.

You want to code a game? Cool. What type of game? You want to make a game like COD? Scope down, aim for a simple game. Aim for something simple first, then build up. Maybe a Mario style game?

So you want to set yourself a number of targets – and don’t aim to rush through each one. Teach yourself how to learn. The internet will tell you everything – it’s all there – you’re the only thing holding you back.

  1. Decide on a programming language (you’re new – use Love for now)
  2. Make a simple game that just draws the screen a certain colour.
  3. Draw a square on the screen.
  4. Draw a sprite on the screen (mario).
  5. Make the sprite move when you press a key.
  6. Make the sprite move with velocity when you press a key (and slow down when you loose it).
  7. Add constant velocity to the sprite downwards (gravity)
  8. If the sprite is at the bottom of the screen, don’t add velocity – and don’t let it go lower than the bottom of the screen.
  9. Add vertical velocity when jump is pressed.

There you go – you just made a basic little Mario game. Now just add real collisions, enemies, coins and a level editor – and you’re all good :)

One thought on “Hey Garry, I was just wondering, could you do a post about learning to code? I’ve probably wasted so much money on different textbooks, and I end up going through them several times but come out knowing only how to use the basic functions with no application to anything what so ever. Is there a language you recommend picking up first? Thanks for the help!

  1. Hey Garry.
    Your guide on how to learn to code is so lovely and inspiring. I am sure it works. Thank you.

    With all the love and greetings from Germany,
    Boris

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s