Check it out:
http://play-ttd.com/
Cool! The thing with me is, in fullscreen mode the screen is somehow stretched horizontally since I'm using a widescreen monitor.
I like Simutrans more, though 8)
In principle the same can be done for simutrans, too! They used a C++ to Bitcode to Javascript compiler.
Downloading our graphics will be a bit harder, though ;-) The original (open)ttd uses 8-bit palette, so that probably cuts down the size considerably.
There is a tool, you can use to compile C++ code to Javascript using LLVM. People did an OpenTTD emulation. http://play-ttd.com/ It is slow, but what is most amazing is that is runs nearly decent at all!
However, thinking of the default CPU of simutrans, I fear it will be still too slow.
What do you mean regarding Simutrans and CPU?
For me, Simutrans only uses 10 % of one 1.73GHz core. And the game I had opened wasn't exactly small, though I'm sure there are more complex maps out there. However, the other 80 % might be spent waiting on I/O, so there might not be room for 20 % active CPU.
OpenTTD runs on a 486 with 8 MB ram smoothly. Simutrans never did; mostly since it generates even passengers without stops and a typical pakset has way more objects than OpenTTD default. Not to mention the 8 vs 16 bit (although the latter may be even advantegeous on modern OS). But it would "just" require a translation via LLVM and the tool mentioned on the site to check for sure ...
worth a try
Simutrans in HTML5/JavaScript, Possible?
http://forum.simutrans.com/index.php?topic=11433.0
Maybe, but it's really hard.
Javascript is an interpreted language, as it's not compiled it's way slower.
Plus javascript is single thread, it can not run multiple codes togheter.
And if there's any error, even if the error is intside an 'if' argument that won't be called the whole code crash.
Convert a C++ software to HTML5+Javascript is as hard as code the software on its own language.
Anyway we won't mind if someone with enough knowledge do so.
if "openttd" it profit, why "Simutrans" not? ???
I'm not saying not to do so, just saying that it's not always that easy.
If anyone do so, it will be awesome.
Hmm, playing this very briefly reminded me how good that Simutrans really is...
Quote from: jamespetts on March 04, 2013, 01:12:50 AM
Hmm, playing this very briefly reminded me how good that Simutrans really is...
Same here. I started playing it and was like: where are the stuff? why this is in another button? I gave up after 5 minutes. :)