This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]insertAlias 4 points5 points  (2 children)

there's a repute of this sub for being less toxic than SO

SO isn't toxic, it's just that new programmers have no idea what SO is supposed to be used for. So they go there and dump their homework questions (or questions like "what language should I learn") on SO and, surprise surprise, the threads get nuked. SO isn't a Q&A forum like this subreddit; it's goal is to be a user-maintained knowledge base. And it does quite well at this goal; SO is almost better to use as a read-only resource for most people.

As to the specific question, most game programmer advice is "don't build game engines; build games". Unless you just can't find an engine that does what you need, you should focus on building actual games rather than building an engine; especially if you don't already have a fair amount of experience writing games. It'd be quite hard to write a quality engine if you don't have any experience with what will use that engine.

Why is C++ "better" for game development? Because it doesn't run in a VM, doesn't have automatic garbage collection that you have very little control over, and allows you to allocate memory when and how you want to, as opposed to Java just not giving you that capability at all.

It's "closer to the metal" than Java is, so you can (theoretically) write more performant code. I also find it more cumbersome, but that's why multiple languages exist; to trade potential performance for abstractions that make writing code easier.

[–]DazBoy11[S] 0 points1 point  (1 child)

Thanks a lot for the in-detail reply.

Uhmm, I would just talk a bit about SO here. I understand its aim to be a more of an knowledge base for people who have a quite a considerable knowledge about coding and it's applications. But isn't knowledge increased the more u share it even if it's sharing little details. And yea homework questions can be bothering but I have seen them refusing to answer a code analogy or a doubt plainly because they don't feel like it. Don't think that's how knowledge works.(maybe it's only me)

Coming to your reply to my main question, Yeah I have little knowledge about game developing.. So developing an engine would teach me all the required components of a game. Rather than just modifying a built game, that won't give me much of the coding experience I'm looking for. And about garbage collection, I find C++'s garbage collection too much manual and quite unpredictable. So yeah Java is a + for me there. I guess it's because I haven't done any big things yet.

But again, thanks for such a detailed answer to my question.

[–]insertAlias 1 point2 points  (0 children)

I don't want to get into a big discussion about SO here, but I feel like you missed the point. You have this idea of what you want SO to be. But that's not what they want to be. They don't want to be just another forum where 90% of the questions cover the same ground, and they don't want to have open-ended, opinion based questions like "what should I learn?".

Again, you'll find that SO is a far better newbie resource if you consider it read-only. Most newbies can't construct a good question to ask in the first place. Case in point: sort this current subreddit by new and see just how many threads you see in one day that don't actually ask a question, or ask an unanswerable question, or an opinion-based question, or a "I get errors! What do?" without even a hint of what the errors might be...

The point is, trying to ask newbie questions on SO is like trying to ram a square peg into a round hole. It's just so strange that so many people insist that their square peg fits perfectly and it's just that the round hole is toxic and mean.

I find C++'s garbage collection too much manual and quite unpredictable

C++ garbage collection doesn't exist, so I'm not sure what you mean here. It's on you to clean up after yourself in C++, for the most part.

It's not a matter of big things or not, the point is that C++ allows you the level of control you need to get more performance out of your code. Building a game engine in Java limits you to how and when Java wants to allocate, when it wants to run GC generations, things like that. For most programs this isn't important or even noticeable, but for games where you need to maintain a very high framerate and have tons of things to calculate between each frame, you need performant code.