|Paradigm(s)||multi-paradigm: structured, imperative, object-oriented, modular, reflective, generic, concurrent|
|Designed by||Mark Sibly|
|Developer||Blitz Research Ltd.|
|Appeared in||March 1, 2011|
|Stable release||0.79(e) / June 17, 2014|
|Typing discipline||Static, Weak, Strong (Optional), Safe, Nominative, Partially Inferred|
|Platform||Crossplatform (See the targets section for a full list of supported platforms)|
|OS||Microsoft Windows, Mac OS X, Linux|
Monkey X is a high-level programming language designed for developing video games for many different platforms, including desktop/laptop computers, mobile phones, tablets, and video game consoles. The language itself is an object-oriented dialect of BASIC, which the compiler translates into native source code for several target platforms. The resulting code is then compiled normally. Currently the official target platforms include: Windows (Including the windows 8 store), Mac OS X, Linux, Xbox 360, Android, iOS, and many more.
In December of 2013, Monkey was re-branded as Monkey X.
The free version of Monkey X released at this time included unrestricted use of the HTML5 and Desktop targets.
Mojo is the official proprietary graphics 'module' for Monkey X. Mojo has been written for all of Monkey X's official game-based targets, this is done using the native programming languages of each target. Mojo is then wrapped using Monkey X's "external-language" system. Mojo was designed primarily for writing simple 2D games in Monkey X, but like many other APIs, it can also be used for other types of programs. Like Monkey X itself, one of Mojo's goals is to make everything (Graphics and sound in this case) as consistent as possible on all of its supported platforms. Because of this, Monkey X based games tend to look almost identical on all platforms, despite sometimes being based on drastically different technologies.
As of July 10, 2013, Mark Sibly (Monkey X's creator) has started a forum thread about the future of Monkey X's development, as well as some information about new functionality for Monkey X and Mojo. One of the most notable announcements was the planned development of a new cross-platform 3D API. There hasn't been very much information released, but we do know that the working title is "Mojo3D".
- Android (As of July 10, 2013, there is no word about support for the newly announced Android NDK target)
- iOS (Assumed to be based on OpenGL ES, but not 100% confirmed)
- Windows 8 (Highly suggested to be based on Microsoft's DirectX API)
- HTML5 (Assumed to be based on WebGL, but not confirmed)
- GLFW (Confirmed to be based on OpenGL 2. It is unknown if the engine will support OpenGL 2.0, or a later revision of OpenGL 2 (Version 2.1))
Mark Sibly's ongoing forum thread can be found here, in Monkey X's official forums.
Official targets (Garbage-collected)
- 'Standard' C++ - Used for console applications and tools; Monkey X's translator was built using this.
- GLFW - Native OpenGL based C++ target for Windows, Mac OS X, and Linux.
- Android - Based on the Java programming language.
- iOS - Based on the C & C++ programming languages. (Compiled using Xcode and LLVM)
- PlayStation Vita PSS/PSM C# / Mono based target.
- Adobe Flash
- XNA - C# based target for Windows, Xbox 360, and Windows Phone 7. (Powered by Microsoft's XNA framework)
- Windows 8 / Windows RT - DirectX based C++ target usually used for Windows Store applications and games.
- Windows Phone 8 - Effectively the same as the Windows 8 target, but with support for Windows Phone 8.
- Ouya - Initially based on the official Java-based Android target. This target was originally developed by Monkey's community. The initial project was started by Jochen Heizmann (Maverick69).
Official Targets (Not Garbage-collected)
- Before the release of V71, the 'standard' C++ target did not have garbage collection functionality.
Upcoming Official Targets
- Android (NDK): On July 10, 2013, Mark Sibly stated that there was a strong possibility that a native Android target will be coming to Monkey X in the near future.
You can find most of Monkey X's unofficial/community-driven targets at the official community's "User Targets" section.
Notable games made using Monkey X
- More games/other made in Monkey X can be found at the Monkey community's "Apps" section.
' This example relies on the 'Mojo' module, so it will not compile with the STDC++ target. ' Mojo comes with all full versions of Monkey, and it works on all official game-targets. ' Classes and functions such as Image, and App, LoadImage, and DrawImage are located in Mojo. ' Enable strict mode. Strict ' Import the mojo module. Import mojo ' The entry point for monkey: Function Main:Int() New GameApp Return 0 End ' The main class which expends Mojo's 'App' class: Class GameApp Extends App Field player:Player ' Override Mojo's 'OnCreate' method: Method OnCreate:Int() ' OnCreate is called automatically when the 'App' class is created. ' Most media should be stored in a folder called "ProjectNameHere.data". ' Load the image player.png, then return the 'Image' class to 'img'. ' Mojo assumes that what you're loading is in the "ProjectNameHere.data" folder. Local img:Image = LoadImage("player.png") ' Create a new instance of our player class using the image we loaded. player = New Player(img, 100, 100) ' Self.player could also be used here. ' Set the update-rate to 60 frames per second. SetUpdateRate(60) ' Returning zero usually signifies that there were no errors in a method like this. Return 0 End ' Override Mojo's OnUpdate method: Method OnUpdate:Int() ' OnUpdate is called automatically several times per second. ' The number of times this is called is based on the update-rate. ' Add '1.0' to the player object's 'x' variable(Float). player.x += 1.0 ' If the value of 'x' exceeds 100, set it to zero: ' This could also be done using 'Mod', the modulus operator. If (player.x > 100) Then player.x = 0 Endif ' End could be used here instead of Endif ' Everything went according to plan, now return zero. Return 0 End ' Override Mojo's OnRender method: Method OnRender:Int() ' OnRender is usually called as many times as OnUpdate. ' Normally, all graphical/drawing operations must be done in here. ' However, you can manually render by using BeginRender() and EndRender(). ' Clear the screen, then display a color based on the values specified(RGB). Cls(32, 64, 128) ' Call our player object's 'Draw' command. player.Draw() ' Everything went according to plan, now return zero. Return 0 End End ' The player class that was referenced above: Class Player ' Define all of our fields (Variables): Field x:Float, y:Float Field image:Image ' Overloading 'New' works the same way as a constructor in other languages. Method New(img:Image, x:Float=100, y:Float=100) ' Due to the arguments, 'Self' is required in this situation: Self.image = img Self.x = x Self.y = y End ' 'Draw' is a simple command that draws our image using the coordinated specified. Method Draw:Void() DrawImage(image, x, y) End End
- Monkey's official website
- The official Monkey X forums, where all of the product updates are documented and discussed.
- MonkeyMax Source Code Repository from Google Code
- User Made Python Target Source Code Repository from Google Code
- User-made Nintendo DS Target for Monkey
-  Monkey Announcement
- http://www.blitzbasic.com/faq/faq_entry.php?id=29 Blitz Research Ltd
- Monkey X Re-branding Official Forum Post
- http://www.monkey-x.com/Community/posts.php?topic=5548 A forum thread started by Mark Sibly (Monkey X's creator), which contains a 'roadmap' for Monkey X development
- After the release of V71, the 'standard' C++ target was given a fully functional garbage collector. - Source: A forum post made by Mark Sibly (Monkey's creator) from www.monkey-x.com
- A forum thread started by Jochen himself. from www.monkey-x.com
- A forum post made by Mark Sibly (Monkey X's creator) from www.monkey-x.com
- Monkey X's official development road-map.
- Official BAFTA Sports/Fitness 2013 Category Page from bafta.org
- Official website Blitz Research, Monkey X author, distributor
- German forum: http://www.monkeycoder.de
- Russian Monkey community
- Jungle IDE, an advanced IDE for the Monkey programming language: http://www.jungleide.com