Skip to content

Should i learn Java, Lua, or a C based language?

I always wanted to be a game developer, and recently i finished some programming logics classes, and i think im ready to learn a real programming language.

Java: I would use as a base for other programming languages and for creating some minecraft mods and simple games

C/C++/C#: I would use as a base for other programming languages and for using unreal or unity

Lua: I would use as a base for other programming languages and for using roblox studio

21 points33 comments
Open on Reddit
About this post
Posted
Archived
Score
21 · 74% up
Kind
Text
ID
1he83mt

Author

1
posts
1
comments
0
media
View profile

43 comments

You should choose an engine or framework to learn, and then this question pretty much answers itself.

I also want to note that C/C++/C# are not interchangeable as you put it here, despite the confusing naming convention. While C and C++ are similar, C# is closer to Java than anything else.

15 points

Yes. To all three. I'd personally swap C# for Java, but both are good.

You're going to want to know C or C++ for the heavy lifting and computational components for speed, Java or C# for the quick development, and Lua or Python for the quick and easy scripting for plugins, mods, or user defined customization.

9 points

Which frameworks are Java based

1 points

And thank you for your question. That led me to checking out your profile, which in turn led me to several interesting subreddits I'm interested in myself. I too dabble with midi instruments.

1 points

Why would we chose Java over c# ? I know some c#, didnt try any Java yet. But would it be easy to use on a linux or macos system ? I would like to ditch every Microsoft related programs/languages...

Is Java faster or the same as c# ?

1 points

It's merely a personal preference, or required language for the toolset of your choice or project requirements. Nothing more. I suggested Java first only because that was what the OP was inquiring about. C# is just a Microsoft Java basically. They are both just as speedy as the other IMHO. If you choose Java, you're beholden to Sun Microsystems/Oracle, if C# you are beholden to Microsoft. Choose your poison, so to speak.

2 points

I'd learn the languages that you need to learn in order to do what you want to do. You don't have to just pick one. After you learn how to code, it's not that difficult to learn other languages.

3 points

I would say C#. It is a great one to start with since it is high level. Additionally, C# is basically just Java, only with more qol, so all your C# skills should transfer to Java pretty well,

2 points

It probably depends on what system you want to develop for. I recently made a game for the Playdate, so I learned Lua (but C was also an option).

You will likely learn many different tech stacks, so there is no one right answer or One Language To Rule Them All. Take a look at what looks interesting to you and go build something. Happy coding!

2 points

I'd do C or C++ and Lua. Once you've learned enough, embed Lua into your C/C++ code. Lua is probably the easiest scripting language to embed.

C# is fairly good but depending on the game you may have problems with the garbage collector that need to be mitigated.

1 points

