Dienstag, 1. März 2011

Es ist soweit!

1.März. Es ist soweit! Das monatelange Warten hat ein Ende. Monkey ist erschienen.

http://www.monkeycoder.co.nz

Monkey ist eine Art Crosscompiler für verschiedenste Plattformen und kommt anfangs mit einem kleinen Framework Modul daher.

Ganz klassisch zeige ich erst einmal das übliche "Hello World" Programm. So sieht es aus:

Import mojo

Global testApp:MyApp

Function Main()
  testApp = New MyApp()
End Function

Class MyApp Extends App
  Method OnCreate()
    SetUpdateRate(60)
  End Method

  Method OnRender()
    DrawText( "Hello World", 10, 10 )
  End Method

  Method OnUpdate()
  End Method
End Class

Das ist alles. Das "mojo" am Anfang ist besagtes Framework Modul ohne das auch ein DrawText nicht funktionieren würde. Übersetzen lässt sich das jetzt in:
  • HTML5
  • Flash
  • Android
  • iOS
  • XNA
  • Windows (via GLFW)
  • Mac (via GLFW)
Für jede Zielplattform muss dazu das jeweilige SDK installiert sein. Letztlich macht Monkey nämlich nichts anderes als den monkey code in die jeweilige Zielplattform zu übersetzen, also z.B. in ein XCode Projekt fürs iPhone.