10 ms·
Show HN: Full Freeciv client running on WebAssembly
- astlouis44 5y agoPlenty of other WebAssembly ports that are online, another one online is The Curse of Monkey Island: (press escape key as soon as it loads to skip to playing!) https://personal-1094.web.app/scummvm.html https://personal-1094.web.app/scummvm.html
- faeyanpiraat 5y agoDon't get too invested in the gameplay though, as after 15 minutes the game stops and prompts you to host it yourself.
- hello0990911 5y agoDoes not work on firefox
- simooooo 5y ago
- Andrew_nenakhov 5y agoThe link with the Curse of Monkey Island works fine on my Firefox mobile
- freeciv21 5y agoAdmittedly 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.
- mikea1 5y agoThis is impressive and shows a lot of dedication! How are you hosting the site and assets?
- freeciv21 5y agoHetzner, with Cloudflare to do the CDN for such large game assets.
- fouc 5y agoI generally think it'd be wise to develop for either Safari or Firefox first. Then fix for Chrome after. i.e. develop for the underdog(s) first.
- pmarreck 5y agosame issue in FF I think. "Couldn't start server"... and it is a pretty quick timeout, like 2 seconds
- singularity2001 5y agoDoes not work on Chrome or Safari either
- sgt 5y agoVery cool. In what language did you write it to produce wasm bytecode?
- wffurr 5y agoFreeciv is about 85% C: https://github.com/freeciv/freeciv https://github.com/freeciv/freeciv
- freeciv21 5y agoWe have forked it and are allowing more C++, but it is still mostly C style. https://github.com/longturn/freeciv21 https://github.com/longturn/freeciv21
- kzrdude 5y agoWho is "we" and what is the original freeciv project doing? Also alive?
- freeciv21 5y agoThe 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.
- astlouis44 5y agoAre you a full time developer? Our startup is currently working to bring Unreal Engine to the web, we've also done various ports of classic games to WebAssembly. We're building a platform and suite of optimization tools to enable any game developer to be able to deploy 3D games and apps to the browser. WebAssembly, WebGPU, and WebXR are going to disrupt the games industry and create a whole new platform category that doesn't revolve around 30% fees or walled gardens. It's also the path to the metaverse. Our Discord if you're interested: https://discord.gg/3t8bj5R https://discord.gg/3t8bj5R
- mysterydip 5y agoI'm curious how human multiplayer works with webassembly. I assume it uses websockets, but how does the code hook into it? How does the original code compile?
- freeciv21 5y agoQt 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.
- chii 5y ago> we host servers that the wasm clients connect to via websockets. would it be possible to make this completely p2p so that another browser hosts the server and connect to it via webRTC style?
- freeciv21 5y agoIt 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 5y agoI'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.
- kzrdude 5y agoWhat kinds of games are being played? How is longturn? Regular multiplayer? When I played some multiplayer freeciv, the playstyle was weird to say the least, a lot of early agression. Then I spectated a lot of the extreme island/race to stealth fighters games too.
- freeciv21 5y agoThere 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.
- kzrdude 5y agohaha, ok warclient is what I remember. I never seriously played myself, but it was intriguing. Happy to hear it's still going on
- Karellen 5y agoIs this project related to freecivweb.org ? If so, how? If not, isn't there room for a fair amount of confusion there? What are the main differences from .org that players should be aware of? Is there a FAQ somewhere? I couldn't see a link to any help or anything.
- Corbeu 5y agoIt's not related, but we know of each other. Regarding technicalities, FCW.org is based on different client architecture. FCW.com has - or it is planned to have - most capabilities as the native client. Right now changing tilesets comes to mind. But if you played both FCW.org and Freeciv on the native client,l you know the differences. Regarding organisation, the two sites are quite different when it comes to developing rulesets: FCW.org sticks to its own Multiplayer line of game rules, while FCW.com is going to go much wider and incorporate a lot of flexibility and development in different directions, something FCW.org has been refusing to do for years. As for FAQ, this is just in its infancy, sorry, but we'll gladly answer all questions either here, if we catch them, or on Discord, which is much more lively. There is also a forum at longturn.net which is also a bit slow, but we get stuff eventually.
- postalrat 5y agoIs there anywhere I could go to pay someone to port an open source project to webassembly? Would pay for a working version of vcv rack 2 https://github.com/VCVRack/Rack https://github.com/VCVRack/Rack
- freeciv21 5y agoIssues 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.
- simonebrunozzi 5y agoI am so excited about WebAssembly. I truly hope that in just a few years it will have revolutionized how people write code and run apps.
- roschdal 5y agohttps://www.freecivweb.org/ https://www.freecivweb.org/ is way better, as it is a pure native HTML5 client version. I may be slightly biased though. Freeciv is fun!
- e-_pusher 5y agoExciting project. Where is the webassembly source located? I could not find it here : https://github.com/longturn/freeciv21 https://github.com/longturn/freeciv21