HNHacker News
TopNewBestAskShowJobs

freeciv21

76 karma · joined January 21, 2022

Bringing Freeciv to mobile and web at freecivweb.com.

Repo: github.com/longturn/freeciv21

Email: zeko@freecivweb.com

submissionscomments
freeciv21··on Show HN: Full Freeciv client running on WebAssembly
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.
freeciv21··on Show HN: Full Freeciv client running on WebAssembly
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.
freeciv21··on Show HN: Full Freeciv client running on WebAssembly
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.
freeciv21··on Show HN: Full Freeciv client running on WebAssembly
Hetzner, with Cloudflare to do the CDN for such large game assets.
freeciv21··on Show HN: Full Freeciv client running on WebAssembly
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.
freeciv21··on Show HN: Full Freeciv client running on WebAssembly
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.
freeciv21··on Show HN: Full Freeciv client running on WebAssembly
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.
freeciv21··on Show HN: Full Freeciv client running on WebAssembly
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.
freeciv21··on Show HN: Full Freeciv client running on WebAssembly
We have forked it and are allowing more C++, but it is still mostly C style. https://github.com/longturn/freeciv21