Forum Replies Created
-
AuthorPosts
-
Works now. Thanks!
Or maybe I don’t know how to use the keyboard modifiers?
I’m trying something like this:Monkey123If ( Keyboard.KeyHit( Key.Q ) And Keyboard.KeyDown( Key.LeftGui ) )App.Terminate()EndWhohoo! Got about 4 million collisions with V010, 60% faster than my BlitzMax result:
Collisions done in 1 second: 4157842
Works now, thanks!
Took me a while to get BMax working again, hadn’t used it in a long time… I got these results on Os X, using both the old version of rigz.collision and the newly modified one:
BMax (release): Collisions done in 1 second: 2592103
M2 (release, today’s version): Collisions done in 1 second: 1711379
M2 (release, old version): Collisions done in 1 second: 740431I was getting about 2ms/ 20ms on my macbook pro when I tried this last night.
M2 allows you to time things in microseconds instead of milliseconds, if you want to try that. Mark offered some good info on how to do accurate timing in the Window class in this thread: http://monkey2.monkey-x.com/forums/topic/strange-slowness-using-canvas-texture/<edit-removed the link, since you got it working on the first post>
Great stuff! Thanks for sharing! I’ll try to work it into an entity system, if you don’t mind me using it (with credit, of course).
Yes! That pretty much equalizes the rendering speed in both modes and gives a more accurate reading as well. But if I actually include gles20.glFinish() the render duration becomes the vSync interval, about 16ms.
Thanks Mark, this is great information!
P.S. Just for the record, when I turn off all the graphic visual aids and just render the sprites and 3 background layers, the rendering speed in both modes is about 0.35ms on my laptop, which is great. I’m really happy with M2’s performance so far!
Use the TextureFlags.Dynamic flag for frequently modified textures
That improved a lot, about 2ms instead of 14ms!
The ‘render to texture’ code path executes a ‘canvas.flush’ where-as the ‘render to window’ path doesn’t
So, wait, is there a way to not call Flush() when drawing to a texture? Turning it off renders an empty texture, as I expected.
As for the attachments, let me try it…
Attachments:
I’m not near a computer with M2, but if I remember well the majority of the file size is coming from Mojo, if you only include Std it should drop quite a lot.
My guess is that, unlike M1, M2 compiles everything from the source files, even if it’s unused. Makes sense, since the modules are “pre-compiled” (forgive me if I don’t use the correct terms). Seems like the upside is that M2 compiles much, much, much faster than M1 when creating desktop apps.
But I agree, in the long term it would be ideal if some sort of “unused code stripping” becomes available, even if it comes with the price of slower compiling. Maybe we could have “release”, “debug” and “light” builds, light being slower to compile since it would recompile each used module with just the parts of the code actually used.
I imagine that would be very helpful for Emscripten builds, possibly lowering the download time significantly.
Maybe Mark could do a FAQ on that topic?
Isn’t it already called just “Mojo” in M2?
Got it. Thanks!
You may want to check Mollusk.
While its support for M2 is still tentative and there are some bugs, it’s quite usable already and I find it much more “comfortable” to use than Ted. Worth the 10 bucks.
This works:
Monkey1234Local sa:= "alfa,beta,gamma,delta".Split(",")For Local n := Eachin saPrint nNextI think String.Split() already returns a new array, so you don’t have to use “New” or specify the size before calling it!
And yes, I posted in the Monkey-X forums as well, but I like posting here since it can be useful to people starting on Monkey 2.
Cheers!
-
AuthorPosts
