A Question to Auti0, or Other Game Programmers Out There...

KawaiiCoderKawaiiCoder Posts: 5
edited July 2014 in Code
Hey guys! I'm KawaiiCoder. Nice to meet you all. :)

So, basically, my question is this:
How did you guys learn to program games? Is it different to normal programming, or the same, just coding in a specific way? And are there any resources that I could use to help me along?

Y'see, I enjoy programming, and I think I'm pretty good at it - in fact, I know at least half a dozen languages and am fluent in about three. So far, I've mostly been using codecademy.com to learn (not just codecademy, however; I've started trying to mod Minecraft, so to learn Java I've been using learnjavaonline.com) and I intend to take Computer Science, Maths, Further Maths and Physics once I get into college, as well as a Game Programming course when I get to Uni, if at all possible.

My dream is to become a game programmer as a job, and I want to learn how to do it. Now I know I'm young - 15 - but I have a passion for programming, and I'm always told that you can never be too young to start learning and get a head start on college courses. I know it'll be hard work - even completing the exercises on codecademy can be a headache sometimes - but I am willing to go through all that to get where I want to get to, even if that means wading through a lot of theory.

That's all I wanted to ask. Thanks in advance.

--KCoder
viuCVGi.png

Comments

  • SimbaSimba Posts: 74 Developer
    You're on the right track. Like you, I started to learn programming at an early age, and it has helped me tremendously throughout life. I have a bachelor's degree and have been working on simulations (much like games) for 2 years.

    I don't think there's such a thing as "normal programming." Programming languages are tools to build things. Knowing how to program is like knowing how to use a hammer: it's not very useful unless you can apply those skills into making something awesome. To build something awesome you have to know more than just programming languages. You need to know a great deal of mathematics, especially in the areas of physics and graphics. You have to know what is a good design and what isn't.

    Game programming is a very broad term because it covers so much. A lot of new challenges come up when developing a game. Different games have different challenges so it's a good idea to start small. Most programmers will become specialized in one area, knowing all the fancy terms and all the latest advancements. For a beginner it's good to learn a little bit about everything (and is necessary to develop your own game), but shortly after starting your career you'll find the areas you're most passionate about.

    The amount of resources available to you are nearly unlimited, thanks to the Internet. Once you have the drive to learn it'll all come naturally as far as what you need to learn next. It takes time. A lot of time. Keep pushing yourself and you'll be surprised how easy it becomes once you've learned the basics. You have plenty of time.

    College is a good first step. A lot of people go wrong here thinking they need to find the perfect college, or "what's the point?" The point of college is first and foremost to get a degree. Getting a degree tells an employer: "Look! I can get out of bed every morning!" Not everyone will land their dream job first try. Very few people get into the game industry as their first job, and that's okay. If you work hard you'll get there eventually.

    Keep making Minecraft mods. There's an awesome immediate satisfaction level there that'll keep you motivated. You might also look into programs like Construct or GameMaker. These sorts of programs won't teach you the complicated aspects of game programming that is necessary down the road, but they will teach you critical thinking and solving problems in creative ways. Critical thinking is an invaluable tool when learning the harder stuff.

    Anyway, I may have over-answered your questions here. I'd be happy to elaborate on the points I've mentioned here.
  • Thank you for the reply, jalb, I appreciate it!
    jalb wrote:
    I don't think there's such a thing as "normal programming." Programming languages are tools to build things. Knowing how to program is like knowing how to use a hammer: it's not very useful unless you can apply those skills into making something awesome. To build something awesome you have to know more than just programming languages. You need to know a great deal of mathematics, especially in the areas of physics and graphics. You have to know what is a good design and what isn't.
    Mm, I see what you're saying. Nobody likes a game with crappy physics or AI or textures.
    jalb wrote:
    Game programming is a very broad term because it covers so much. A lot of new challenges come up when developing a game. Different games have different challenges so it's a good idea to start small. Most programmers will become specialized in one area, knowing all the fancy terms and all the latest advancements. For a beginner it's good to learn a little bit about everything (and is necessary to develop your own game), but shortly after starting your career you'll find the areas you're most passionate about.
    I forgot to mention in my first post that I would like to be mostly an AI or collision detection programmer, which of course requires a lot of maths and physics knowledge, and this is why I'm going for those courses in college. But as you said, I should start small and learn about all aspects of game programming.
    jalb wrote:
    The amount of resources available to you are nearly unlimited, thanks to the Internet. Once you have the drive to learn it'll all come naturally as far as what you need to learn next. It takes time. A lot of time. Keep pushing yourself and you'll be surprised how easy it becomes once you've learned the basics. You have plenty of time.
    Do you recommend any specific resources, such as certain articles, websites or books? My only problem is because of the fact that there is so many things to choose from, I never know where to start!
    jalb wrote:
    Not everyone will land their dream job first try. Very few people get into the game industry as their first job, and that's okay. If you work hard you'll get there eventually.
    Do you think a good path to try to get into the game programming industry would to start with being a video game tester? I could start with that and gradually work my way up through the industry. I know that I won't get much for that job, but I could get a side job somewhere, perhaps?
    jalb wrote:
    You might also look into programs like Construct or GameMaker. These sorts of programs won't teach you the complicated aspects of game programming that is necessary down the road, but they will teach you critical thinking and solving problems in creative ways. Critical thinking is an invaluable tool when learning the harder stuff.
    Hmm. I'll look into them. Thanks :3
    jalb wrote:
    Anyway, I may have over-answered your questions here. I'd be happy to elaborate on the points I've mentioned here.
    Don't worry about "Over-answering" my question - all information is useful to me c:

    Many thanks,

    --KCoder
    viuCVGi.png
  • ScriptsScripts Posts: 41 Developer
    Hey guys!

    I've been programming for about 9 years now, 3 of which have been strictly centered around game tech. I started with Java and dabbled with JavaScript and PHP for websites. When I started to learn C/C++ I found it incredibly satisfying to be in more control of my programs. I'd say that there are 3 distinct areas that game companies have open for programmers.

    Scripting - Gameplay developers
    C#/Java/JavaScript - Tool developers that utilize a company's SDK
    C/C++ - Engine and SDK developers.

    The closer you get to C++ the higher the skill cap gets. You have to understand a lot about how programs run on different operating systems as well as a lot of general Computer Science knowledge; Data structures, byte alignment, net code, graphics api etc. If you know all of those concepts and are confident with C++ you'd make an excellent general programmer that could be tasked with any type of sub-system development that the Engine may require.

    Having an area of focus is important as well. A balanced game Engine can not stand on it's own if it has nothing but general programmers gluing a lot of unfocused pieces together. Having a proficiency in a system can help define the behavior and strengths of an Engine. This is where the cross between traditional Computer Science and Game Programming occurs.

    If you don't have guidance this can be a very difficult area to try and understand. If you examine the code from the Game Programmers of Old you'd probably be more on board with calling it gibberish or art. Those first pioneers figured out how to utilize their creativity in the frame of technology.

    I'm mostly self taught so I'll share some resources that I found really useful:
    Books:
    DirectX9
    DirectX9 a Shader Approach
    Directx11
    Practical Rendering and Computation with DirectX11
    Real-Time Rendering
    Game Physics Engine Development
    Game Physics (Second Edition!)
    AI for Games
    Programming Game AI By Example
    AI Techniques for Game Programming
    Behavioral Mathematics for Game AI
    Game Coding Complete 4
    Real-Time Collision Detection
    Game Engine Architecture
    3D Game Engine Design
    3D Game Engine Programming
    Mathematics for 3D Game Programming
    Texturing and Modeling, 3rd, A procedural Approach

    Websites
    http://www.directxtutorial.com/
    http://www.rastertek.com/tutindex.html

    As always, Game Programming Gems, ShaderX/GPU Pro and GPU Gems.

    It really just boils down to these simple steps:
    - Be an information sponge (you'll never stop learning)
    - Think Critically.
    - Never settle for just "Yes"
    - Have an open mind.

    Following those steps and reading those resources has proven to successfully change someone from not knowing any programming to being in the game industry as a AI programmer in less than 10 months. Which leads me to my final point;

    Be confident!
    Let's make something awesome together.

    Follow me! @Scriptslol
  • Wow, thanks Scripts! To get all these resources and advice from a true game programmer is truly invaluable!

    I will definitely look into the books and the websites - they seem like they would be very useful to me, if I can afford them :P

    But seriously, thank you. A lot.

    --KCoder
    viuCVGi.png
  • SimbaSimba Posts: 74 Developer
    I forgot to mention in my first post that I would like to be mostly an AI or collision detection programmer, which of course requires a lot of maths and physics knowledge, and this is why I'm going for those courses in college. But as you said, I should start small and learn about all aspects of game programming.
    Collision detection is a lot of fun. It's my guilty pleasure, even if I don't apply it much at my current job. A.I. is a pretty large beast, and incredibly difficult to get right. I like to consider A.I. more of an art form than a science.
    Do you recommend any specific resources, such as certain articles, websites or books? My only problem is because of the fact that there is so many things to choose from, I never know where to start!
    Scripts beat me to it. We went to the same Uni so it's no surprise he's recommending the same stuff. Real-Time Collision Detection is one of my all-time favorite books, hands down. It's so straightforward and to the point. It's basically my bible for anything collision detection related.
    Do you think a good path to try to get into the game programming industry would to start with being a video game tester? I could start with that and gradually work my way up through the industry.
    Maybe. What you're describing is Quality Assurance and I suppose it is a good way to get your foot in the door. It's not the route I would personally go.
    I know that I won't get much for that job, but I could get a side job somewhere, perhaps?
    Get a job doing programming work. It's a big resume piece. In your free time work on your own projects and build up a portfolio. It's also important to network: get to know people in the industry, go to game-dev meetups, go to conferences, etc. If you are a capable programmer you will get there eventually.
  • nocarenocare Posts: 92
    I wanted to just add a bit of my own experiences.

    When I got into game programming, it started with mods in games and no internet access.
    I learned java purely from creating minecraft mods, and I think I was the first person to create fluids with effects.
    About a year of that. spotty times with and without internet.

    After a while that wasn't as fun, I was bored of minecraft, etc.

    So I set out to learn how to make a game with java. I had no game design plans apart from the fact I wanted a 2D action game with mouse aiming.

    A few months of mindblowing hard work and I had a basic platform for a game, from scratch.
    Without internet, all my research had to come from trips to the library (1 hour per day limit internet).
    And apart from that, reading the jdk, and reading the code of minecraft.

    I knew how to code, but what I lacked were concepts that exist in game programming.
    I had to sit down, look at games I owned, and really dive into theorizing about how the programmers did things. And then, because game creation tutorials really didn't help me understand things, I read papers by companies about games they created on the NES and such. I can't find any links anymore, but it was good info.

    In particular was a discussion on where and why the team decided to put colliding points on sprites and when I started fiddling with that kind of tech in my own engine it helped immensly.

    Fiddling... The main thing I want to add to this thread is bring Determination to your goals.
    There are days, or stretches of days where I would sit changing the same small function a lot. You know we're talking 500 lines of code to get a 50 line function doing what you want.

    We've talked a lot about that trait at work and have come to the conclusion it's a very important one to develop.

    Be too stupid and stubborn to give up trying to accomplish what you want to. ;)
  • ValidifyedValidifyed Posts: 612 Seed
    3D Programming is essentially the same as normal programming, you have the "Update" loop, which is called every frame, here you do all your normal calculations, in the "Draw" loop, that comes straight after update in most cases, you basically use a 3D API to draw things on the screen, based on the values that are edited and changed during the update loop.

    I highly recommend Javascript to get used to this concept - its incredibly easy to setup and takes about 5 minutes to see a result, maybe make a car that drives around the screen, from there you should have the knowledge you need to move on.

    One of the most important things about game programming is to get good at coding Algorithms, most simple jobs have already been coded, and having the knowledge of what has already been done helps you plan out how to write what you want to achieve, It also helps you get into the mindframe of a programmer, what types of data structures are good for what and the most common ways to achieve basic problem archetypes.

    I started learning programming at age 10 with a bit of LUA; I moved onto C++ at about 13 and now know about 8 programming languages and 3 or 4 scripting languages (As well as 3 3d APIs) at age 17 and in all that time, Ive reached the conclusion that C# is brilliant. It comes close to matching what C++ can do and codes much more smoothly, It is also an incredibly popular language and so there is plenty of help online if you get stuck. (Incidentally, It's also one of the languages supported by Unity, which I use basically so I can ignore collision detection programming).

    At the end of the day, start with a 2D JavaScript program on HTML canvas to get used to the idea of Update and Render, then move onto Unity, play around with their API a bit (Remember, Small Stepped goals, and dont get distracted by all their other gumpf, you're there to program, not to cheat using wheel colliders etc. Its basically just a simple to set up 3D interface. /w editor), then either stick with unity or learn DirectX for C#, its more or less an iterative process. Learn update/render loops, learn 3D updates, learn 3D rendering.

    Here's a JavaScript tank demo I made when I first learned JS; See if you can read through it and understand how it works (I recommend using Notepad++, for syntax highlighting):
    //HTML (Save as index.html)
    <html>
    <head>
    <title>Tank Game</title>
    </head>
    <body>
    <canvas id="canvas"  onclick="startBullet(event)" onmousemove="setcoords(event)" style="border:1px solid black;" width="500" height="500">Browser does not support the canvas tag<canvas>
    <script type="text/javascript" src="game.js"></script>
    
    
    </body>
    </html>
    
    
    //Javascript (Save in same folder as game.js)
    var keys = new Array(256);
     
    var c = document.getElementById("canvas");
    var ctx = c.getContext("2d");
    var mouse_x, mouse_y;
    
    var tank = {};
    tank.theta = 0;
    tank.x = 20;
    tank.y = 20;
    tank.speed = 1;
    tank.turrettheta = 0;
    
    var bullet = {};
    bullet.active = false;
    bullet.x = 0;
    bullet.y = -2;
    bullet.theta = 0;
    bullet.velocity = 5;
    
    
    var keydown_handle = function (event)
    {
    keys[event.keyCode] = true;
    }
     
    var keyup_handle = function (event)
    {
    keys[event.keyCode] = false;
    }
    
    function WallBounce() {
    	if (tank.x > c.width) tank.x = c.width;
    	if (tank.y > c.height) tank.y = c.height;
    	if (tank.x < 0) tank.x = 0;
    	if (tank.y < 0) tank.y = 0;
    }
    
    function setcoords() {
    mouse_y = event.clientY - 5;
    mouse_x = event.clientX - 5;
    }
    
    function startBullet() {
    //if (bullet.active = false) {
    	bullet.active = true;
    	bullet.theta = Math.atan2((mouse_y - tank.y),(mouse_x - tank.x));
    	bullet.x = tank.x;
    	bullet.y = tank.y;
    //}
    }
    
    function update()
    {
    
    tank.turrettheta = Math.atan2((mouse_y - tank.y),(mouse_x - tank.x));
    
    if (keys[87]) tank.y += tank.speed*Math.sin(tank.theta), tank.x += tank.speed*Math.cos(tank.theta); //KeyCode.w
    if (keys[83]) tank.y -= tank.speed*Math.sin(tank.theta), tank.x -= tank.speed*Math.cos(tank.theta); //KeyCode.s
    if (keys[68]) tank.theta = rotate(tank.theta, 0.05); //KeyCode.d
    if (keys[65]) tank.theta = rotate(tank.theta, -0.05); //KeyCode.a
    
    	//if (bullet.active = true) { 
    		bullet.y += bullet.velocity*Math.sin(bullet.theta);
    		bullet.x += bullet.velocity*Math.cos(bullet.theta);
    		//if (0>bullet.x>100 || 0>bullet.y>100) bullet.active = false;
    	//}
    	WallBounce()
    	
    }
    
    function rotate(angle, change) {
    angle = (angle + 2*Math.PI + change)%(2*Math.PI);
    return angle;
    }
     
    function render()
    {
    	ctx.save();
    	ctx.clearRect(0, 0, c.width, c.height);
    	ctx.fillStyle = "#FF0000";
    	ctx.translate(tank.x, tank.y);
    	ctx.rotate(tank.theta);
    	ctx.fillRect(-13, -8, 26, 16);
    	ctx.restore();
    
    	if (bullet.active) { 
    		ctx.save();
    		ctx.translate(bullet.x, bullet.y);
    		ctx.fillStyle = "#444444";
    		ctx.fillRect(-2, -2, 4, 4);
    		ctx.restore();
    	}
    
    	ctx.save();
    	ctx.translate(tank.x, tank.y);
    	ctx.rotate(tank.turrettheta);
    	ctx.fillStyle = "#000000";
    	ctx.fillRect(-2.5, -2.5, 20, 5);
    	ctx.restore();
    }
     
    var mainloop = function()
    {
    update();
    render();
    };
     
    function initialize()
    {
    for (var i = 0; i < keys.length; i++)
    { 
    keys[i] = false;
    }
    document.addEventListener('keydown', keydown_handle);
    document.addEventListener('keyup', keyup_handle);
     
    var ONE_FRAME_TIME = 1000 / 60;
    setInterval(mainloop, ONE_FRAME_TIME);
    }
     
    initialize();
    

    PS; Look into matrices, lean trig and learn about polar coordinates.
  • The ArcanianThe Arcanian Posts: 51 Seed
    Hey guys! I'm KawaiiCoder. Nice to meet you all. :)

    So, basically, my question is this:
    How did you guys learn to program games? Is it different to normal programming, or the same, just coding in a specific way? And are there any resources that I could use to help me along?

    Y'see, I enjoy programming, and I think I'm pretty good at it - in fact, I know at least half a dozen languages and am fluent in about three. So far, I've mostly been using codecademy.com to learn (not just codecademy, however; I've started trying to mod Minecraft, so to learn Java I've been using learnjavaonline.com) and I intend to take Computer Science, Maths, Further Maths and Physics once I get into college, as well as a Game Programming course when I get to Uni, if at all possible.

    My dream is to become a game programmer as a job, and I want to learn how to do it. Now I know I'm young - 15 - but I have a passion for programming, and I'm always told that you can never be too young to start learning and get a head start on college courses. I know it'll be hard work - even completing the exercises on codecademy can be a headache sometimes - but I am willing to go through all that to get where I want to get to, even if that means wading through a lot of theory.

    That's all I wanted to ask. Thanks in advance.

    --KCoder
    I wish I got started as young as you, I did not have any experience with programing until I took a Java class senior year in high school (19 years old). I also have game industry aspirations, though in my case it is game design with anything programing as a fall back.
    jalb wrote:
    You're on the right track. Like you, I started to learn programming at an early age, and it has helped me tremendously throughout life. I have a bachelor's degree and have been working on simulations (much like games) for 2 years.

    I don't think there's such a thing as "normal programming." Programming languages are tools to build things. Knowing how to program is like knowing how to use a hammer: it's not very useful unless you can apply those skills into making something awesome. To build something awesome you have to know more than just programming languages. You need to know a great deal of mathematics, especially in the areas of physics and graphics. You have to know what is a good design and what isn't.

    Game programming is a very broad term because it covers so much. A lot of new challenges come up when developing a game. Different games have different challenges so it's a good idea to start small. Most programmers will become specialized in one area, knowing all the fancy terms and all the latest advancements. For a beginner it's good to learn a little bit about everything (and is necessary to develop your own game), but shortly after starting your career you'll find the areas you're most passionate about.

    The amount of resources available to you are nearly unlimited, thanks to the Internet. Once you have the drive to learn it'll all come naturally as far as what you need to learn next. It takes time. A lot of time. Keep pushing yourself and you'll be surprised how easy it becomes once you've learned the basics. You have plenty of time.
    I came across this idea that that I think is very true in regards to programing. True programing is more a mater of ideas and concepts then it is languages. If you know the concepts then it is very easy to learn a new language.
    jalb wrote:
    College is a good first step. A lot of people go wrong here thinking they need to find the perfect college, or "what's the point?" The point of college is first and foremost to get a degree. Getting a degree tells an employer: "Look! I can get out of bed every morning!" Not everyone will land their dream job first try. Very few people get into the game industry as their first job, and that's okay. If you work hard you'll get there eventually.
    Word of advise: do not go to college before finding out that you have Asperger's syndrome, its not fun... I know first hand... (not serious advise, making a joke about my own problem)
    jalb wrote:
    Keep making Minecraft mods. There's an awesome immediate satisfaction level there that'll keep you motivated. You might also look into programs like https://www.scirra.com/ or http://www.yoyogames.com/developers/pro ... ummer-sale. These sorts of programs won't teach you the complicated aspects of game programming that is necessary down the road, but they will teach you critical thinking and solving problems in creative ways. Critical thinking is an invaluable tool when learning the harder stuff.
    I have had some ideas that I though could be made into minecraft mods but I would rather wait for TUG (this might be a bad idea) and I do not want to have to go relearn java (im lazy...).

    Also, https://www.coursera.org/ has a coarse from Rice University titled "An Introduction to Interactive Programming in Python" which is also the first part of a Specialization called "Fundamentals of Computing" of which I am currently taking the second course.
    jalb wrote:
    Do you think a good path to try to get into the game programming industry would to start with being a video game tester? I could start with that and gradually work my way up through the industry.
    Maybe. What you're describing is Quality Assurance and I suppose it is a good way to get your foot in the door. It's not the route I would personally go.
    Me ether, I have read things about it that make it not appeal to me.
    jalb wrote:
    I know that I won't get much for that job, but I could get a side job somewhere, perhaps?
    Get a job doing programming work. It's a big resume piece. In your free time work on your own projects and build up a portfolio. It's also important to network: get to know people in the industry, go to game-dev meetups, go to conferences, etc. If you are a capable programmer you will get there eventually.
    Definitely places where my Asperger's/personality hinders me, problems with executive function (engine without the key), not much of a social networker, not am I prone to getting out places.

    Now for a five second programing life story :P
    First introduction to programing was a Java class my Senior year at age 19. Then went to College (if I remember correctly "uni" for those in Europe) for Computer Science and had problems everywhere but Computer Science (aced, never had to take a final) due to undiagnosed Asperger's syndrome, so I decided to take a gap year and then go to a college closer to home. So here I am, a 21 Year old Aspy sitting in a gap year taking a python course online getting and distracted to by games to do more programing then that... *sigh* I'm unique. :lol:
    Nerd? You say that like it's an insult.

    Please excuse any bad spelling...
  • Thank you everyone, all these responses and advice is amazing. I appreciate it so much, I can't even put it into words ^.^
    viuCVGi.png
Sign In or Register to comment.