Do I understand Godot correctly? I think:
A game which has been made with Godot, can be easily changed from an offline/local version to a server-client version. (By changing the GUI to HTML5, right?)
Can someone confirm this?
Greetings
Peter
drummyfish {l Wrote}:What you're talking about sounds like game streaming which e.g. NVidia tried already -- the game runs on their server and basically just sends rendered images to the client, the client just sends the input. It's a horrible idea in terms of latency, bandwidth, as well as freedom (you own nothing of the game, the game is just a sevice) and bloat. I don't recommend it.
Some things to consider using this netowrking-based approach: first, you have to decide how much of your game logic can be pushed to the clients. There are basically two edge cases here:PeterX {l Wrote}:But think of a text-based turn-based strategy game which has a form where you can enter numbers (production, troops, etc.) There the main "functionality"/code is on the server side. Or?
Nope, but they should. The reason is simple: sending the user input to the server and waiting for a response introduces latency which kills performance. If more computation happens on the clients, user input is processed in place, then the result is immediate, no network latency involved (but then you'll have to approximate or predict on each client what other players do, and correct it when they receive the latest actual data from the server).freem {l Wrote}:Fast paced games do not have to run everything on clients
The part about cheating is true. If game logic happens on the clients, then there's a chance a client might be hacked to cheat. That's one of the reasons why I said pushing game logic to the clients is harder to implement.freem {l Wrote}:should avoid it as it allows clients to easily cheat (wall hacks)
But this one isn't true. It doesn't matter where the bots are handled, it does not make implementing AI more difficult (but other factors make it more difficult to implement more on client side, just not the AI part). Also players must use an up-to-date client no matter what. Both the clients and the server must speak the latest protocol, otherwise there will be incompatibility problems, they won't understand each other.freem {l Wrote}:This also prevents modifying stuff easily, like in red-eclipse where bots are ran by clients, which prevents AI improvements to land without a new release (and implies that old clients impact on that).
Again, not true. Take for example Minetest, which pushes as much as possible to the clients, yet it is highly moddable.freem {l Wrote}:When doing client-server, you might think before hand about how much stuff should be moddable.
The scripting language itself doesn't matter, it's the interface that determines how much can be modded in a game. For example, if there's no plugin interface to change the map, then no matter if you use QuakeC, NaCl, WASM whatever, your mods won't be able to destroy the scene (like in Xonotic). And vice versa, if you provide an API to change the map, then it doesn't matter how that's called (what ABI your mods use), you'll be able to change the scene (like in Scorched3D or any voxel game).freem {l Wrote}:Red-eclipse uses a script lang, which is largely insufficient for any serious modding.
Excuse me, what "limitations of C" are you talking about? There are no such thing, people use C for literally everything, from embedded bare-metal, driver and kernel programming to high level user applications like SDL games. It is the most portable language ever created.freem {l Wrote}:Xonotic uses QuakeC, which limits people to an old C variant which never was standard: needs to cope with the limitations of C
Again, these are just ABI implementation details, they won't change the API. If you hope that using a different language or bytecode interpreter would solve your issue then you're on the wrong path. It might give you better performance on the clients, but that's all.freem {l Wrote}:Unvanquished, which does not sends all data to all clients and do the calculations server-side (while clients have enough info to predict some stuff) uses google-nacl, which replaces quakeC, and is hoped to be replaced by WASM.
Neither does other languages, like QuakeC. Again, it does not matter what kind of ABI you use, it's the API that limits your modding capability.freem {l Wrote}:From the few researches done on it, WASM does not limits the technologies to write code
On the contrary. WASM forces you to use JS when run in a browser (using the emscripten ABI). It is true that WASM could be used outside of the browser (using a different ABI and API called WASI), but that's fundamentally incompatible with everything you'd normally associate with WebAssembly.freem {l Wrote}:it notably does not forces one to use JS or HTML5
Yep, but as I've said it's a little bit more complicated than that, because the WASM has multiple competing ABI standards.freem {l Wrote}:but you do need an engine able to understand it, and a toolchain able to generate WASM binaries.
Nope, but they should
But this one isn't true. It doesn't matter where the bots are handled, it does not make implementing AI more difficult
Again, not true. Take for example Minetest, which pushes as much as possible to the clients, yet it is highly moddable.
Excuse me, what "limitations of C" are you talking about? There are no such thing, people use C for literally everything, from embedded bare-metal
...
Some languages are easier to use than others, but it's never the language that might limit you.
Neither does other languages, like QuakeC. Again, it does not matter what kind of ABI you use, it's the API that limits your modding capability.
If you hope that using a different language or bytecode interpreter would solve your issue then you're on the wrong path. It might give you better performance on the clients, but that's all.
Simply put: if you compile your WASM code for WASI, then you won't be able to run it in a browser.
Yep, but as I've said it's a little bit more complicated than that, because the WASM has multiple competing ABI standards.
Here's a good, easily embeddable WASM interpreter written in C.
As I've said, implementing the AI isn't more difficult. But implementing other things (like anti-cheating) is.freem {l Wrote}:It does make them more difficult to implement if you do not want to make it easy for players to cheat
Nope, one could always use "the server is always authentic" paradigm, and eliminate the need of sync entirely. It might result in glitches if the client's approximation and the true game state diverges, that's why it's not used often, but possible. (Although pretty common in fast paced games like xonotic because there state updates are sent and received frequently, so even if the approximation diverges, that bad data is not used for long, as a new update packet arrives pretty soon.)freem {l Wrote}:One of the things one have to check when game is moddable and runs logic on clients is notably to check that the clients are all in sync (compatible API).
Depends on the game, as I've said. I've given two edge case examples, one where all game logic is on the server, the client is just basically for rendering, and another one where all the game logic is on the clients, and server is just used for state sync. This depends entirely on what kind of game you're designing.freem {l Wrote}:You say "as much as possible", do you know which parts are not pushed on clients?
Considering that I can easily compile 30 and 40 years old ANSI C code with the latest compiler without any probs, I would argue otherwise. I cannot say that about Python, Rust, Go, Java, Javascript, etc. or about any so called "modern" language. (Yes, there could be issues with some non-standard compiler specific C extensions, but those are not related to the core language.)freem {l Wrote}:The limitations of C are not from performance or possibilty perspectives, but from maintenance ones.
Neither are other languages. Any average C++ code is full of memory errors, but I could mention Cyberpunk 2077 too as an outstanding example for bugs. And Rust's approach introduces more problems than solutions. I haven't seen any useful data structure (like graph, double linked list, etc.) implementation in Rust which isn't using "unsafe" all the time, essentially turning off all the "resource protection" because it's just not working.freem {l Wrote}:About proven facts, there's one about the fact C is not very helpful to avoid resource-related bugs (resource might be memory, connections to remote machine, etc).
There's a need for testing and debugging, no matter the language used.freem {l Wrote}:Yes, skilled C programmers will avoid many of the pitfalls, but they won't avoid all of them.
I'd argue that's not true. They just introduce different kind of problems.freem {l Wrote}:What other languages can provide is not avoiding those problems neither, but to make it easier to get their number lower.
There are plenty of ready-to-use compilers and interpreters, pick one. Lua is very popular because it's easy to integrate.freem {l Wrote}:The language itself does not limits people, technically, as you can always write an interpreter or a compiler (as long as you have the specs) but this is in practice a limitation, because doing that would require tremendous amount of time that would not be spent on the real project.
Again, you're mixing languages with the API. And yes, Win32 API limits you big time, have you ever tried to implement POSIX fork atop of it? Almost impossible...freem {l Wrote}:This depends on the issue we're talking about. You name yourself the performance issue, but there's also the maintenance issue, the portability issue, or the fact that restricting oneself to i.e. quakeC (xonotic's case) can be a problem from a human PoV (because one have to learn the subtleties of this C variant, in this case).If you hope that using a different language or bytecode interpreter would solve your issue then you're on the wrong path. It might give you better performance on the clients, but that's all.
For example, one could say using Win32 API is not going to limit you
On that we agree. But it's not 2G, rather 512M per tab, and what's more irritating to me is that you must provide Javascript wrappers for all WASM functionality, which kills performance big time, and unavoidably inherits all the limitations of Javascript. You just can't do lots of things, like using an UDP socket or listing files in a directory on the computer for example.freem {l Wrote}:And running everything in a browser is a pretty ugly idea, as it means your game won't run with less than 2 gigabytes of RAM, roughly, and this, in 2022. In 2025, it might become 5Gigs, or more.
Users browsing this forum: No registered users and 1 guest