Forum Replies Created
-
AuthorPosts
-
What do you need it for exactly?
It’s all ‘there’ in that the whole thing compiles, but the API side is incomplete and even if I complete it it wont be particularly easy to use as it’ll be very C-ish.
If you can give me some pointers re: what to concentrate on ‘mkaing useful’ first etc it’d help.
I do actually use it in the module manager to decompress files, so it already sort of works…
KeyPressed() will return true if the given key has been been pressed *since the last ‘render’* – you cannot manually clear it, it will be automatically cleared after the next render.
Some people are used to KeyPressed auto-clearing itself after it’s called but that is not the case in mx2 – no matter which way I go here I manage to piss off someone so sorry if that turns out to be you!
For GUI stuff, I really recommend using OnKeyEvent, OnMouseEvent etc as these will generally give you much more precise results.
Have you updated/rebuilt emscripten modules?
There’s no video playback in yet but thanks for reminding me, it’s definitely high up the todo list now!
Use Typeof<> for ‘type expressions’ (eg: Typeof<mojo.Canvas>) and GetDecl( “New” )/Invoke() to create a class instance at runtime.
Check out my reflection blog post and the reflectiontest banana which should cover the basics, including creating a new class instance at runtime.
Not 100% sure what’s up (it’s not crashing here, but not working either…), but for starters you can only currently use fibers with mojo based apps. I plan to change this eventually but it’s a reasonably complex-ish job…
I just updated to latest ted2go and all seems fine here on windows – f5, f7, Ctrl-S work anyway. Will test soon on linux.
The latest mx2cc up at github should fix some/most/all of the crazy-long tmp file name issues.
Great page!
The maze curling up into a tree is especially cool.
Thanks for posting sample code!
It appears to be fixed now (due to fixes to related stuff) although only in the develop branch which I wouldn’t recommended using just yet.
What are the minimum system requirements for the all targets for Monkey2?
The only real ‘hard’ requirement is it needs GLES20 or equivalent, eg: direct3d9 on windows, gl2 on macos/linux, android2.2, no idea about ios, etc.
It should run on any OS you can build SDL for.:
https://wiki.libsdl.org/Installation
I wont be able to test/build for *all* potential platforms, so community help with this will be important.
> just to mention if you run in debug mode you’ll get a seg fault
This could be because the SDL callback happens on a different thread and mx2 is not threadsafe. This’ll probably also cause problems in release mode depending on what the code does.
Ok, a fix for this is now up at github in develop branch – you just need to grab latest canvas.monkey2.
The problem was due to DrawLine using ‘normal’ DrawLine if LineWidth<1. But with scaling, this isn’t always correct.
So I’ve changed the check to LineWidth<=0 (LineWidth now defaults to 0 too) so any >0 linewidth will make mojo use it’s ‘fancy’ DrawLine, ie: draw rects instead of lines.
I’ve also added a LineSmoothing property to Canvas (defaults to false) to control the fake antialiasing of lines. If LineSmoothing is true, lines drawn with LineWidth>0 will be antialiased-ish.
This actually produces pretty convincing antialiased lines with LineWidth>=2 and less than about 5. Less than 2 and the line starts to ‘break up’ noticably, greater than 5 and the anitaliasing ‘fudge’ starts showing! I’ve added a little linetest banana showing this.
I’ve also tweaked draw circle/oval/ellipse so primtives are better ‘centered’ and hopefully more symmetrical.
There are still issues with line end points, but I think this is getting there!
Add functions together atually produces a ‘temporary’ function the calls the first function, discards the returned value, then calls the second.
There’s a bug in mojo (now fixed in develop branch) that means some graphics drivers only create 4 bit RGB framebuffers.
-
AuthorPosts