Learning Programming

edited in General
Hey Guys

As my knowledge in this field is yet a bit limited, thought I would pose this question to some more knowledgeable people.

If I were to embark on learning a language with the goal to code games, specifically 2d platformers/side scrollers, what language would you guys recommend I start out with?

Appreciate any feed back, thanks :D!

Comments

  • edited
    I asked the same question of many folk (in other forums) with no straight answer. There are just too many options I guess and everybody has there own favourite. Personally I opted for c# as there are many great (and free) tutorials on-line, the IDE (visual studio express) is free and it can be used to script in many of the game engines out there (like Unity). Also look at XNA which is an add-on for visual studio and is great for 2d platformers, however, you should note that microsoft has announced that they will not be releasing any further updates for XNA.

    I found a book by Joyce Farrell which is really cool and she explains C# in a way that is easy for beginners to understand.

    If you want to make 2d platformers also look at game maker, which many of the guys on this forum love. But that won't really teach you a programming language, which you said you are interrested in doing.

    If any of the more seasoned programmers on this forum has any better advise, I too would appreciate some insight into what language you guys are using, and why.
  • If you want to just make games you should definitely try out Gamemaker or Construct 2. They're not really coding heavy and allow you to very quickly get down to producing actual games.

    Gamemaker does have its own coding language, GML, which is basic, but quite powerful. While learning GML may not be useful in of itself, as @FanieG perhaps believes :) , it can teach you several programming concepts that you can apply to new coding languages if you move on to them.

    It's a bit of bastard language, GML is, so many coding languages you move onto may feel similar to it. :)

    Essentially: if you just want to make games, use Gamemaker. If you want a gentle start to coding, also use Gamemaker. Otherwise, just learn a coding language that interests you - C# and C++ are the most prolific, I believe.

    There's a few people on this forum who use Gamemaker, so if you decide to go with it, don't hesitate to post/ask questions :).
  • @Adonais If you want to learn a programming langauge I would suggest c++ with sdl as it is what I'm using, but after taking the advice of the other guys here I'm also using gamemaker and finding that it's not lacking if you want to quick prototype and still code, it uses alot of coding syntax and the logic for it, try and see what works for you, come back and give us some feedback :)
  • edited
    @Bensonance - sorry if my post came off as judging game maker. That was not my intention. I am personally busy using it and think Game Maker is great. I just meant that since Adonais is interrested in learning a programming language C# might be a better place to start. I was not even aware of GML only know about the Parakeet Add-on that allows to code in C#. Sorry again if I have offended any GM users.

    @Adonias - C++ is a very powerful language (as LittleBear suggested), but you should note that it does not have a garbage collector like C# so it could prove a bit trickier for a beginners like me and you.
  • edited
    @FanieG: What makes you think that Parakeet has you writing C#? It's just an alternate IDE for Game Maker projects - that code that people are writing in it? That's GML. GML just looks similar to C# because curly braces...

    @Adonais: The important question is what do you want to learn how to do? If you want to learn how to make a platforming game work, then start with Game Maker. All GM will give you is stable collision and rendering - it won't give you any platforming logic, that'll be your job. And if you decide to use something else that doesn't have systems pre-built for you to use, you'll still have to write the platforming logic bits yourself but AFTER you've written your own rendering and collision detection (and probably input handling and asset importing too).

    There are loads of systems out there to make games in, I always suggest downloading a fair chunk of them and doing 1 week's worth of tutorials in each, then at the end of 2 months you'll know which you like working with the best. (It'll be the one that you've already started producing a game with) Try out Game Maker, Scirra Construct, Flixel, Unity, uh... Other ideas peeps?
  • Thanks for the feedback guys! I stumbled upon an awesome Python tutorial on Learnstreet that I got from a link in the websites wiki. Apparently Python is quite easy and a lot of people use it to program games. Does anyone have any comments on Python?

    I heard c++ and c# can be very intimidating for people starting out so I am a bit weary of those.

    Thanks for the advice on game maker, I will definitely give it a look, but my goal is to ultimately learn something solid and go on to work on more complex projects as I improve.

    All advice is appreciated :D
  • edited
    My short answer: If I had to recommend a programming language I'd recommend C#. Though starting with GameMaker might be a faster path to get to the point gaining actual game development experience (because you won't spend as long struggling with the language or tools).

    My Slightly Longer Answer: If you have no programming experience I'd probably recommend Game Maker (or Construct 2 perhaps, I don't have experience in either TBH), if your goal is to get good at designing games.

    If you have some programming experience, or think you might enjoy the act of programming, I'd recommend C# and Unity. We're using it to make Broforce and haven't encountered any limitations (that aren't shared by all the alternatives, or are worse in the alternatives).

    I might also suggest FlashPunk, which uses ActionScript3 which is very close to C#. I don't have experience with it, but if it existed 6 years back I definitely would have recommend it to me. A lot of folks who do game jams use it, so I gather it gives very quick results. http://www.newgrounds.com/collection/flashpunk

    My Long Answer: Choosing the right language isn't all that important when learning to make games. I'd say that choosing a development environment a more important question to start with.

    When I learnt to make games I went from ActionScript2 -> ActionScript3 -> C++ -> Javascript -> C# And it was always trivially easy transferring the skills from one language to another.

    The real time investment was learning the new tool set. Learning all the features of Flash and Unity took quite a bit longer than transitioning from ActionScript to C# (which are in fact very similar).

    But the biggest meaningful investment was the thing I was learning all the time, which was how to make fun things happen, which can be done in any development environment (GameMaker, C++ and SDL, Unity, pen and paper, even a couple people and just their bodies).

    Well, that's not true, I wasn't learning to make fun things happen when I was battling with the tools, which I did a lot of when I was programming in C++ and using SDL. I agree with @FanieG here, having to do one's own Garbage Collection and managing memory is pants. I'd say that C++ is like developing games on hard mode (which is great if you enjoy a programming challenge, just not if your goal is to make games).

    And I'd second @Dislekcia 's suggestion. Most of these tools are free, or have free versions. Get a couple of them and see how they feel. Try some tutorials, they should ALL have a design a 2D platformer tutorial that should take an hour or less. See how quickly you get results and how easy it is to tinker and change values.

    I'd certainly say that, when you're starting out, the speed at which the toolset allows you to produce something playable is a crucial factor. Things need to be playable before you can start to really learn the game logic side of things, and until you understand the game logic you are going to struggle picking up language, because you won't know what you're trying to achieve with the language. (If that makes sense? I guess I'm saying that understanding is gained faster when you can see the results of your actions)

    And the other important thing is to look at the size of the community that is there to help you if you get stuck, and what the developer of the tools is doing to make the help accessible. I know Unity (and C#) has some of the best help, if not the best help. It should be fairly easy to find out about the alternatives.

    [Edit] I'm not really a programmer (I only program to make games), I'd like to comment on Python, but I'm not really equipped. My limited understanding is that Python does some things really really well, but will make itself a huge pain when your games get more complex. Though I'd like for someone to give me a little more information about this as well.
  • @Adonais said:
    Thanks for the feedback guys! I stumbled upon an awesome Python tutorial on Learnstreet that I got from a link in the websites wiki. Apparently Python is quite easy and a lot of people use it to program games. Does anyone have any comments on Python?
    In that case I'd add Pygame to my list above ;)
    @Adonais said:
    I heard c++ and c# can be very intimidating for people starting out so I am a bit weary of those.

    Thanks for the advice on game maker, I will definitely give it a look, but my goal is to ultimately learn something solid and go on to work on more complex projects as I improve.
    You can make games in anything. What you don't want to do is force yourself to try and learn multiple complex skills at the same time. So the trick is to try out a bit of everything and see what feels the most rewarding for you, then focus on that.
  • Python is a great language to learn. It has a clean syntax and is indeed easy to get into. And it has nice features that I sometimes miss in other languages. From just a "learning-to-program" perspective, you cannot go wrong.

    However, there are a few other considerations as well. The free IDE's available are not that great (I used PytonWin, as well as Eclipse). The one that comes with the distribution (Idle) is horrible. WingIDE is really awesome, but not free.

    Also, you need to look at what game system(s) [engines / libraries] you want to use, and their pros and cons. For example, on what platforms can you deploy? Can you package it neatly? (It's sometimes a bit of a pain making a simple executable. (The only Python-capable game engine that I have experience with is Blender. Six years ago it was a very frustrating thing to use.)

    ----
    C# is indeed slightly more intimidating than Python. (C# used to feel like Java, but nowadays it has a very Pythonish flavour to it). Visual Studio Express is quite a decent IDE. Again, you will need to look at the game engines / libraries you intend to use.

    ----
    C++ is the godfather of programming languages: it will look you straight in the eye and shoot you in the stomach. Not a great language for beginners. (It's of course a very powerful language, and one that can be enjoyable to use once you are through the initiation phase.)

    ----
    Having said all this; I still think Dislekcia's advice is the best: check out the high-level tools, and then learn the language suitable for that tool (as long it's not C++ :P). Language is really an incidental part of programming. In real life it's always a business decision and for game programming is always dictated by the tools you use (which are chosen for their price, features, and support).
  • Some A grade solid advice above. Eventually differences between languages will fade away once you know enough, that the decision becomes far more about which platform to use based on the features they offer. For instance do you want to make simple mobile games? Then there are other options like Corona SDK and a host of similar equivalents. It's hard to make a wrong choice so as you're making something.

    If you only concern is making games in some form, then game maker/unity is great. If you also want to learn a programming language that is going to remain useful to you there is nothing better you can do than learning javascript. (You'll need to find some kind of game frame work to go with it), but there are incredible resources out there for learning javascript from bare bones basics, you can run it in any browser (that means setting up a development environment is very easy) and it is one of the three pillars that powers the internet. (also, javascript can be used in unity ;) )
  • It'd be great if there were some kind of newcomer FAQ that covered this...
  • I've just had a thought about learning to program, based on a conversation I had with @BlackShipsFilltheSky:

    If you want help, don't write things yourself!

    It is much, much easier to solve issues in games with shared systems under the hood. It becomes a matter of "How do I get Unity to do this thing I want it to do for whatever reason?" and people with loads of experience in that system can really get to grips with the thing you're trying to do and offer great advice or ask piercing questions without having to spend a ton of their time.

    But if you're really writing everything from scratch in C++, then people aren't going to be able to diagnose your problem in a couple of minutes of staring at a forum post. Even if they're C++ experts (hi there), they'd need to spend ages looking at your raw code first before they could start offering any sort of advice at all. Plus, their advice and questions are going to mostly be about the structure of what it is you've already built and why you did technique X this way instead of this-other-faster-better-way.

    So your average 2 minutes of forum time turn from something useful into not enough time to help, sorry.
  • @BlackShipsFilltheSky
    Sure, an all encompassing FAQ is great.
    On the other hand it could be nice to answer questions on their own merit, giving the person direct help and advice and not a cookie cutter one-answer-fits-all.
  • I think that when you are trying to learn how to program, fundamentals are a lot more important than choosing a language. It might seem weird but I learned all my programming fundamentals from the original Starcraft's map editor. It introduced me to concepts like variables branching logic and also events and methods.

    So my advice would be to make sure whatever language you choose you still are learning the fundamental concepts of programming.
    Thanked by 1D3zmodos
  • edited
    @hanli While the advice that was given above I thought was really good, I wouldn't call it cookie-cutter, but it is really standard. Are you saying that the advice above couldn't be given to anyone asking "I want to learn to be a programmer of independent games, where should I start?".

    Because I'd quite happily give this advice to any such person. And it'd save us all some time every time this comes up (and it is a "Frequently Asked Question") and help avoid conflicts in the future (because we wouldn't need to debate it with people who disagree with this advice) if it was in a FAQ.

    And obviously people who aren't asking "I want to learn to be a programmer of independent games, where should I start?" should be able to get different advice for their questions.
    raithza said:
    I wanted to edit in a section in the FAQ with the question "I want to write my own engine" and both sides of the argument but unfortunately when i try edit it it's just a garbled mess of HTML that I don't have the patience to sort through :(
    hanli said:
    @raithza
    I like that idea.

    The first thing it should say though is "What are you trying to achieve?" then split the advise into streams based on the desired result. So - I am primarily interested in game play - answer 1, I am primarily interested in software - answer 2, I don't know what I'm interested in - answer 3. (answer 3 will be the hard one)

    If everyone is prepared to work on it together, and to construct it as a holistic, reasonable, document it could be very useful.
    It may also be good to start these as discussion threads first - then move them into the FAQ when consensus is reached. As you noted, it is really important to represent both sides, as neutrally as possible. That way it could be referred to, without needing to rehash it and get sidetracked by arguments.

    The point is to acknowledge difference, see value in different approaches, and tailor advise to individuals, based on their own needs. So when someone says "help me with X" we can respond with "go read that first, and decide if that is what you really want." If they say "ah, great point, I thought I wanted X, but I actually meant Y" that's great, Y experts step in. If they say, "thanks but I really want X" then allow people interested in X to handle it.
    ^ this
    Thanked by 1hanli
  • The only thing I'd like to make sure a reasonable response to this question properly addresses is what hasn't worked. We spend way too much time trying to account for the luck of developers that succeed instead of focusing on avoiding the mistakes of those that never manage to develop at all.
  • I'm just going to throw this link out there and the knowledgeable peeps will be able to tell you if it's worth pursuing. I just thought it might be an interesting way to help motivate :)
    https://diy.org/skills/gamedev
Sign In or Register to comment.