Page 1 of 1

Idea: run JavaScript version of freeciv in 0AD?

PostPosted: 14 Mar 2015, 01:13
by Julius
Maybe a crazy idea, but since all attempts to create a 3d rendering engine for freeciv have failed so far it could be feasible to run freeciv inside of 0AD?
There exists a HTML5/ JavaScript version of freeciv for running it in a web browser and 0AD has a full spidermonkey JavaScript implementation to run its AI and other scripts. Thus potentially a lot of work could be saved by combining the two?

Thoughts?

Re: Idea: run JavaScript version of freeciv in 0AD?

PostPosted: 14 Mar 2015, 01:32
by Sauer2
Not feasible, as far as I can see it at a glance.

The APIs exposed to the JavaScript interpreter are completely different.

In 0AD it's a very high-level, custom, non-browser API to facilitate bots and change game behavior.
In a web browser it's the classical dom + canvas + other basic stuff APIs acting as SDL replacement et al. and the freeciv port is probably done compiling the complete code base using Emscripten.

Re: Idea: run JavaScript version of freeciv in 0AD?

PostPosted: 14 Mar 2015, 01:41
by Julius
Ahh OK, too bad then. Would have been cool ;)