Better HN
topnewbestaskshowjobs
Log inSign up

freeciv21

76 karma · joined Jan 21, 2022 (4y ago) · 10 submissions

Bringing Freeciv to mobile and web at freecivweb.com.

Repo: github.com/longturn/freeciv21

Email: zeko@freecivweb.com

Submissions

comment 4y ago · link · parent

Issues that I might anticipate there would be interfacing with the browser’s audio apis. Freeciv uses sdl audio, which works decently with browser apis, but “clipping” sounds can be observed. My email is in my profile.

comment 4y ago · link · parent

The main freeciv21 developers you can see on the repo are mir3x and lmoureaux. The original freeciv project still has some activity, but we wanted to iterate faster, focus more on multiplayer, and allow modern C++ language constructs to make development easier.

comment 4y ago · link · parent

There are only about 4-6 players left who still do regular multiplayer, that is playing a whole game in a 2-3 hour session. And they tend to be a traditional sort who still use an old 2.0 "warclient" from over a decade ago. The playstyle there converged pretty quickly on radio around turn 65, and extreme fighting for the rest of the game. Longturn works pretty well, but it takes a bit of a commitment to play every day, which is one reason we are trying to revive other game styles.

comment 4y ago · link · parent

Hetzner, with Cloudflare to do the CDN for such large game assets.

comment 4y ago · link · parent

It should be possible, but it would take more invasive netcode changes to be able to handle webRTC. Emscripten does not do similar translation of socket calls to webRTC.

comment 4y ago · link · parent

I've been playing Freeciv for years, but was disappointed that the pool of players was dwindling. A few of the members of the community stepped up to work on revitalizing the project. We decided to focus on WebAssembly to run on browsers, dropping support of the GTK+ and SDL clients in favor of the Qt client that we decided would make it easier to create a Wasm port, and eventual mobile apps. There's still a lot of UX tuning to do, but we wanted to put this out there today to get some early feedback.

comment 4y ago · link · parent

Admittedly we have not tested on firefox as much, but I suspect that is happening is that we have a race condition in waiting for the 30+MB package of wasm and data files to load.

comment 4y ago · link · parent

Qt and emscripten took care of the bulk of it. Emscripten turns socket calls into websocket somewhat "transparently". The error handling is slightly different, but it only took minor code changes to get that working. More effort was involved in making the Qt event loop play nicely in the browser. Freeciv is based on a server-client model, we host servers that the wasm clients connect to via websockets.

comment 4y ago · link · parent

We have forked it and are allowing more C++, but it is still mostly C style. https://github.com/longturn/freeciv21

10.

Show HN: Full Freeciv client running on WebAssembly(freecivweb.com ↗)

97 points · by freeciv21 · 4y ago · 31 comments