Monkey2 v1.1.05 now available!

Hi everyone,

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…

Bye!
Mark

User comments
Matthew Smith says:

Great work Mark! Well done on getting to this point!


Amon says:

Thank you, Kind Sir…..You have just made my day even better than it was. 🙂

 

 

 

 


papgar says:

Awesome can’t wait to dig in and have a play at it.


ghzero says:

thank you very much Mark !


Ethernaut says:

Thanks Mark. Updated almost without issues – couldn’t get an old shader I made for testing purposes to work, but I will wait until the 3d module is more mature to use shaders anyway.

Cheers!


GfK says:

Things like the MSVC switch should be built into the IDE.  “Integrated Development Environment” – suggests that you have everything you need within that app, and you shouldn’t need to faff about in Notepad or whatever.

The thing is, once this blog post has sunk down the page a couple of months, nobody is going to know about it any more.  The forum will fill up with people asking “why are Windows compiles so slow?” with replies of “just edit this text file to make it go faster”, and consequently, “meh, use the forum search.  This has been answered a bazillion times already”.


scurty says:

You’re doing a great job Mark! Please never give up on this project! It’s has helped me and others so much.
Monkey definately isn’t C but it has potential to be the next programming language!
Compile times are fine for me, (especially on Linux). Syntax and error checking are on point. I barely have to touch C anymore because of this amazing language.

3D For Life!


Mark Sibly says:

Thanks Scurty!