[-] shy_mia@lemmy.blahaj.zone 2 points 6 hours ago* (last edited 6 hours ago)

Yours is a flawed, extremist view.
How impressive something is has nothing to do with whether or not its source is available. What, if they release it to the public it suddenly becomes impressive?
You can disagree with the method of distribution, but it doesn't affect the quality of the game.

Piracy being a thing isn't a strong argument for open sourcing everything, since the barrier of entry is higher than you may expect for non technical people, a barrier that would definitely be lower if any game was freely available and compilable by anyone. Someone will make a free, one click installer, guaranteed.

Now, can you charge for open source software? Definitely.
Will it generate significant revenue in most circumstances? No.

Open source software relies on two methods for funding:

  • People's good will, through donations
  • Paid enterprise licenses and training

The former isn't something one can stably rely on, the latter just isn't applicable to games.
Again, that model can work for some high profile projects, but in the vast majority of cases, it won't. Especially not for games.

One can make works of passion and still want to be compensated, that's what artists do and games are a form of art. You clearly never had to put food on the table with the art you make.

Your vision of everything being open source is a utopia. A noble idea, for sure, but reality is a cruel mistress.

[-] shy_mia@lemmy.blahaj.zone 1 points 6 hours ago

Just open sourcing the actual engine wouldn't do much. At best, you'd be able to make it work on newer hardware if problems arise, or port it to other OSs. Great stuff, but not enough when it comes to improving the game, preserving multiplayer, and so on.

There's a great amount of scaffolding on top of the base engine that any moderately sized game implements, be it through scripting or native code. That's what I meant by the line between the engine and the game being blurry. If you want to make meaningful changes to the game, you need access to that framework portion, but releasing it would allow for easy reverse engineering of everything else. It's a difficult balance to achieve.

[-] shy_mia@lemmy.blahaj.zone 5 points 15 hours ago

I could see that being a thing, but the line between the engine and the game itself is a bit blurry in this context. Copyrighting just the assets and content would often not be enough. There will always be a good chunk of game code which isn't strictly part of the engine but under this model should remain closed source, otherwise people could just bring their own assets.

Frankly I'd be satisfied with companies open sourcing their games after they stop supporting and/or selling them, mostly for preservation and all that. I think that would be a great middle-ground.

[-] shy_mia@lemmy.blahaj.zone 33 points 16 hours ago* (last edited 15 hours ago)

Ah yes, closed source, such a dealbreaker, as if 99% of the other games weren't.

Don't get me wrong, I have nothing against open source games, it's just not a viable monetization strategy for most projects, and people gotta eat. There's reason why most open source games are either passion projects or old games that have been open sourced simply as an act of kindness towards the community since they generate pretty much no revenue.

[-] shy_mia@lemmy.blahaj.zone 23 points 1 month ago* (last edited 1 month ago)

I've found working with Rust and Bevy to be quite pleasant. If you're used to working with ECS, I suggest you at least give it a go.
Rust is as functional as C++ 20 with ranges and views is, which is to say it isn't. Not sure where you got that impression from, but while it does borrow some ideas from functional languages, it's still very much a procedural one.

Zig doesn't have headers, nor inheritance. Again, not sure where you got that from, but Zig is basically a modern C, so there's no OOP anywhere, let alone multiple inheritance.

As for what to use, I think they're both viable alternatives. I lean more towards Rust, but that's just due to familiarity. Odin also looks like a viable option, if you don't mind a smaller ecosystem.
If you want a garbage collected language, then I'd go for C#. Despite its historic reputation as a Windows only language, it's been cross platform and open source for roughly a decade at this point. I find it great to work with.

[-] shy_mia@lemmy.blahaj.zone 38 points 1 month ago* (last edited 1 month ago)

I've found it's mostly two things: readability (ironically) and performance. I'll describe a few crude examples, but I won't get too much into specifics, otherwise I might as well write another book myself.

The performance part is simple: its excessive reliance on polymorphism and the presence of several levels of abstraction just doesn't allow for good code generation. I've seen 10x+ performance improvements by dropping all of the above, with often minimal loss in readability; on the contrary, oftentimes the code became more readable as well.

