• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

Gravak - Play Tibia 7.4 in your Browser

The last thing I was doing yesterday was working on the quest log. Now it's New Year's in Brazil, and then the holidays end, so I'll take a break from updates.
I'll be opening the repository soon. I hope someone else will play around and enjoy contributing to it. It's cool.

1767218441869.webp
 
Even frontend is pure JS instead of Wasm. It really is ironic...

e comparison isn't quite apples to apples.

Launcher vs Game Engine: A launcher is a native desktop application that needs to handle system-level operations (file management, updates, process spawning). For that use case, Tauri/Rust provides a smaller binary, better memory footprint, and native performance - all important for something that runs alongside your game. Electron bundles an entire Chromium instance just to show a download button.

Why Node.js for the server? Because for a game server, the bottleneck isn't CPU-bound computation - it's I/O operations (network packets, database queries, real-time connections). Node.js excels at this with its event-driven, non-blocking architecture. It's the same reason Discord, Trello, and many real-time applications use it.

Why vanilla JS on the frontend instead of Wasm? Because the rendering is done via HTML5 Canvas, which is already hardware-accelerated. WebAssembly shines when you need heavy computation (physics engines, video encoding). For a 2D sprite-based game with tile rendering, vanilla JS performs just fine at 60fps. Adding Wasm would introduce complexity without meaningful performance gains for this specific use case.

It's not about "Rust good, JS bad" - it's about choosing the right tool for each specific problem.
Just to remind you, this was an existing project; I wasn't going to redo it because there's no need.
 
Last edited by a moderator:
GPT forgot to include "Game Engine" part in that comparison 😂 AIs are also sycophantic and will always tell you that what you are doing is the best solution ever.

Sure, dismiss it as AI. But can you actually counter any of the technical points? I'll wait. 🍿
That's the point I made in the original thread. It's a valid technical criticism regardless of what I use for my own projects.
As for Node.js being "wrong" for game servers - feel free to explain why. I'm genuinely curious about the technical reasoning, not just "lol JS bad".
You're welcome to check the repo and point out actual performance bottlenecks. That would be more useful than memes. 😉
 
But can you actually counter any of the technical points?
Are you asking if Games need any optimization? Are you kidding me? Do you know what kondrah and mehah had to do with OTC to make it optimized? And that's with freaking C++.

For a 2D sprite-based game with tile rendering, vanilla JS performs just fine at 60fps. Adding Wasm would introduce complexity without meaningful performance gains for this specific use case.
This is the dumbest statement ever. Performs just fine at 60fps? What kind of argument is this. Everything performs just fine at 60fps. First you have to achieve 60fps on many different hardware, not just top-shelf PC.
 
Are you asking if Games need any optimization? Are you kidding me? Do you know what kondrah and mehah had to do with OTC to make it optimized? And that's with freaking C++.


This is the dumbest statement ever. Performs just fine at 60fps? What kind of argument is this. Everything performs just fine at 60fps. First you have to achieve 60fps on many different hardware, not just top-shelf PC.

Fair points, let me address them:

About OTC optimization: Yes, kondrah and mehah did incredible work optimizing OTC. But that's a native client that handles everything - rendering, networking, file I/O, memory management. My project is browser-based by design, which means:

  • Rendering is delegated to the browser's Canvas API (GPU-accelerated)
  • Memory management is handled by V8's garbage collector
  • Different trade-offs, different challenges
"60fps on any hardware": You're right, that was poorly worded. What I should have said is: for the current scope of the project (a working prototype/proof of concept), vanilla JS meets the performance requirements. Would Wasm help scale to lower-end devices? Probably yes. Is it a priority right now? No - the focus is on getting features working first.

This is an open-source hobby project, not a production-ready game engine competing with OTC. If someone wants to contribute Wasm optimizations, PRs are welcome. But criticizing a WIP project for not being as optimized as a decade-old C++ client maintained by multiple developers seems a bit unfair.

I never claimed this was the "best solution ever" - just that it works for what it is.
 
i would look in maybe using PIXI.js for the rendering engine, I've achieved better results using it than HTML:1767698218010.webp
 

Attachments

  • 1767698192239.webp
    1767698192239.webp
    658.3 KB · Views: 58 · VirusTotal
What? Pixi is not a rendering engine. It still uses Canvas, which uses WebGL.
I did't say PIXI is a rendering engine, I said you could use it for the project as the "rendering engine". It only uses Canvas if WebGL is not available.
 
I did't say PIXI is a rendering engine, I said you could use it for the project as the "rendering engine". It only uses Canvas if WebGL is not available.
WebGL and WebGPU both use canvas to present the frames. I actually made a mistake when saying that Pixi.js is not rendering engine, for some reason my brain was thinking about Graphics API (like WebGL and WebGPU).
 
@Pedrook
Have you heard of Bun? They say it's much faster.
Would this client be viable for Bun?
That's server side and can replace Node.js, but nothing to do with front-end (so the client).
 
lol indie alternative projects are so fun but they all meet the raw reality that maintaining something brand new is just a nightmare, great effort tho
 
Back
Top