Update V51 now up! [MONKEY NEWS]

Monkey Forums/Monkey Programming/Update V51 now up! [MONKEY NEWS]

marksibly(Posted 2011) [#1]
Hi,

V51 is now up!

Now featuring an opengl module inspired by Adam Redwoods' work.

It's currently GLES1.1 on glfw, ios and android only (it emulates GLES1.1 on desktop GL - this probably isn't perfect yet) and requires Mojo to create the actual GL context.

Check out bananas/mak/opengltest for a simple demo.

Note that the only way to currently get data in/out of GL is via the new DataBuffer class - this isn't optimal in all cases, but does at least work everywhere and allows you to freely mix byte/short/int/float data.


Modules

Added opengl module!

html5 mojo - fixed AccelZ.

android mojo - fixed soft keyboard not appearing in landscape mode (hopefully!) and predictive/multichar text entry. Still something up with backspace on my LG though...


Monk (0.36)

Added Final keyword.


Trans (1.27)

Added -check option to trans to just do a test parse/semant/translate.

Added check for object comparisons.

Added Final attribute for class/method decls.




ziggy(Posted 2011) [#2]
Thanks for the -check option!! :D


Dima(Posted 2011) [#3]
This is great - 3D in Monkey!

Any chance of GL support for html5?


Tibit(Posted 2011) [#4]
How does the -check option work? and what exactly does it do? Sounds very useful for Editor stuff! :)


marksibly(Posted 2011) [#5]
Hi,

> Any chance of GL support for html5?

Yes, when I get around to doing GLES2.0 (probably over xmas) which is what WebGL is based on. The reason I did GLES1.1 for now is because it's what's used by the GL versions of Mojo.

GLES2.0 will probably also involve an extra config setting for Mojo to instruct it to create a GLES2.0 context, which in turn will probably mean no Mojo graphics support - currently, with GLES1.1 it should be possible to intermix Mojo/GL graphics.

> How does the -check option work?

It does parse/semant/translate but doesn't update the target project, so you can see if there are any errors in a project.


VicViper(Posted 2011) [#6]
Great!!! Thanks you!


therevills(Posted 2011) [#7]
Diddy approves of this update ;)


TheRedFox(Posted 2011) [#8]
Got fontmachine complaining after the update:

C:\MonkeyPro\bin\trans_winnt.exe -run -config=release -target=glfw "C:\WorkspaceMonkey\TDM\tables.monkey"
TRANS monkey compiler V1.27
Parsing...
C:/MonkeyPro/modules/fontmachine/fontinterface.monkey<9> : Error : Duplicate method attribute.
Abnormal program termination. Exit code: -1

Interface Font
'summary: This is the method to draw text on the canvas.
Method DrawText(text:String, x#,y#) abstract <--- Line 9

With 47d:

C:\MonkeyPro\bin\trans_winnt.exe -run -config=release -target=glfw "C:\WorkspaceMonkey\TDM\tables.monkey"
TRANS monkey compiler V1.24
Parsing...
Semanting...
Translating...
Building...
Microsoft (R) Build Engine Version 4.0.30319.1
...

What's wrong there?


charlie(Posted 2011) [#9]
Awesome! Lack of openGL is what's been stopping me from using Monkey so far, so this is great news!

Cheers
Charlie


TeaBoy(Posted 2011) [#10]
ah GREAT STUFF!!!!!! :o)

works on my HTC WildFire :o) woohoo!


hardcoal(Posted 2011) [#11]
omg ! omg! haha I was just asking 2 days ago about that.
omg this is great new i was waiting for.

monkey is... on the right path..


Dabz(Posted 2011) [#12]
Be good if the Android target used the NDK!

Dabz


TeaBoy(Posted 2011) [#13]
Is it really worth using the NDK at the moment? what benefits will it offer over using Java?


Dabz(Posted 2011) [#14]

Is it really worth using the NDK at the moment? what benefits will it offer over using Java?



EDIT: Not the video I saw, lol! :D

Anyway, apparently, it is faster, and is only recommended for speed critical application, which, imo, games are, well, the vast majority of them! :)

There are tons of speed tests which show how fast it is, in some cases, its 14x as fast!

EDIT: Just tried to find some and stumbled on this:-

http://www.youtube.com/watch?v=YCmU33kwDnk

Programmers, they get more nerdy looking every day! :P

Dabz


Aman(Posted 2011) [#15]
Didn't expect openGL this fast. This is great. Can't wait to see 3D Monkey in action.


marksibly(Posted 2011) [#16]
Hi,

> Interface Font
> Method DrawText(text:String, x#,y#) abstract <--- Line 9

Aha...interface methods shouldn't be declared abstract - I added some more checking for this stuff when I added Final.

Perhaps abstract could be optional the way it was - but that would imply there could be non-abstract interface methods, which there can't.


TheRedFox(Posted 2011) [#17]
Indeed! Thx.


ziggy(Posted 2011) [#18]
@TheRedFox:
Regarding this Monkey version being not compatible with current FontMachine module: All the methods from the interface "Font" are marked as abstract in the FontMachine sourcecode, becouse it was developed before we got interfaces, and I was "faking" them by creating an abstract class with all its methods abstract. When I converted it to interfaces, forgot to remove the abstract keyword from the methods declaration, but it should not be there, it is a bug and it has to be removed. I'll upload a fixed version of the fontmachine module tomorrow, also with new "align" options in the drawtext command.


AdamRedwoods(Posted 2011) [#19]
Re: NDK

Don't you have to compile a different native NDK for each ARM processor? Isn't this why some games are not supported in different devices?


JD0(Posted 2011) [#20]
Nice!!


Richard Betson(Posted 2011) [#21]
WOW! Getting my copy now. HTML5 support will be awesome!


ziggy(Posted 2011) [#22]
Is there any reason why this update is not in the home page?


hardcoal(Posted 2011) [#23]
I asked that my self. probabaly no specialy reason..
maybe mark dont like the number 51.

Its reminds him "The Experiments!!" ..


DruggedBunny(Posted 2011) [#24]
Finally got myself an An-der-oid portable telephone device today (Orange San Francisco, aka. ZTE Blade) and things are looking good! The OpenGL demo works on it too.

My only comment relates to this line in the example:


Note: for glfw and ios, you'll need to modify config.h in .build/target folder and change ENABLE_DEPTH_BUFFER to 1.



Using GLFW, that file doesn't contain this constant, and adding the constant makes no difference -- it just works either way.

I was assuming it was replaced with this constant...

// Depth buffer bits.
// Set to 32 (I guess...) for a depth buffer, 0 for no depth buffer.
//
#define DEPTH_BUFFER_BITS 0


... but changing the zero to 32, 24 or 16 made no difference either -- it just worked no matter what.

(The point being: did the constant name change? And, regardless, it seemed to have no effect and the code just worked... for me!)


Xaron(Posted 2011) [#25]
ziggy, have you had the chance to update your Fontmachine yet?


ziggy(Posted 2011) [#26]
ziggy, have you had the chance to update your Fontmachine yet?
Yes, but haven't uploaded it yet. I'll do it tonight.i've been a bit bussy adding background compilation to Jungle... (news soon)


Xaron(Posted 2011) [#27]
Cool stuff! :) Thanks!


teremochek(Posted 2011) [#28]
I'm intrigued)


frank(Posted 2011) [#29]
> Yes, when I get around to doing GLES2.0 (probably over xmas) which is what WebGL is based on. The reason I did GLES1.1 for now is because it's what's used by the GL versions of Mojo.

How did xmas go? I'm really anxious for GLES2.0 + WebGL :) I'm making an OpenGL raycaster and really would like to port it to Monkey.


Xaron(Posted 2012) [#30]
Hey ziggy, could you please update your fontmachine module? PLEASE!


Fred(Posted 2012) [#31]
+1 for ziggy fontmachine module update (please)