Freeciv-Web WebGL/Three.js prototype

Web version of freeciv at play.freeciv.org
User avatar
AndreasR
Elite
Posts: 701
Joined: Thu May 02, 2013 10:26 pm
Location: Norway

Re: Freeciv-Web WebGL/Three.js prototype

Postby AndreasR » Sun Nov 27, 2016 6:42 pm

I'm glad that you managed to get Freeciv-web running on Arch Linux, Louis. I'll take a look at your changes.

User avatar
AndreasR
Elite
Posts: 701
Joined: Thu May 02, 2013 10:26 pm
Location: Norway

Re: Freeciv-Web WebGL/Three.js prototype

Postby AndreasR » Sat Dec 03, 2016 10:54 am

A new version of Freeciv-web, with several updates to the WebGL version has been pushed to the production server now.

User avatar
AndreasR
Elite
Posts: 701
Joined: Thu May 02, 2013 10:26 pm
Location: Norway

Re: Freeciv-Web WebGL/Three.js prototype

Postby AndreasR » Sun Dec 04, 2016 6:27 pm

Louis, I think you need to run build.sh. It creates the models.zip file. (I can see your JavaScript errors in the Three.js logs).

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

Re: Freeciv-Web WebGL/Three.js prototype

Postby louis94 » Sun Dec 04, 2016 6:36 pm

AndreasR wrote:Louis, I think you need to run build.sh. It creates the models.zip file. (I can see your JavaScript errors in the Three.js logs).

How can you see my errors in your logs ?

I'm trying to get the network back up to install zip… it's not part of the "base" group…

Thanks :)
Louis

User avatar
AndreasR
Elite
Posts: 701
Joined: Thu May 02, 2013 10:26 pm
Location: Norway

Re: Freeciv-Web WebGL/Three.js prototype

Postby AndreasR » Sun Dec 04, 2016 6:43 pm

Freeciv-web uses trackjs.com to report JavaScript errors. This is so that I can easily fix the most important JavaScript errors, and I think that this is a very valuable tool for monitoring JavaScript errors. It has greatly improved the quality of the JavaScript code. I can give you access, if you want.

User avatar
AndreasR
Elite
Posts: 701
Joined: Thu May 02, 2013 10:26 pm
Location: Norway

Re: Freeciv-Web WebGL/Three.js prototype

Postby AndreasR » Mon Dec 05, 2016 8:52 pm

I have committed initial support for rendering unkown terrain (black tiles) in Freeciv-web WebGL mode.
Image

This is not a perfect solution, but since unkown terrain and exploration of the map is such a central part of the game, I think it's best to start somewhere and improve it later.

The new version has been pushed to the production server also.

User avatar
AndreasR
Elite
Posts: 701
Joined: Thu May 02, 2013 10:26 pm
Location: Norway

Re: Freeciv-Web WebGL/Three.js prototype

Postby AndreasR » Sat Dec 10, 2016 7:14 pm

Here's a short status update on the progress of making the WebGL version of Freeciv-web:
Image

- I have implemented smoother tile edges and smooter edges towards the beaches.
- A line is rendered for the current goto path. There is a bug in OpenGL on Windows which prevents lines from having more than 1 pixel width. I'll have to fix that.
- There is also a Google Cardboard version in the works.

User avatar
AndreasR
Elite
Posts: 701
Joined: Thu May 02, 2013 10:26 pm
Location: Norway

Re: Freeciv-Web WebGL/Three.js prototype

Postby AndreasR » Wed Dec 14, 2016 9:16 pm

I have released an update to the live server now. Louis, what do you think are the most important things to improve in the 3D WebGL version now?

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

Re: Freeciv-Web WebGL/Three.js prototype

Postby louis94 » Wed Dec 14, 2016 11:30 pm

AndreasR wrote:I have released an update to the live server now.

I see you added tile blending :) Normal maps would make terrain more realistic.

AndreasR wrote:Louis, what do you think are the most important things to improve in the 3D WebGL version now?

Memory usage on Firefox. Really. The WebGL renderer uses 1GB on its own here (too much for my tablet). After that, we can think about making it as user-friendly as the 2D version… though improving the graphics is more fun.

I'll keep looking at the development and try to write some code, but my exam session is coming and I must write my master thesis… Expect bursts of activity on my side, maybe a few days long, one week at most.

Louis

User avatar
AndreasR
Elite
Posts: 701
Joined: Thu May 02, 2013 10:26 pm
Location: Norway

Re: Freeciv-Web WebGL/Three.js prototype

Postby AndreasR » Sat Dec 17, 2016 1:09 pm

louis94 wrote:Memory usage on Firefox. Really. The WebGL renderer uses 1GB on its own here (too much for my tablet).


I have tried to reduce memory usage to about 800MB on desktops and about 700MB on mobile devices.
Could you please try to test if the game works on your tablet now?

I have released an update to the server, which renders trees using the Three.js particle system,
and with updated city names and some special tiles.
Image