Author Topic: Play transport tycoon in browser  (Read 6555 times)

0 Members and 1 Guest are viewing this topic.

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4235
  • Total likes: 170
  • Helpful: 149
  • Languages: EN, DE, AT
Play transport tycoon in browser
« on: July 03, 2012, 07:55:25 PM »
Parsley, sage, rosemary, and maggikraut.

Offline eipi

  • *
  • Posts: 67
  • Total likes: 5
  • Helpful: 12
  • Languages: DE EN FR ES C++ LaTeX
Re: Play transport tycoon in browser
« Reply #1 on: July 03, 2012, 08:07:13 PM »
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)

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4235
  • Total likes: 170
  • Helpful: 149
  • Languages: EN, DE, AT
Re: Play transport tycoon in browser
« Reply #2 on: July 03, 2012, 08:18:46 PM »
In principle the same can be done for simutrans, too! They used a C++ to Bitcode to Javascript compiler.
Parsley, sage, rosemary, and maggikraut.

Offline VS

  • Senior Plumber (Devotee)
  • Devotee
  • *
  • Posts: 4849
  • Total likes: 25
  • Helpful: 63
  • Vladimír Slávik
    • VS's Simutrans site
  • Languages: CS,EN
Re: Play transport tycoon in browser
« Reply #3 on: July 03, 2012, 08:50:33 PM »
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.

My projects... Tools for messing with Simutrans graphics. Graphic archive - templates and some other stuff for painters. Development logs for most recent information on what is going on. And of course pak128!

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 8770
  • Total likes: 310
  • Helpful: 229
  • Languages: De,EN,JP
Online (Javascript) Simutrans
« Reply #4 on: July 07, 2012, 08:33:02 PM »
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.

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 4740
  • Total likes: 181
  • Helpful: 108
  • Languages: EN, NO
Re: Online (Javascript) Simutrans
« Reply #5 on: July 07, 2012, 09:24:12 PM »
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.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 8770
  • Total likes: 310
  • Helpful: 229
  • Languages: De,EN,JP
Re: Online (Javascript) Simutrans
« Reply #6 on: July 08, 2012, 07:31:54 PM »
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 ...

Offline Yona-TYT

Re: Online (Javascript) Simutrans
« Reply #7 on: July 08, 2012, 08:48:24 PM »
worth a try

Offline Yona-TYT

Re: Play transport tycoon in browser
« Reply #8 on: February 11, 2013, 11:17:40 AM »
Simutrans in HTML5/JavaScript, Possible?
http://forum.simutrans.com/index.php?topic=11433.0

Offline An_dz

  • Web Admin
  • Administrator
  • *
  • Posts: 2593
  • Total likes: 289
  • Helpful: 89
  • D'oh
    • by An_dz
  • Languages: PT, EN, (it, de)
Re: Play transport tycoon in browser
« Reply #9 on: February 11, 2013, 01:54:41 PM »
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.

Offline Yona-TYT

Re: Play transport tycoon in browser
« Reply #10 on: February 12, 2013, 03:03:25 AM »
if "openttd" it  profit,   why "Simutrans" not? ???

Offline An_dz

  • Web Admin
  • Administrator
  • *
  • Posts: 2593
  • Total likes: 289
  • Helpful: 89
  • D'oh
    • by An_dz
  • Languages: PT, EN, (it, de)
Re: Play transport tycoon in browser
« Reply #11 on: February 12, 2013, 03:21:31 AM »
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.

Offline jamespetts

  • Simitrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 15558
  • Total likes: 386
  • Helpful: 172
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Play transport tycoon in browser
« Reply #12 on: March 04, 2013, 01:12:50 AM »
Hmm, playing this very briefly reminded me how good that Simutrans really is...
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Offline An_dz

  • Web Admin
  • Administrator
  • *
  • Posts: 2593
  • Total likes: 289
  • Helpful: 89
  • D'oh
    • by An_dz
  • Languages: PT, EN, (it, de)
Re: Play transport tycoon in browser
« Reply #13 on: March 04, 2013, 06:16: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. :)