I have just uploaded prebuilt binaries of monkey2-v1.1.05 for windows and macos to itch.io at https://blitzresearch.itch.io/monkey2
This is mainly a ‘pre-3d’ release. It contains several under the hood tweaks to mojo that will be required by the soon to be released mojo3d module(s). I have tried to make these tweaks as unobtrusive as possible, but there’s a chance something may not work as it used to. Please post any problems you may have at monkeycoder.co.nz and bugs to the github repos.
Another semi-major change I made was to remove the reference counted ‘resource’ system. Hopefully no one was actually using this (it was a bit of a mess) but I eventually decided it just wasn’t working. What I ended up doing instead was adding a native ‘OnFinalize’ virtual method to Resource that will be invoked if a resource becomes unreachable by app code AND hasn’t had Discard called on it. Note that finalizers execute in a ‘delicate’ phase of GC collection, so have some severe restrictions on them (which is why I haven’t yet added finalizers to the language, and may never). In particular, finalizer code should NOT make use of any object, array or function pointer fields of ‘Self’ (as they may not even exist any more) and should NOT assign ‘Self’ anywhere (you should go a runtime ewrror if you try). So you’re pretty limited in what you can do inside a finalizer, but it’s enough to clean ups FILEs, GL objects, system memory and other kinds of native resources.
This means it’s not strictly necessary to use Discard to cleanup resources any more, GC will eventually do it for you. GCCollect() is still slow so Discard is recommended in realtime situations, but on the whole it should be possible to write apps without worrying about using Discard at all now. The only thing you might have to be careful about is situations where a variable is keeping a resource alive after you’ve finished with it (say, a value in a Map). As always, test yer stuff for mem leaks!
This release also contains a few other goodies, including:
* Added std.requesters.OpenUrl support for android and ios.
* Added WIP assimp and bullet modules – mainly for future use by mojo3d but IMO its also nice to have the standalone modules.
* Added tinyfiledialog library for linux requesters, except for Proceed which uses kdialog as there’s no equivalent in tfd.
* Added WIP MSVC support for faster compile times on windows. To enable, use ‘MX2_USE_MSVC=1’ in bin/env_windows.txt and rebuild all modules.
Mojo3d is progressing nicely, and a version fit for public consumption should be available to the general public ‘very soon’. There will also be a ‘sneak peek’ release for monkey2 patreon supporters ‘coz they rule and the whole project would not be possible without them.
This first release will not be very usable, but off course ‘usable’ depends on your needs. But in general, there IS still some way to go with mojo3d. More on this later…