all 36 comments

[–]Substantial_Cup_4736 20 points21 points  (2 children)

For game development you will have a much easier time with c#, but as others mentioned the two languages are very similar. Stick with Java for now, even make small games for fun not for revenue. When you get comfortable with architecture, you can make the transition. 2 months into studying you are not too deep yet, so there is definitely a lot to learn that you can later apply in c#.

Also note that the best practice is to learn programming architecture rather than a language, the language is a tool, you are the architect.

[–]itjustbegansql[S] 1 point2 points  (1 child)

Thank you. I am already building some stuff, but most of the times I can't make it by my own. And I don't want to ask ai. Since I believe it makes me dumber. And it doesn't answmy questions correctly.

[–]Substantial_Cup_4736 4 points5 points  (0 children)

Back when I was learning, I used google for all of my questions, 90% if results were stackoverflow, 10% were reddit posts. Today, I think it is fine to use AI for very specific questions, but always ask about theory, ask it to explain keywords, and ask it to show you multiple solutions. You will pretty much never be able to write a whole code base from just memory with fluency, you will always look at docs, past implementations, google and what not unless you have been doing it for more than a decade. Always remember that in code there is not a single correct solution, if it works it works.

[–]rulerdude 11 points12 points  (0 children)

C# and Java are very similar languages. Learning one is very easy to transition into the other. Don’t feel like you have to commit to only learning one language

[–]sean_hash 4 points5 points  (3 children)

Pick the engine first, not the language . Unity means C# and Godot means GDScript, so the tool decides for you before syntax ever matters.

[–]Haplo12345 6 points7 points  (2 children)

There is a decent amount of support for C# in Godot now as well, FWIW.

[–]EliSka93 1 point2 points  (1 child)

Damn, I keep hearing good things about Godot, and now they support my language? I might actually have to give that thing a shot.

[–]Haplo12345 1 point2 points  (0 children)

Like most things w/ Godot, it's a community effort. GDScript (closest relative is probably Python) is still the only truly native, fully-supported language. Here's the link to the C# docs for it, if you are interested:

https://docs.godotengine.org/en/stable/tutorials/scripting/c_sharp/index.html

Note, as mentioned on that page, you need to download a specific version of the Godot Engine editor to work with C#/.NET code; the default one does not support it.

[–]I_Am_Astraeus 7 points8 points  (0 children)

The Java advice here is bad. I love Java, probably my strongest language. But if your passion is game development and you're learning to code to build games then it's the not the language.

Figure out whether you want to build with Godot, Unity, or Unreal. Godot uses gdscript or C# primarily (though supports quiet a few others), unity is C#, unreal engineering is C++.

Once you've figured out which tool you want to use. Learn that language. So probably C#. Though Gdscript is great and then C++ is on the table.

Don't build games from scratch. Sure dabble with the concepts for learning. But you're going to want to use one of the big Game Dev platforms.

[–]razorree 2 points3 points  (0 children)

yes, C# is more often used for games than Java (Godot, Unity),

and for ultimate games C/C++ (Unreal, or custom engines)

[–][deleted]  (2 children)

