Hello, I'm a teen would like to start learning early. My end goal is to be able to create a extremely simple RTS game by the end of the coming summer. Is there any language that would work better for this, and is there any later advantages that learning a language now would yield later? I've heard C++ or C# work well for this, but I would rather consult people who have gone through the steps themselves. Also, if you have any resources for a specific language, they would be greatly appreciated. Thanks in advance.
Programming Languages
6 minutes ago, LunarRaikiri said:Hello, I'm a teen would like to start learning early. My end goal is to be able to create a extremely simple RTS game by the end of the coming summer. Is there any language that would work better for this, and is there any later advantages that learning a language now would yield later? I've heard C++ or C# work well for this, but I would rather consult people who have gone through the steps themselves. Also, if you have any resources for a specific language, they would be greatly appreciated. Thanks in advance.
If your goal is to make a simple RTS game by the end of summer you might want to look at GameMaker Studio as a 2D solution. I would recommend learning GML then moving onto C# at a later point in time.
I'm not sure someone 100% new to programming will be able to pull this off even with C# and Unity in such a time frame, but who knows. I have no idea what 'simple' means for your game. You also shouldn't pick an RTS as your first game project.
Even though I mainly use C++ for game development, I wouldn't suggest it if you have zero experience programming while setting such a deadline and game requirement.
Don't worry about the "usefulness", programming is a very transferable skill. You'll be learning several languages if you intend on making a career out of it.
Programmer and 3D Artist
2 hours ago, LunarRaikiri said:Hello, I'm a teen would like to start learning early. My end goal is to be able to create a extremely simple RTS game by the end of the coming summer. Is there any language that would work better for this, and is there any later advantages that learning a language now would yield later? I've heard C++ or C# work well for this, but I would rather consult people who have gone through the steps themselves. Also, if you have any resources for a specific language, they would be greatly appreciated. Thanks in advance.
For the record I agree with Rutin here. I just want to add that all programming languages can pretty much do the same things, but in different ways.
I make a speech here, but the tl:dr is, go with game-creation software or a high-level interpreted-language such as C#, Python, or Javascript. I cannot suggest C++ because it is too hard to learn and unnecessary for what you want to do.
I would suggest not choosing C++ and going with what's called an "interpreted language" over C++ which is a "compiled language". C#, Python, and JavaScript are all interpreted languages.
To help me explain the difference between interpreted and compiled languages better I need to describe what low-level and high-level programming languages are. Sometimes you may hear people describing languages as "lower" or "higher" than another. Technically speaking, if you need a program to "translate" your code into something the computer understands, then the language is high-level. Otherwise, the language is either in the "assembly" category of languages or it is "binary" language. C#, C++, and all the programming languages mentioned here are high-level languages. All of them have to be translated in one way or another to some sort of assembly language before they are run.
The difference between a compiled and interpreted language is in how they are converted into assembly language. A compiled language uses a program to "compile" the code directly into assembly language, presumably the specific type that your machine uses. An interpreted language uses a program that "interprets" the code itself and runs it without ever translating the code to assembly.
Generally speaking, interpreted languages are easier to learn, faster to develop programs with, and easier to port across different operating systems than compiled languages. The reason compiled programs such as C++ are still used is because, when an experienced programmer works with them, they can do the same work faster than interpreted languages. Computers are fast enough now that you don't need this extra speed unless you're programming a game similar to those released by professional publishers such as Activision, Ubisoft, and Bethesda.
Let me talk about some of the languages I think you should consider as your first language.
C#
Once you get experienced you may feel like you want to make the transition to C++. C# is the most similar to C++ on this list. It is also the only language used on the easy-to-learn and well-supported Unity Engine which you can download and use for free to help you make a game. Unity is a bit too focused on 3D for my taste, but it does do 2D fairly capably. FYI an engine is any basic software used to run a game.
Python
Python is very easy to learn. It is may be the language most similar to regular english out of all the languages here. Unlike the other languages on this list it forces programmers to use tabs to separate certain lines. This is a very good thing because it emulates the format of you should practice anyway if you want to be able to read and edit your own code. You WILL make mistakes and you WILL have to fix them. On the other hand, all of the other languages here are more-or-less based on the language simply called C. This makes transitioning from this language to another a little bit more difficult, though it's still not hard. It is also the only language on this list that you cannot use with any game creation software.
Game Maker Language (GML)
GML is only used with the game creation software "Game Maker: Studio". I don't know a lot about it, but if you decide you'd like to try out Game Maker you should probably learn it. I think Game Maker is more focused on 2D games and making one with it might be easier than with unity. I don't recommend going with 3D for your first game.
JavaScript
Someone with actual knowledge of this language, correct me if I'm wrong, but I believe this could be the most portable of all the languages listed. Portable means that programs made with it are more easily made to work with different operating systems. I don't know if it is used with any game creation software, but I think I've heard it's used with at least one.
Personally I've chosen not to use game creation software because I don't like learning complex GUIs. I would rather spend my time programming or learning more about programming.
I hemmed and hawed over whether or not to point this out (I hate being the "um, actually" guy... it's annoying). But considering that this is "For Beginners", I feel it's important that newer programmers have accurate information. Especially since I see so many people come in to my work place with a BSc in Comp Sci and end up having lot of trouble understanding the tools they're using due to bad information, or misconceptions derived from observation.
5 hours ago, RidiculousName said:C#, Python, and JavaScript are all interpreted languages.
C#, as in the language that comes with .NET/Visual Studio, or Mono, is most certainly not interpreted. That said, it could be interpreted, just as C++ could be interpreted. But for all intents and purposes, it is not.
C# with .NET/Mono compiles down to IL (intermediate language, it looks similar to assembly), and then the JIT (Just In Time) compiler compiles the IL into native machine code. Remember: JIT != Interpreted.
5 hours ago, RidiculousName said:The difference between a compiled and interpreted language is in how they are converted into assembly language.
Interpreted languages are not converted to assembly. They're executed by an interpreter. Hence why they're called "interpreted". From wikipedia:
QuoteIn computer science, an interpreter is a computer program that directly executes, i.e. performs, instructions written in a programming or scripting language, without requiring them previously to have been compiled into a machine language program. An interpreter generally uses one of the following strategies for program execution:
* parse the source code and perform its behavior directly;
* translate source code into some efficient intermediate representation and immediately execute this;
* explicitly execute stored precompiled code[1] made by a compiler which is part of the interpreter system.
Be aware that any interpreted language is likely going to be much slower than a compiled one. Does that matter? The answer, like so many answers when it comes to Gamedev is: It depends. But just throwing that out there, because it often does impact the decision of so many developers, gaming and otherwise.
5 hours ago, RidiculousName said:Python, and JavaScript are all interpreted languages
I can't speak for Python, but I think JavaScript is a little more murky on the subject especially depending on the browser you're using. However, I am not an expert in either language so someone else might be able to clear that up.
I've been programming for 32 years, mostly in scripting languages, including BASIC, sed, awk, PERL, Python, PHP and JavaScript (with my non-scripting experience being assembly language for microcontrollers), but the one language I could most recommend for someone starting out in programming, who is aiming to end up in game development, would be Lua.
It is both a very clean and simple language that makes it easy to learn programming in, and also very widely used in game development, precisely because its simplicity makes it usable by those less familiar with coding, like level and UI designers.
You'll find it used extensively in the UI code of games like WoW, Rift and Wildstar - all of which also let players can make addons to modify the UI themselves - and the gameplay code of games like Warframe, Vermitide, and Vermintide 2 (both of which use the sadly discontinued Stingray engine from Autodesk). Vermintide 2 is supposed to be getting official modding support that will probably use Lua, and Vermintide had a number of player mods that used Lua code.
I wouldn't recommend taking on a huge project on which to learn programming. It's better to set yourself smaller tasks, and build up to the big things.
Fortunately Lua also gives you loads of ways to start learning programming, all of which are related to games.
- There's the Minecraft mod ComputerCraft, where you can use Lua code to control a 'turtle' mining/building bot (I could think of no better way of teaching an introduction to programming in schools, than by giving students access to this, and just letting them get on with it).
- Next we have the already mentioned UI addons for MMORPG games, which give you a step up from ComputerCraft to something you can actually make use of in game development (for example, one of the players writing addons for FireFall was actually hired to work on the game's UI).
WoW addons would probably be the easiest to make, as the game's Starter Edition can be played for free, its addon API is very well documented, and there are thousands of addons at curse.com, the code of which you can read to learn from (As older programmers who were kids when the first Star Wars film came out might say, when advising those wanting to learn programming, 'Use the source'). Addons can range from the very simple, to complete redesigns of how the UI looks and functions (and if you're playing Starter Edition, you might want to use an addon I wrote).
- Lastly, there are frameworks for making games using Lua for the gameplay, and much of the other code, such as LÖVE for 2D games, and Polycode for basic 3D.
If you do decide to learn Lua, make sure to start by getting a hard-copy of the PIL book.
On 4/18/2018 at 2:10 AM, RidiculousName said:JavaScript
Someone with actual knowledge of this language, correct me if I'm wrong, but I believe this could be the most portable of all the languages listed. Portable means that programs made with it are more easily made to work with different operating systems. I don't know if it is used with any game creation software, but I think I've heard it's used with at least one.
I would say yes. Javascript runs on anything with a browser, which probably beats the 3 billion devices running Java.
I'd add a couple of benefits to Javascript:
- You can upload your game to Github pages for free and send the link to your friends, and they can play the game without having to install anything or run an executable, which makes it hundred times more likely that they will actually try your game.
- You can use HTML and CSS to create the user interface. While HTML and CSS are not perfect, they are by far better than any GUI library that I've ever used.
A great framework to start building games in Javascript is Phaser.