Advertisement

What should I learn first

Started by January 04, 2020 02:16 PM
16 comments, last by jomodev 4 years, 10 months ago

People tell me about Lua, I read about it, but never in my 30 years of programming did I need it. I used C++, but jumped to C# when version 2 came out. C++ was great for working along books explaining OOP. I was young and I had the time. I like bare metal. Would absolutely go with C# for game ideas. There is even a slight chance of it beeing portal, with xamarin and mono.

Advertisement

No I do not have any. I have not looked into LÖVE, but I guess it is still the fastest way to create small games. OOP was alle the hype back in the day. In modern C# they do not force you to use it anymore (I think). No class program with method main. Just function main, or so? I must admit I do only ASP.NET and use the templates. I dunno why there is any funtion. I mean in JS in the browser I can just script right away. Anyhow: Do not use a dated tutorial and you should be fine. I mean, there should be plenty of material on the unity website. No need to learn any strange feature you will never need. C# is fat.

I just want to say: Avoid C++ (even fatter) if your goal is making games.

Just looked up on wikipedia. What is wrong with LÖVE? Are you looking for 3d?

Oh typing maybe the issure. C# has types. For browsers I use TypeScript.

Lua is a very minimalistic language. Easy to learn, but it does several things differently than many other (main stream) languages, so I am not sure I would recommend it for learning serious programming.

A popular alternative is Python, mostly at the same level as Lua, but it is a much much richer language, so you don't get the “everything is table” convoluted minimalistic approach that Lua uses. (Very useful for a research language like Lua, imho less useful to understand programming in the practical sense.) Python is a very well designed language, with a large and friendly user-base and excellent documentation.

From Lua and Python towards compiled languages you then get Java and C#, very similar to each other. They also share a lot of ideas with Lua and Python. The biggest difference is that you have to state more precisely what you're doing and what type of data you're going to use. You need more lines to describe the program compared to Lua and Python and you have less flexibility in coding (ie more rules to follow). The advantage that you get is type correctness before you run the code, and better performance.

All 4 languages do a lot to help you do things right. They try to steer you in the right direction, give nice readable stack-dumps when the program fails, and generally avoid crashing the entire computer.

The cost of that is speed. If you want the option of ultimate speed (up to what the computer can give you), there is C and C++. These languages sacrifice everything for performance. No help for you, the languages assume you know what you're doing and know how to make it work fast for your problem. It's designed not to be in the way when you do “weird” things, giving you full control over what happens (and what doesn't). This makes much smarter decisions possible by a smart author, but also doesn't prevent you from shooting yourself in your foot if you are less smart currently. For this reason, C and C++ are named “bare metal” languages, you get direct raw access to everything.

You can start with C or C++ but it's going to be a long, non-fun, and very bumpy ride. A gentler but still quite strict language is Java or C#, with C# being dominant here as it is connected to the popular Unity engine. Python, like Lua, is even more free and forgiving, requiring less time ahead to decide what to program, encouraging a more try-and-see approach.

As for “learn programming” vs “making a game”, these things are different. With the former you learn how you tell a computer what to do for you. It's a core skill for computer software. The latter is about getting results, something you can show to others. Unity (and any other game engine for that matter) does the latter by providing standard building blocks that you compose and configure.

Both are fine choices, in fact, you don't even have to choose, you can do some mix of both. In the long run however, you'll find that standard building blocks become limiting. The only way to go beyond that is to learn programming, and change the building blocks or make new ones to your liking.

Advertisement

arnero said:

No I do not have any. I have not looked into LÖVE, but I guess it is still the fastest way to create small games. OOP was alle the hype back in the day. In modern C# they do not force you to use it anymore (I think).

I just want to say: Avoid C++ (even fatter) if your goal is making games.

As far as I have seen, C# is considered an Object Oriented Programming Language. I don't think I have seen an example that did not use classes. However, C++ is not an Object Oriented Programming language but does support OOP features.

If one is serious about getting into Game Programming, then C++ would be a valuable tool to have in your tool belt especially if you are looking for cross platform support and for performance. If you are focusing on Unity, then perhaps C# would a good one to focus on, but with Unreal Engine you would be better served with C++.

If you are just starting out, you may want to look at PyGame or SDL if your intention is to be a Game Programmer.

This topic is closed to new replies.

Advertisement