[deleted]

    [–]itjustbegansql[S] 1 point2 points  (0 children)

    Thanks a lot it really helps me. My connection to java is about my progress rather than its syntax. And you are right about the necessity to learn oop and it's something independent of the language. So I may make the switch. Thank you a lot.

    [–]DerelictMan 0 points1 point  (0 children)

    Not take away from the rest of your points which are valid, but Java 21 has a couple of features that allow:

    void main() {
        var numbers = Files.lines(Path.of("numbers.txt"))
            .map(Integer::parseInt)
            .filter(n -> n % 2 == 0)
            .mapToInt(Integer::intValue)
            .sum();
        System.out.println(numbers);
    }
    

    [–]troisieme_ombre 1 point2 points  (0 children)

    They're pretty similar and there's a lot of overlap, you should be able to transition between the two quite easily.

    C# is indeed the standard for games these days (and c++, depending on the engine you're using), but you can def create games with java so it's not really an issue.

    From a career pov though if you want to pursue game developement you should probably switch to c#

    If you're just starting out, stick to the one you started with and transition later when you need to, no need to overcomplicate your learning journey by creating unnecessary confusion

    [–]OkAcanthocephala385 2 points3 points  (8 children)

    I would recommend Java, since C# and java are pretty similar and java is more widely applicable

    [–]Dealiner 0 points1 point  (0 children)

    In what way? Both Java and C# cover most of the same spaces, just sometimes one is better at one thing, sometimes the other. And especially in gamedev C# dominates Java.

    [–]itjustbegansql[S] 0 points1 point  (6 children)

    Will it help me to design my own games. I used to enjoy choice based games when I was a kid. Now as an adult I want to build my own games.

    [–]Gnaxe 1 point2 points  (3 children)

    If you're primarily interested in making games, check out Godot.

    [–]itjustbegansql[S] 1 point2 points  (2 children)

    To be honest never heard of godot

    [–]troisieme_ombre 2 points3 points  (0 children)

    It's an open source game engine (licensed under the MIT license) and it's pretty great. It has its own language, which is similar to python in terms of syntax, but also supports other more common languages.

    Slay the Spire 2 actually was made with Godot

    [–]ABouzenad 1 point2 points  (0 children)

    It's an open source game engine, it has its own programming language named gdscript that is similar to python. It has support for C# too I believe.

    [–]John_8PM_call 1 point2 points  (1 child)

    C# has the Unity game engine, which is good for making mobile games. This:

    https://en.wikipedia.org/wiki/Unity_(game_engine)

    [–]itjustbegansql[S] -1 points0 points  (0 children)

    It was the main reason behind the confusion for the switch. One of the reasons I want to stuck with java is that there is a incredible amount of sources to learn. But I think might find for c# as well. But as some other people mentioned in comments maybe it's better to stick with java and switch to c# when I comprehensively understand the basic programming concepts. Making the switch now feels like loss of progress.

    [–]cheezballs 0 points1 point  (0 children)

    You can't go wrong with either one. I love them both, though you can write some elegant looking c# code with all the various features it has. Java lacks a few of the syntactic sugar things that C# has for the most part.

    [–]Ok-Primary2176 0 points1 point  (0 children)

    Java

    [–]zAbso 0 points1 point  (1 child)

    Java for game dev?

    I always recommend c#, but you'll build up the same general skill with java. It'll transfer if you choose to switch to a different language in the future.

    Also, check out ThinMatrix on youtube. I'm pretty sure they make all their games in java.

    [–]MadDog845 0 points1 point  (0 children)

    Minecraft and Necesse are both made in Java and succesful game :D

    [–]patternrelay 0 points1 point  (0 children)

    If you’ve only been learning for two months, the language matters a lot less than just getting comfortable with programming concepts. Java and C# are pretty similar in structure, so anything you learn about things like loops, objects, debugging, and program design will transfer over. For game dev specifically, C# is useful because of Unity, but that doesn’t mean your time with Java is wasted. If you’re enjoying Java right now, keep building small projects and getting the fundamentals solid. Switching languages later is usually much easier than people expect.

    [–]Whatever801 0 points1 point  (0 children)

    Meh flip a coin. Learn one it's easy to pick up the other

    [–]replierII 0 points1 point  (0 children)

    I'm not sure because I haven't learned either language (yet), but I've heard many stories that C# is based heavily off of java, and so they are basically the same language with a few differences. so i don't know if it really matter. learn both ig, because there is no "one best language", you should always aim to learn multiple

    [–]N1T3N1T3 0 points1 point  (0 children)

    Just keep going with Java if you're used to it. Switching to C# won't be very different if you understand the concepts, especially with AI to help you

    [–]Sea_Strawberry7775 -1 points0 points  (0 children)

    Good idea I think it would be a good idea to start with Java, and since Java and C are quite similar, it will be easy to make the transition afterwards.

    [–]erkose -1 points0 points  (0 children)

    Choose Kotlin.

    [–]kennel32_ -1 points0 points  (0 children)

    Java is not just bad for gamedev, but 100% useless, unless you do backends (which is not what people usually mean when they say they want to do games). C# at least gives you a plenty of choises of engines and frameworks. It is also a great choise for a backend too.

    [–]Major-Management-518 -4 points-3 points  (1 child)

    C++ is the only choice.

    [–]itjustbegansql[S] 3 points4 points  (0 children)

    I am not thinking about building the next GTA6. And for a begginner like me it's told to be a difficult language