Visuals means you look closer / a few seconds longer. Bad visuals = people skip immediately. Good visuals = you have the chance to catch people with your gameplay hook. But if the hook doesn't come, visuals alone don't capture, either.
Why do you even give this a single thought? Players WILL cheat.
So what? unless your game is a completive multiplayer game with matchmaking, its completely irrelevant. 95% of the players (or more) won't cheat, and if they are not in any way influenced by those who do, why bother thinking about it at all?
Flash was a security nightmare, and HTML5 / JS took over. Browsers finally dropped support for Flash because they couldn't patch the holes in it fast enough.
The Flash game of the past is now just JS or WASM.
It will confidently tell you 100% bullshit and tell you its true. And unless you have actually learned the stuff properly, you will not catch that to challenge it.
LLMs / ChatGPT is a great tool when you know how to use it. For topics you know nothing about, its disastrous.
If you are already an experienced programmer, then using AI is great and makes you faster.
However, it makes gross mistakes and does cargo-cult programming. You need to critically question everything it does. Its NOT a good learning tool at all. You will learn how to code like an AI if you simply parrot what it does. Thats not highly skilled work, thats work you can buy cheaper overseas. if you want to become a proficient programmer worth your money, take the time to learn properly.
Structural Sharing is nothing but a fancy new name for a shallow copy. Which works well if you have tree-like data structures where you can share the lower parts freely. But its not unique to FP, either, no? Which is kinda what I said with encoding the delta more smartly. And honestly, it feels like a term peddled by very few people as something new thats not actually new.
But, you know for sure the Decorator pattern, right? You create classes that implement the same interface, wrap one class around the other, ... With FP the decorator pattern is basically invoking a function from within another function
You now you do not need decorators to do this, right? OOP classes allow the same things with interfaces, and as I said, they usually have adopted stuff like lambdas to make it even easier to deal with.
I really don't get your obsession with the decorator pattern. You later mention it again in your last paragraph, but I don't see why you single it out.
Funny enough, JavaScript is not a functional language. Its an OOP one with prototype-based inheritance.
Have you ever looked into Data-driven design and data-driven programming? It seems to me you are much more in line with that.
For me, one of the big things I usually enjoy about functional languages is that most of them are not only statically typed, but also have quite strong type systems. JavaScript having no types at all is kind of antithetical to that. I'd have expected someone who is FP advocate to have used at least TypeScript.
I guess we have different takes on what makes FP great and where it shines. For me, the blend between OOP and FP is where the sweet spot is. Using OOP concepts to reason about nouns and FP concepts to reason about verbs. This allows for quite a natural modelling in most situations. Looking at your code, I have the feeling it looks forced to make a point. Which is fine for a tech demo, but not something I'd be looking for to get actual work done.
Are people seriously having this argument? I highly doubt seasoned developers actually see this as the argument. When we talk about which paradigm we wanna use, we are usually interested in developer efficiency. How easy is it to express my thoughts? How easy is it for someone else to read this and understand whats going on?
If you have ever done stuff like writing a web server or IRC client in Haskell, you know that Haskell is beautiful. And terse. And that the next day, you look at your own frigging code and its a riddle to solve. And I am not even talking about code from someone else, written two years ago, or both.
Modern languages like C# and Java incorporate aspects of both by now. They have their roots in OOP, but take in functional bits where these make it easier to express thoughts. lambda functions for example are excellent when we need to talk about actions. Or filters. Or transformations. Or comparisons. OOP works well when we talk about nouns. It does so badly when we talk about verbs. By going multi-paradigm, these languages allow us to talk about verbs / actions more easily, more concise.
Now with that out of the way, lets look at what you wrote. If you have a single source of truth, and your whole app state is one big objects, and EVERY object is immutable, then the only way to advance the app state is to create a copy of the WHOLE app state. That clashes with your claim to efficiency. So either its not efficient, or not truly immutable, or not the whole app state is one big objects. The three things cannot be true at the same time.
All of the perks you listed are available to OOP as well if you follow a principled approach to programming. They are not exclusive to FP.
And neither are they always true in FP. They require principled programming as well. What you wrote as predictability is pure functions. Well, with only pure functions, there is only so much you can do. Most of FP is not, in fact, side-effect free. That would be utterly limiting. You couldn't even have a PRNG.
Pure functions are trivial to test, yes. But they also exist in OOP. So thats not the argument you think its is, either.
I don't buy your argument wrt. composability. There are many OOP architecture that make composition a breeze. And in OOP, you can compose functions as well -- so thats not the only advantage of FP, either.
Your argument wrt. Debuggability doesn't fly, either. Which goes back to my first point. You can have your whole app state as one immutable object. But thats not going to be efficient. Imagine your game takes up the whole RAM. Are you really gonna swap the whole RAM to render the next frame? I highly doubt it. You are going to record the delta smartly and record it in order to go back and forth. And that technique is available for OOP as well.
"Flexibility: You can add new properties to game objects on the fly; no rigid classes are needed." You should look into composition. And you even mentioned Entity-Component Systems. Which are data-driven, but OOP nonetheless.
I feel like you misunderstand OOP for always being limited to inheritance, and inheritance only. While most seasoned developers prefer composition over inheritance and advise against deep inheritance chains.
AAA isn't necessarily photorealistic graphics. You can have an AAA game with stylized graphics. It requires the graphics to be polished, it doesn't require a specific art direction (and photrealism is only ONE choice).
So whats your original problem? What does " Our primary task at the moment was to be able to store data about 2D shapes inputed by controller API which can get this data from other part of application’s computation or from user." mean? What kind of inputs do you see and what do you want to do with them that you embarked on this whole journey? I am not really sure I understand what all of this is about, why you investigated this in the first place.
There are a lot of shapes that are not curves that can be represented compactly and efficiently. Rectangles, Squares, Triangles. etc. How do those fit into what you are doing?
And finally, I don't really understand why you embarked on this in the first place? What was your original motivation to consider NURBS for everything? What practical problem did you have that you thought you'd solve by doing this instead of sticking to the tired and true stuff, that you had to painfully rediscover?
The world is just so fucked up at the moment, and the media is more concentrated and sowing hatred and division and amplfyfying each bad political story that genuine good news gets completely drowned out. It doesn't get enough clicks. Hatred is more profitable...
The one is to showcase your gme to others devs to find talented people to work with. I can kinda see how such a specialized platform might be sucessful.
But you also talk about publicity/engagement and "getting attention to your game on existing platforms (e.g. also this subreddit)". Thats marketing, right? Whats the target audience and goal here? Because if its about finding players, then I wonder how you wanna pull that off.
If you are worried about disk failure, buy a second disk.
But honestly? Your computer is a tool. Wear and tear happens. You don't stop driving your car, either.
Realise that most programming involves a lot of reading documentation.
You reinvented ECS, just worse.
You only notice how ridiculous the grind is if you are in the endgame.
And then you always think it will pay off. that the gratification will come. because there is always a carrot dangling.
Until you finally admit that you have been played and its just a shitty grind.
At that point, you are at 260 hours and make the review.
Visuals means you look closer / a few seconds longer. Bad visuals = people skip immediately. Good visuals = you have the chance to catch people with your gameplay hook. But if the hook doesn't come, visuals alone don't capture, either.
CAP theorem
Two generals problem
Fort starters, don't include ChatGPT in your trailer, and don't let it write your reddit posts for you.
Why do you even give this a single thought? Players WILL cheat.
So what? unless your game is a completive multiplayer game with matchmaking, its completely irrelevant. 95% of the players (or more) won't cheat, and if they are not in any way influenced by those who do, why bother thinking about it at all?
Flash was a security nightmare, and HTML5 / JS took over. Browsers finally dropped support for Flash because they couldn't patch the holes in it fast enough.
The Flash game of the past is now just JS or WASM.
Learn to code. Its a tool you need every day with a comp sci degree. Yes, comp sci is not about coding, but coding is still an essential tool.
It will confidently tell you 100% bullshit and tell you its true. And unless you have actually learned the stuff properly, you will not catch that to challenge it.
LLMs / ChatGPT is a great tool when you know how to use it. For topics you know nothing about, its disastrous.
Why does a component handle anything? Thats the role of a system. Components are data.
If you are already an experienced programmer, then using AI is great and makes you faster.
However, it makes gross mistakes and does cargo-cult programming. You need to critically question everything it does. Its NOT a good learning tool at all. You will learn how to code like an AI if you simply parrot what it does. Thats not highly skilled work, thats work you can buy cheaper overseas. if you want to become a proficient programmer worth your money, take the time to learn properly.
Srvers are cheap nowadays.wh, cant you re t some for testing?
Structural Sharing is nothing but a fancy new name for a shallow copy. Which works well if you have tree-like data structures where you can share the lower parts freely. But its not unique to FP, either, no? Which is kinda what I said with encoding the delta more smartly. And honestly, it feels like a term peddled by very few people as something new thats not actually new.
You now you do not need decorators to do this, right? OOP classes allow the same things with interfaces, and as I said, they usually have adopted stuff like lambdas to make it even easier to deal with.
I really don't get your obsession with the decorator pattern. You later mention it again in your last paragraph, but I don't see why you single it out.
Funny enough, JavaScript is not a functional language. Its an OOP one with prototype-based inheritance.
Have you ever looked into Data-driven design and data-driven programming? It seems to me you are much more in line with that.
For me, one of the big things I usually enjoy about functional languages is that most of them are not only statically typed, but also have quite strong type systems. JavaScript having no types at all is kind of antithetical to that. I'd have expected someone who is FP advocate to have used at least TypeScript.
I guess we have different takes on what makes FP great and where it shines. For me, the blend between OOP and FP is where the sweet spot is. Using OOP concepts to reason about nouns and FP concepts to reason about verbs. This allows for quite a natural modelling in most situations. Looking at your code, I have the feeling it looks forced to make a point. Which is fine for a tech demo, but not something I'd be looking for to get actual work done.
"Duh, because OOP is more performant."
Are people seriously having this argument? I highly doubt seasoned developers actually see this as the argument. When we talk about which paradigm we wanna use, we are usually interested in developer efficiency. How easy is it to express my thoughts? How easy is it for someone else to read this and understand whats going on?
If you have ever done stuff like writing a web server or IRC client in Haskell, you know that Haskell is beautiful. And terse. And that the next day, you look at your own frigging code and its a riddle to solve. And I am not even talking about code from someone else, written two years ago, or both.
Modern languages like C# and Java incorporate aspects of both by now. They have their roots in OOP, but take in functional bits where these make it easier to express thoughts. lambda functions for example are excellent when we need to talk about actions. Or filters. Or transformations. Or comparisons. OOP works well when we talk about nouns. It does so badly when we talk about verbs. By going multi-paradigm, these languages allow us to talk about verbs / actions more easily, more concise.
Now with that out of the way, lets look at what you wrote. If you have a single source of truth, and your whole app state is one big objects, and EVERY object is immutable, then the only way to advance the app state is to create a copy of the WHOLE app state. That clashes with your claim to efficiency. So either its not efficient, or not truly immutable, or not the whole app state is one big objects. The three things cannot be true at the same time.
All of the perks you listed are available to OOP as well if you follow a principled approach to programming. They are not exclusive to FP.
And neither are they always true in FP. They require principled programming as well. What you wrote as predictability is pure functions. Well, with only pure functions, there is only so much you can do. Most of FP is not, in fact, side-effect free. That would be utterly limiting. You couldn't even have a PRNG.
Pure functions are trivial to test, yes. But they also exist in OOP. So thats not the argument you think its is, either.
I don't buy your argument wrt. composability. There are many OOP architecture that make composition a breeze. And in OOP, you can compose functions as well -- so thats not the only advantage of FP, either.
Your argument wrt. Debuggability doesn't fly, either. Which goes back to my first point. You can have your whole app state as one immutable object. But thats not going to be efficient. Imagine your game takes up the whole RAM. Are you really gonna swap the whole RAM to render the next frame? I highly doubt it. You are going to record the delta smartly and record it in order to go back and forth. And that technique is available for OOP as well.
"Flexibility: You can add new properties to game objects on the fly; no rigid classes are needed." You should look into composition. And you even mentioned Entity-Component Systems. Which are data-driven, but OOP nonetheless.
I feel like you misunderstand OOP for always being limited to inheritance, and inheritance only. While most seasoned developers prefer composition over inheritance and advise against deep inheritance chains.
2D Games? Godot.
"The ability to speak does not make you intelligent." -- George Lucas
AAA isn't necessarily photorealistic graphics. You can have an AAA game with stylized graphics. It requires the graphics to be polished, it doesn't require a specific art direction (and photrealism is only ONE choice).
Depends on how much money you have. CryEngine, FrostBite, Source2, ...
So whats your original problem? What does " Our primary task at the moment was to be able to store data about 2D shapes inputed by controller API which can get this data from other part of application’s computation or from user." mean? What kind of inputs do you see and what do you want to do with them that you embarked on this whole journey? I am not really sure I understand what all of this is about, why you investigated this in the first place.
There are a lot of shapes that are not curves that can be represented compactly and efficiently. Rectangles, Squares, Triangles. etc. How do those fit into what you are doing?
And finally, I don't really understand why you embarked on this in the first place? What was your original motivation to consider NURBS for everything? What practical problem did you have that you thought you'd solve by doing this instead of sticking to the tired and true stuff, that you had to painfully rediscover?
It happened y few years ago and it WAS news.
The world is just so fucked up at the moment, and the media is more concentrated and sowing hatred and division and amplfyfying each bad political story that genuine good news gets completely drowned out. It doesn't get enough clicks. Hatred is more profitable...
What would be your goal with that?
You kind of present two very different ideas.
The one is to showcase your gme to others devs to find talented people to work with. I can kinda see how such a specialized platform might be sucessful.
But you also talk about publicity/engagement and "getting attention to your game on existing platforms (e.g. also this subreddit)". Thats marketing, right? Whats the target audience and goal here? Because if its about finding players, then I wonder how you wanna pull that off.