The readability part is harder to explain; not only because it depends on the codebase and the problem at hand, but also on the coding style each programmer has (though in my opinion, in that particular case it's the programmer's problem, not the codebase's).
I like to think of codebases as puzzles. To understand a codebase, you need to piece together said puzzle. What I've found with Clean Code codebases is that each piece of the puzzle is itself a smaller puzzle to piece together, which isn't ideal.

Functions

They should be small and do one thing

I generally disagree, not because those ideas are wrong, but because they're often too limiting.
What often happens by following those principles is you end up with a slew of tiny functions scattered around your codebase (or a single file), and you are forced to piece together the behaviour they exhibit when called together. Your code loses locality and, much like with CPU cache locality, your brain has to do extra work to retrieve the information it needs every time it needs to jump somewhere else.
It may work for describing what the code does at a high level, but understanding how it works to make meaningful changes will require a lot more work as a result.

Don't repeat yourself

Once again, it makes sense in principle, but in practice it often creates more problems. I agree that having massive chunks of repeated code is bad, no questions about it, but for smaller chunks it may actually be desirable in some circumstances.
By never repeating code, you end up with functions that are over-parameterized to account for all possible uses and combinations that particular code snippet needs to work with. As a result, that code becomes more complex, and the code that calls it does too, because it requires you to know all the right parameters to pass for it to do the right thing.

Exceptions

Exceptions are just bad. They are a separate, hidden control flow that you constantly need to be wary of.
The name itself is a misnomer in my opinion, because they're rarely exceptional: errors are not just common, but an integral part of software development, and they should be treated as such.
Errors as values are much clearer, because they explicitly show that a function may return an error and that it should be handled.

Classes, interfaces and polymorphism

I have lots of gripes with object orientation. Not everything needs to be an object, not everything needs to be polymorphic. There's no need to have a Base64Decoder, much less an IBase64Decoder or an AbstractBase64Decoder. Base64 only works one way, there are no alternative implementations, a function is enough.

I'm a lot more on the data oriented side of the isle than the OO one, but I digress.
Object orientation can be good in certain contexts, but it's not a silver bullet.

Encapsulation for the sake of it

Let's say you have something like this:

class Point {
	public float X, Y;
}

With the Clean Code approach, it magically becomes:

class Point {
	private float x, y;
	
	public float get_x() {
		return this.x;
	}
	public float get_y() {
		return this.y;
	}
	public void set_x(float x) {
		this.x = x;
	}
	public void set_y(float y) {
		this.y = y;
	}
}

Why? Who the hell knows. It makes absolutely no tangible difference, it only makes your code longer and more verbose. Now, if a value needs validation, sure, but oftentimes this is just done regardless and it drives me insane.

Abstract classes for everything!

  • "You'll never know when you'll need to add another implementation, right?"
  • "You don't need to know the underlying implementation"

The problem with wanting to create the most generalized code in advance is that you end up stuck in abstraction hell.
You may as well not need the ability to have arbitrary implementations, but now you need to plan for that.

Not only that, but it also makes reasoning about your code harder: how many times have you had to step through your code just to figure out what was being executed | just to figure out what particular concrete class was hiding behind an abstract class reference?
I myself, way too many, and there was often no reason for that.

Also, the idea that you shouldn't know about the implementation is crazy to me. Completely encapsulating data and behaviour not only makes you miss out on important optimizations, but often leads to code bloat.

There's more but I'm tired of typing :)

Take a look at these if you want more info or someone else's view on the matter, I wholeheartedly recommend both:

[-] shy_mia@lemmy.blahaj.zone 47 points 1 month ago

You can now review reviews

[-] shy_mia@lemmy.blahaj.zone 61 points 1 month ago

Gotta pad those CEO bonuses somehow!

[-] shy_mia@lemmy.blahaj.zone 83 points 1 month ago

I'm of the opinion that Uncle Bob did some massive damage to software development as a whole with that book.
With that said, this is genuinely funny.

[-] shy_mia@lemmy.blahaj.zone 30 points 1 month ago* (last edited 1 month ago)

Hey there's a word for that! It's called "Child prostitution"!
Doesn't sound quite as reasonable, does it? Not that it ever did.

[-] shy_mia@lemmy.blahaj.zone 21 points 2 months ago

Then you're practically naked

[-] shy_mia@lemmy.blahaj.zone 26 points 2 months ago

You didn't need to post this.

view more: next ›

shy_mia

joined 4 months ago