Freeciv-Web WebGL/Three.js prototype

Web version of freeciv. Please mention the site you're using, if speaking things other than general freeciv-web codebase.
louis94
Hardened
Posts: 270
Joined: Thu Apr 25, 2013 10:17 pm
Location: Belgium

Re: Freeciv-Web WebGL/Three.js prototype

Post by louis94 »

Memory usage is indeed lower (down to 700MB on my desktop). It's still too much for my tablet, though. (Intel Atom Z3560-based Android system with 2GB RAM and a PowerVR Rogue G6430 GPU.)

The two biggest objects are an array and an object, both around 150 MB. They are allocated during the map model generation, but I don't know much more (yet). The third one is a 100 MB ArrayBuffer, maybe the trees.

Louis
AndreasR
Elite
Posts: 755
Joined: Thu May 02, 2013 10:26 pm

Re: Freeciv-Web WebGL/Three.js prototype

Post by AndreasR »

We really need to get the 3D WebGL version working on mobile devices with just 2GB RAM. There are lots of popular devices with 2GB RAM, such as most recent iPhone models. (It works on iPhone 7 plus which has 3GB RAM).
I have released a new version to the live server, could you please try it with your tablet? It reduces the map size on mobile devices to 1000 tiles - this should significantly reduce the RAM usage even more. In my test on a mobile device it just used 300MB.

Andreas
louis94
Hardened
Posts: 270
Joined: Thu Apr 25, 2013 10:17 pm
Location: Belgium

Re: Freeciv-Web WebGL/Three.js prototype

Post by louis94 »

AndreasR wrote:I have released a new version to the live server, could you please try it with your tablet?
Still crashing Firefox, but now Chrome too (don't know exactly since when) :(
Maybe it's because of x86 Android or the driver…

Louis
AndreasR
Elite
Posts: 755
Joined: Thu May 02, 2013 10:26 pm

Re: Freeciv-Web WebGL/Three.js prototype

Post by AndreasR »

Louis, could you please open about:crashes and get the crash id, then report the crash id here: https://bugs.chromium.org/p/chromium/is ... ?id=675479

Thanks!
louis94
Hardened
Posts: 270
Joined: Thu Apr 25, 2013 10:17 pm
Location: Belgium

Re: Freeciv-Web WebGL/Three.js prototype

Post by louis94 »

AndreasR wrote:Louis, could you please open about:crashes and get the crash id, then report the crash id here: https://bugs.chromium.org/p/chromium/is ... ?id=675479
There is no crash id :(. Chrome crashes (or gets killed) as a whole, not just the webpage.
New info:
I restarted my device because of some processes that were using a lot of memory. Afterwards, I had 1GB of free memory (400MB before), which I assume should be enough to run the game… I played a few turns in Chrome (basically setting all units to autoexplore and hitting End Turn) before taking a look at Firefox. The game was very slow (seconds to move the map) and the browser finally crashed.

Louis
AndreasR
Elite
Posts: 755
Joined: Thu May 02, 2013 10:26 pm

Re: Freeciv-Web WebGL/Three.js prototype

Post by AndreasR »

Image

I have released yet another update of the WebGL version. It uses less memory by loading flags on demand, and also fixes several bugs. Oh, and the 3D WebGL version made it to Slashdot.

Louis, I wonder if you could please try the latest version of Freeciv-web WebGL on your Arch Linux machine, and report the most important things that you think could be improved there?

Andreas
louis94
Hardened
Posts: 270
Joined: Thu Apr 25, 2013 10:17 pm
Location: Belgium

Re: Freeciv-Web WebGL/Three.js prototype

Post by louis94 »

If you see "b.data is undefined" errors in your logs, they're coming from my game. I didn't tweak anything.

The game is actually playable :). I miss rivers, borders and all the information the 2d renderer draws on the map. Oh, and fog of war too…
Just wondering: do planes take off or do they remain stuck on the ground?

I think the great job you did deserves a blog post.

Louis
AndreasR
Elite
Posts: 755
Joined: Thu May 02, 2013 10:26 pm

Re: Freeciv-Web WebGL/Three.js prototype

Post by AndreasR »

>Just wondering: do planes take off or do they remain stuck on the ground?

The planes are pretty much stuck on the ground. Do you have a suggestion about how to improve it? Perhaps add a very distinct shadow to the air units?

I will try to focus on rivers, borders in 2017 then. 8-)
AndreasR
Elite
Posts: 755
Joined: Thu May 02, 2013 10:26 pm

Re: Freeciv-Web WebGL/Three.js prototype

Post by AndreasR »

Louis, do you have any suggestions about how to implement rivers? It is quite hard to make the rivers look good.
AndreasR
Elite
Posts: 755
Joined: Thu May 02, 2013 10:26 pm

Re: Freeciv-Web WebGL/Three.js prototype

Post by AndreasR »

Image

I've added support for multiple city sizes to the 3D WebGL version of Freeciv-web.
Post Reply