@RedGTurtlepa: Monkey is its own language, it's only based off of BlitzMax's syntax. As Xaron said, Monkey itself is open source, and you can download the free version. The free version comes with the native source code for two of Monkey's targets (HTML5 and GLFW/Desktop). When you buy Monkey, you're getting the other native implementations of Mojo. For example, the full version of Monkey comes with the Mojo source code for the Android target. In addition to this, you get bug fixes and experimental releases. There are also bundles available, which ship Monkey with IDEs and other framework(s).
As far as licenses go, you're free to do anything under the ZLIB license with Monkey's source code. But for commercial games, you're not in any way limited, even with the free version. The only exception is redistributing the commercial/private source code of Monkey. In other words, if you buy the "pro"/commercial version, you can't redistribute the closed source components of it (Currently the native source for Mojo). However, regardless of the version of Monkey, you can redistribute games built with it.
I can't stress this enough: Monkey is not BlitzMax. Monkey basically takes from BlitzMax's syntax, and expands it to be less platform dependent. This also means you can't directly use lower-level hardware features in Monkey, such as pointers. Threads are also a bit of an issue, as they are platform dependent. Mojo (As well as a number of Monkey's modules) have asynchronous routines you can use. For example, loading resources on another "thread" (How it's implemented depends on the target). That's one of the downsides, but that tends to be more of an abstraction thing than a performance one.
If you wish to use BlitzMax with Monkey, there is a third-party (Community driven) target for it, but there isn't much of a point to it anymore. Unless you absolutely have to use BlitzMax source, it's best to just use the GLFW/Desktop target(s) for those builds.
At its core, Monkey's compiler, 'Trans', is a "transpiler" (Source to source compilation), meaning it compiles your code written in Monkey into the target's native language. For example, the GLFW/Desktop target compiles down to C++ code. Implementations for language features (Such as strings, and arrays) depend on the target, and may use in-house solutions. With that in mind, Monkey is technically a "higher level" language than say, C# or Java, as it depends on implementations of these languages to build.
To answer the question of using Monkey's OpenGL APIs/modules, there are a few examples in the "bananas" folder, found in every current distribution of Monkey. Generally, using OpenGL in Monkey is similar to the wrappers found in other languages, like Java. The difference is, the code you write in Monkey could use any number of OpenGL backends. For example, the GLFW target directly interfaces with GLEW (Directly interfacing with the API), and the HTML target provides WebGL support. In general, unless you're planning on writing the lower level components of the pipeline, using OpenGL isn't the best choice. Monkey's 'mojo' module is provided for free on the GLFW and HTML5 targets, so unless you plan to modify it, you'll probably want to use that. Mojo's underlying source is target-dependent, so this also means the APIs used are different between most targets. Despite this, Mojo provides an API which does not directly depend on any particular API. This is how Monkey is able to deploy to so many targets.
|