News for hackers. Stuff that matters.

hpx7

Show HN: Hathora Models โ€“ Voice Model Marketplace

https://models.hathora.dev/

Hey HN, this is Harsh from Hathora.We started as a game server hosting company and are launching a new offering today centered around voice models, leveraging our existing platform that runs game servers.We hope to achieve a few things with this product: 1. Democratized access to a wide variety of open source and licensed voice models 2. Ability to mix and match speech to text, reasoning (llm),...

( Read More... | 1 comment | 6 points | on HN )
Re:The Hidden Complexity of Scaling WebSockets on Friday January 24, 2025 @04:20PM (#42817029)
Horizontal scaling is certainly a challenge. With traditional load balancers, you don't control which instance your clients get routed to, so you end up needing to use message brokers or stateful routing to ensure message broadcasts work correctly with multiple websocket server instances.
Re:Hathora's Bare Metal Journey on Friday March 15, 2024 @07:54PM (#39721941)
Hi HN, I'm the CTO at Hathora and wrote this piece. Happy to answer any questions

Show HN: Building an infinitely scalable multiplayer game

https://bullet-mania.netlify.app/

I cofounded Hathora (https://hathora.dev/) last year and we've been working on making it easier for smaller teams and individual developers to build scalable multiplayer games. We think the serverless model is the simplest approach, allowing you to dynamically provision a new instance of your game server when users or your matchmaker requests a new session.We made this .io style demo to...

( Read More... | 1 comment | 7 points | on HN )
Re:Scalable WebSocket Architecture on Wednesday September 28, 2022 @11:48AM (#33009363)
Hi I'm the author of this blog post and the CTO of Hathora. Happy to answer any questions about how we built our Stateful Router for WebSockets and other persistent connections!
Re:Using WebTransport on Friday September 16, 2022 @03:17PM (#32870747)
WebSockets is built on top of TCP, whereas WebTransport is built on top of UDP. This makes WebTransport better suited for handling latency-sensitive applications like multiplayer games.
Re:Using WebTransport on Friday September 16, 2022 @02:10PM (#32869906)
Does anyone know of any websites/applications that utilize WebTransport? The only thing I've come across are the Showcase demos from https://github.com/yomorun/presencejs

Show HN: Tutorial for making a browser-based multiplayer platformer with Hathora

This tutorial features a fully authoritative server using arcade-physics[0] for physics and collision detection. It uses Phaser for the frontend and Hathora for the backend/multiplayer.The full code is available on Github[1]. I was pretty happy with how minimal the code ended up being, and I hope this can be a useful resource for others interested in building a multiplayer platformer game![0]...

( Read More... | 1 comment | 2 points | on HN )
Re:Cloud Provider Latency Comparison on Thursday August 11, 2022 @01:12PM (#32428842)
Hi HN, I wrote this article because I didn't find much on the internet comparing network performance between cloud providers. I was surprised to see the amount of separation between the top performers and the bottom ones.

We published our benchmarking script on Github[0], I'd love to see results from other geographies and perhaps even other providers like Linode and Hetzner!

[0] https://github.com/hathora/cloud-network-benchmark

Re:Ask HN: Any solo game developers here? on Thursday August 04, 2022 @03:25PM (#32347192)
If you're interested in using web technologies for your game, you may find the framework I've been working on to be interesting: https://docs.hathora.dev/#/

I've had success using it as the backend+networking stack in conjunction with game UI tools like Phaser and Pixi.js.

Re:Ask HN: Any solo game developers here? on Thursday August 04, 2022 @03:20PM (#32347148)
Hi there! I started a company this year focused on multiplayer server infrastructure. We also built a multiplayer game framework for Typescript that has gotten 400+ stars on Github in the past few months: https://github.com/hathora/hathora

Would love to connect and exchange notes about multiplayer development -- if you're interested, my email is on my profile.

Re:Modern cloud for multiplayer games on Thursday June 30, 2022 @05:40PM (#31938986)
Try https://hpx7.itch.io/ship-connect if you want to see a mobile friendly Hathora game (made for a different gamejam)

Edit: I realize now you're talking about desktop Safari. Star-jump doesn't seem to work on it for some reason, will have to investigate why...

Re:Modern cloud for multiplayer games on Thursday June 30, 2022 @05:13PM (#31938690)
I'm not the author of the game so not sure exactly what they meant by that, but that game uses Websockets which are built on top of TCP, so developers shouldn't have to deal with dropped packets (and our UDP implementation will have automatic retry built in as well)
Re:Modern cloud for multiplayer games on Thursday June 30, 2022 @05:08PM (#31938624)
For an example Hathora game that does client prediction and rollback, take a look at https://github.com/ourcade/flappy-bird-hathora
Re:Modern cloud for multiplayer games on Thursday June 30, 2022 @05:00PM (#31938545)
If anyone wants to try out a game I made using Hathora for a recent gamejam, you can check out star-jump: https://hpx7.itch.io/star-jump

It's a 2d multiplayer platformer using Phaser[0] for physics on the backend, and it's hosted on Hathora Cloud!

[0] https://phaser.io/

Re:Modern cloud for multiplayer games on Thursday June 30, 2022 @04:57PM (#31938519)
Hathora actually supports raw TCP connections in addition to Websockets, and we're very close to shipping raw UDP support as well!

For the web, we're deciding between using WebRTC or leapfrogging straight to WebTransport[0]. Either solution would be a thin layer on top of the raw UDP work

[0] https://web.dev/webtransport/

Re:Modern cloud for multiplayer games on Thursday June 30, 2022 @03:57PM (#31937759)
Hathora's auth story is basically bring your own JWT token. So you can implement your own custom auth as long as you end up with a JWT signed using your APP_SECRET in the end.

Websockets do actually support binary packets not just strings. But yes you lose control over the server side receiver part of the connection (we think most developers will be ok with this)

Hathora Cloud will be able to run anything that can be packaged into a Docker container and implement the Hathora Protocol (yet to be formally documented)

Re:Modern cloud for multiplayer games on Thursday June 30, 2022 @12:46PM (#31935175)
Hathora Cloud provides several important features specific to multiplayer gaming. To list a few:

1) Built in authentication/identity

2) Session/room based connections (with lobbies, matchmaking, etc)

3) Handlers for various transports (websocket, TCP, UDP)

Looks cool! Can I ask what tech stack you used?
Re:How do video games stay in sync? on Saturday May 28, 2022 @11:36AM (#31541133)
It's close but TCP will retransmit frames rather than packing multiple updates in a single frame.

It's common for people to build this kind of retransmission logic on top of UDP (especially for networked games), it's sometimes referred to as "reliable UDP".

Re:How do video games stay in sync? on Saturday May 28, 2022 @11:22AM (#31540985)
Exactly, you assign a sequence number to each update, have the client send acks to convey which packets it has received, and the server holds onto and sends each unacked update in the packet to clients (this is an improvement over blindly sending N updates each time, you don't want to send updates that you know the client has already received).

If the client misses too many frames the server can send it a snapshot (that way the server can hold a bounded number of old updates in memory).

Re:How do video games stay in sync? on Saturday May 28, 2022 @09:42AM (#31540262)
I've been working on my own realtime networking engine[0] and I think there are a few important points related to network syncing that are not mentioned in this article:

1) Bandwidth. The users internet can only handle so much network throughput, so for fast paced games (where you're sending data to each client at a rate of 20+ frames per second) it becomes important to optimize your per-frame packet size. This means using techniques like binary encoding and delta compression (only send diffs).

2) Server infrastructure. For client-server games, latency is going to be a function of server placement. If you only have a single server that is deployed in us-east and a bunch of users want to play with each other in Australia, their experience is going to suffer massively. Ideally you want a global network of servers and try to route users to their closest server.

3) TCP vs UDP. Packet loss is a very real problem, and you don't want clients to be stuck waiting for old packets to be resent to them when they already have the latest data. UDP makes a major difference in gameplay when dealing with lossy networks.

[0] https://github.com/hathora/hathora

Older ยป