The Greenfoot Network:    The Greenroom

Password (Forgotten it?)
Greenroom - The Greenfoot Educators Community
Upcoming Events see all events »
Greenfoot scenarios on your phone!
07 Sep 2017

Greenfoot scenarios are now automatically converted to HTML 5 when uploaded to the site - this has a number of benefits, including that you can now run Greenfoot scenarios on a smartphone!

Scenarios upload to the site are now automatically converted to run as HTML 5. This has several advantages:

  • faster load times
  • the Java plugin is no longer required to play scenarios online
  • scenarios will now run on many smartphones and tablets
  • the UserInfo (high score) functionality works again with minimal fuss

Production of a HTML 5 scenario occurs through an automated translation of the original Java scenario into Javascript. This process has some limitations, which have been previously discussed; most importantly, Swing and AWT classes cannot be used which means that scenarios using the “java.awt.Color” and “java.awt.Font” classes will not translate successfully. Greenfoot 3.1.0 introduced replacements for these in the form of “greenfoot.Color” and “greenfoot.Font”, so we recommend upgrading to Greenfoot 3.1.0 if you are still using an older version.

In the near future, we also plan to allow running HTML 5 scenarios in a “full screen” mode (which should be particularly useful for running on phones and tablets), and to allow embedding scenarios in other web pages (much as you can embed videos from Youtube, for example).

Scenarios for which translation to HTML 5 was not successful can still be played by following the link to the legacy (applet) version, which requires the Java plugin. If you have created scenarios which didn’t translate successfully to HTML 5, viewing the scenario page while logged in should show you the log generated during the translation process which may give a hint as to what caused the failure (quite often, it will be due to use of an unsupported part of the Java API).

There may be some minor teething problems, so if you notice problems with the HTML 5 version of a scenario, feel free to discuss them in the discussion forum.

See all news (RSS)

Created by Supported by
Copyright King's College London, 2017. Contact us.