Forum Replies Created
In all honesty, I have seriously been considering closing down the site. I was hoping monkey2 might become a self-sustaining thing but that doesn’t seem to be happening. And unfortunately, I just don’t have the time or energy myself to nudge things along, but really, if I need to do that by this stage perhaps it’s better to just let things go.
I am still playing with ideas for wasm-monkey in my spare time, but that wont reallistically be a thing for a while yet. Even when it is, I think I’d rather see the community based somewhere more public, like a new (or the existing) discord channel, or a slack channel (same idea just a bit more useful) or a facebook page etc.
I’ve also been considering hosting the code somewhere like’repl.it’ (cool site) which also has per-project forums, as does itch.io etc – there have gotta be a ton of places to do this that don’t entail building a website from scratch.
Strings in monkey2 are converted to UTF8 when read/written to memory/streams, and when converted to the type ‘CString’ (aka ‘const char *’) for use with extern APIS.
The first 128 characters of UTF8 match up with the (only) 128 chars of ascii, but bytes in UTF8 strings with their high bit set indicate the start of a ‘multibyte character sequence’, so the number of bytes in a UTF8 ‘string’ may not equal the number of characters in the string.
More info on UTF8 can be found here:
Google for lots more!
You will also be able to import’prebuilt’ c++ libraries (hopefully at runtime) which is how bullet and other existing c++ libs will be handled.
Thank you, I will integrate this with the next binary release.
It may be a permissions issue, try something like this…
RequestPermissions( New String[(“android.permission.WRITE_EXTERNAL_STORAGE”),Lambda( results:UInt )
I have no idea if this is the correct permission to ask for though, more here:
For 17.1.1 you need to add this to your manifest inside the <application> block:
I also had to tweak the java code a bit (results are in develop branch), I’m surprised you could even build it.
Will take a look at this ASAP, thanks for bringing it to my attention.
Sorry, but it still looks kind of nasty to me. And aren’t you gonna confuse a whole bunch of php users?!?
I’m probably not quite as adverse to overloading ‘=’ as I used to be though. I assume the goal here is still to achieve ‘property changed’ events/signals?
I mean, you can already do this quite easily:Monkey12345678910111213141516Class MyLifeField LifestyleChanged:Void()Property Lifestyle:Int()Return _lifestyleSetter( lifestyle:Int )If lifestyle=_lifestyle Return_lifestyle=lifestyleLifestyleChanged()EndPrivateField _lifestyle:IntEnd
…but of course you know this! If the goal is to wrap both the signal and the setter/getter in a single concept, you can do this too, eg:Monkey1234567891011121314151617181920212223242526Struct MyProperty<T>Field Changed:Void()Method Set(value:T)If value=_value Return_value=valueChanged()EndMethod Get:T()Return _valueEndPrivateField _value:TEndClass MyLifeField Lifetyle:MyProperty<Int>End
This is effectively what your (mostly) doing above, except you need to use Lifestyle.Set() and Lifestyle.Get() to set/get the value, plus you can listen for changes using Lifestyle.Changed+=Lamba…
IMO, the = syntax isn’t enough of an improvement over plain Set and Get here to justify it. In fact I’d argue Get and Set is much clearer than an ‘array looking’ operator. And either way, the programmer has to ‘know’ to use it (if you see what I mean).
Overloading ‘=’ is much more interesting though – it means ‘live’ properties like this could be added to existing code without user code knowing it wasn’t just reading/writing files/properties. But for this work, there’d also have to be a ‘conversion’ operators for reads. Perhaps something like:Monkey1234567891011121314151617181920212223242526Struct MyProperty<T>Field Changed:Void()Operator Setter( value:T )If value=_value Return_value=valueChanged()EndOperator Getter:T()Return _valueEndPrivateField _value:TEndClass MyLifeField Lifetyle:MyProperty<Int>End
But alas we’ve already hit our first complication! If the ‘type’ of Lifestyle is Int thanks to its getter operator, how can we access Lifestyle.Changed?
And if T is a class/struct, what does Lifestyle.blah mean? Is it a member of Lifestyle, or a member of LifeStyle.Getter? The compiler could attempt to guess what you want to do, but it’d likely result in a bunch of confusing rules, and type conversions would be a nightmare when calling functions, assigning to vars etc. And what happens with prop1=prop2? If they are both Int Getters of the same type, should it get/set the int, or assign the entire getter, ‘Changed’ listeners and all? The sensible thing to do in all these cases is probably to treat any value with a Getter as a value of the Getters type instead (just like properties), and add new syntax to somehow ‘ignore’ the getter when you want work with the actual property-like container.
All in all it’s an interesting idea and I think it could be made to work, will keep thinking about it….
It sounds like a gcc bug:
Have you updated your NDK lately?
I’m using 18.0.5002713 and successfully rebuilt everything juts a few hours ago.
Everything seems to be working fine on Mojave here now too. A non-0 SwapInterval will now cause the ‘displaylink’ timer to be used to synchronize OnRender()’s instead of the GL SwapControl extension. The displaylink timer has actually been in macos since 10.4 so I’ve just used it for ALL macos targets.
Also, changing an internal SDL2 cocoa call from ‘updateIfNeeded’ to just plain ‘update’ seems to have solved the ‘not rendering’ issue.
There have been reports of an issue with window resizing but I haven’t been able to reproduce this so far.
Added SUPER experimental SwapAsync flag to Window. Causes window to execute swaps in a separate thread. This allows you to use much finer grained timers etc. Note: it may not be a good idea to do any off-screen rendering with this enabled. It may not work everywhere, but Qt4.8 apparantley recommends it so give it a go! Confirmed to work on windows and macos, but not linux.
In GL-Speak, it caused ‘SwapBuffers’ to execute in a separate thread, which meant the main thread didn’t have to block waiting for vsync.
It was more a kind of a ‘see if I could’ experiment really, I probably shouldn’t have added in the first place.
I’ve updated to Mojave and can reproduce some of the problems people are having, including ‘no vsync’ and ‘nothering rendering’.
I’m gonna wait a while before doing anything too drastic about no-vsync. At the moment it looks like Apple have removed the GL swap_interval extension entirely (and I couldn’t find any alternatives) and if that’s the case you really have no choice but to use a timer. But it may also be an early release glitch that goes away with the next update etc.
The ‘nothing rendering’ issue is fixed for me by moving the window, and I should be able to do something about this. But once rendering is happening, all appears to be well which is something at least!
Any other issues I have missed?
Sorry, I should have read more carefully.
If you’re only interested in ios, you only need to rebuild ios modules.
To rebuild ios modules, you should open the ‘update/rebuild modules’ dialog and select the ‘ios’ target *only*.
Once you’ve successfully rebuilt the ios modules (which will also take a while) your error should go away.
Also note you will need latest xcode installed, and an actual device to test on.
Have you rebuilt mx2cc too?
The github develop branch is pretty volatile, esp. right now while threads are being added. Perhaps stick with binary releases instead for a bit?
It should be possible to use sprites for this, even if ultimately it’s not the best way.
Not toally sure what ‘free rotation’ means though. Does this mean the sprite is effectively just a ‘static quad’ that can be rotated/scaled much like a model?
A static mesh would actually be the best way to do this, except for the sorting problems. Perhaps a static mesh with alpha masking instead of alpha blending? Would this work?