As someone who started with Java (becuase I wanted to make Minecraft mods), I didn’t feel like I had a clue what I was doing until I learned C (which I followed with C++, C#, then Python).

Here is what I recommend:
Start with hardware. Like learn roughly how the physical components of a computer work. RAM, CPU, etc. At least be able to tell me, roughly, how machine code works. Then spend a bit of time in assembly, learning how to implement various control flow structures like ifs, loops, functions, etc. Once you understand how code itself works, you should start learning C.
I think C is very good to learn early because syntactically, it is a very simple language. You don’t have to spend much time actually learning C, but rather, with C, it becomes much easier to learn programming, that is, how to tell a computer what to do. I think that is one of the largest things missing when people start with high level languages: they think the computer can do whatever they have in their head.
In C, learn how to implement various data structures (like dynamic arrays (vectors)) and some common algorithms, as well as how to emulate OOP principals with structs. Then, you can move on to C++ where the standard contains many of those data structures and algorithms and much of the tedium of OOP with structs is made easier.
After a few projects in C++, you can see how C# further eliminates tedium with things like properties, delegates, and events. (That said, C# isn’t universally a better language than C++, mainly because generics in C# (and Java) are surely inferior to C++’s templates).

1 points

C# on monogame is a great place to start. There are many successful games built this way, like stardew Valley for example. And monogame is low enough that you'll learn core game coding practices without relying on a big engine like UE or Unity.

You could move to Unity or Godot later if you want to.

1 points

I'd also recommend you consider Godot.

I have used unity and c# (minimal experience), but I've been making my game for a few months now in Godot and I'd never look back.

The engine is just really intuitive and well document but of course lacks third party learning resources and plugins compared to unity or unreal. This didn't bother me personally since the engine itself explains each node very well and chatgpt can point you towards what nodes you should look into to complete your goal

The engine uses its own language named gdscript (very similar to python) but also has support for c# if you'd like that (no idea how good the c# implementation is)

C# will give you a good foundation for other languages as you said but I think gdscript can do the same even though its single-purpose for the engine. It has simple syntax like python but you tend to use it in more object-oriented ways since it's used for game development. It's the best of both worlds.

I also want to warn you that since it's newer and more niche than unity or unreal it can have unexpected and odd limitations. In my case I wanted a 3d tilemap (named gridmap in Godot) that uses hexagonal tiles instead of cubes, but Godot gridmaps don't support other shapes.

1 points

I would recommend you to look at this from another pov: what role/job you want to have in the gamedev?

Even for programmers it varies a lot. If in the end you see yourself somewhere around graphics/engine programming - dive into c++, don't waste time on c.

If just a gameplay programmer - then answer what engine you're willing to use? Unreal - c++, Unity - c#, etc.

1 points

As a senior engineer in Java who develops games on the side I'd say go with C# as it'll be a base for both game developement and traditional software development.

1 points

C++ and C# is useful not only in gamedev (unity is light and don't need much of gpu), c++ if you are interested you can use it for arduino (and any other similar hardware unless you go to more advanced stuff like pi which i doubt but if you're curious arduino clones are good for price and don't pay the brand ) too, java, its certainly for modding but do not forget if you want gamedev as job think about health profit and quality

1 points

C# over Java. It's basically the same but better and more relevant (more support, great frameworks like Monogame) I've enjoyed working with it over Java or C++.

C++ cuts closer to the machine code though, and is more of an industry standard iirc.

Enough overlap to just pick one and start learning, can't really go wrong. I started in Java and my switch to C# was a snap.

1 points

What do you want to do with it? If the answer involves making money, you probably want to learn either C# or C++. Those are used by the two biggest engines, and most in-house engines at pro studios are probably going to be built with one of those as well.

If your answer is anything other than "make Minecraft mods for fun" I wouldn't seriously consider Java, and if your answer is anything other than "write mods/scripts for some specific games for fun" or maybe "get a job writing scripted events," I wouldn't seriously consider Lua.

Though if your answer is "improve general programming skills while jumping on a rising trend," you could always learn Rust.

1 points

Start with lua. Not because it's useful but because it's just the easiest to learn and I feel like it'll be less daunting than starting with something like java. And if you manage to learn lua and realize you like programming you're going to naturally find yourself learning other languages for different projects.

1 points

Learn all of them if you want to as that would be best, although you would probably benefit from learning a simple language then work your way to complex, I would Start with lua as its the easiest to get into, then learn c#, then java and c++, probably could do it at the same time since they're quite similar languages, java is more object oriented and c++ the memory management is more manual, then C as it's more for game engine development than game development

1 points

I've made small games in all these languages and tools. Unity and C# are far, far more productive and in demand than all the other options. If you have interest in graphics programming C/C++/Rust are more favorable. If you go with Unity and C# be sure to claim your free JetBrains Rider license.

1 points

For game development it all depends on what your trying to build. If you’re trying to build a small game on like Roblox and that’s all you want to build then Lua would be fine. If you going to go make some big game or something like GTA or COD, C++ is a no brainer you can get away a C# for small games like Firewatch or lethal company because C# is a much slower programming language than C++, but anything big (e.g Call of Duty, Grand Theft Auto, Cyberpunk) you want to use C++.

It also depends what engine you want to use, Unreal Engine uses C++, Unity uses C# and Cryengine uses Lua and C++, but if you need a one language over all to learn it would be C++.

1 points

Yea, these are all good

Lua is great to start off first though, as it’s by far one of the easiest programming languages out there

1 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.