Experimental v75d now up! [MONKEY NEWS]
Monkey Forums/Monkey Programming/Experimental v75d now up! [MONKEY NEWS]
| ||
Hi, [edit]Now at v75d![/edit] This release contains some semi-major tweaks to the preprocessor, so is probably worthy of a new topic: * Preprocessor vars are now strongly typed. * Non-existant preprocessor vars now evaluate to 'false'. This makes it easier to write conditional code of the nature: #If Not BLAH_IMPLEMENTED #BLAH_IMPLEMENTED=True '#Implement blah! #Endif There have been some low level compiler changes made to achieve this that may affect custom targets/translators: the GetCfgVar and SetCfgVar functions have been renamed to GetConfigVar and SetConfigVar, and the _cfgVars:StringMap<String> global has been changed to a GetConfigVars:StringMap<String>() function. Fixed glfw WritePixels issue. Fixed json parsing bug with empty objects/arrays. Added support for more Ouya buttons - all buttons supported on my Ouya and Ps3 controllers now. Xbox360 controller a bit weird - always appears on port 3, and dpad not generating any button presses. Added JOY_LSB (LSB='Left Stick Button'), JOY_RSB and JOY_MENU keycodes (only used on Ouya right now). Fixed Android build issues. Added GL_GLEXT_PROTOTYPES to linux target main.h Fixed ${CD}, ${TARGET} etc in preprocessor strings. Fixed html5 app resume causing last played sound to replay. Fixed transcc +VAR=BLAH. Fixed winphone 8 orientation bug. Restored anrdroid_ouya target to release! Fixed XNA music not suspending/resuming correctly. Fixed XNA app resume causing last played sound to replay. Updated reflection docs. Tidied up lots of BLAH_IMPLEMENTED stuff. Tidied up preprocessor a bit: Preprocessor vars are now strongly typed, and non-existant vars now return a 'False' value instead of generating an error. Note: Some global funcs in trans/config.monkey have changed, which may affect target authors. |
| ||
that may affect custom targets/translators okey dokey! |
| ||
Thanks again Mark! :) |
| ||
A-w-e-s-o-m-e! |
| ||
I played some with the OUYA target. I noticed its missing three button events: The Menu button Left Stick Button and Right Stick Button. I'm not sure (reading through the OUYA docs) if you can determine the difference for the touchpad movement and tap per controller. I think it would be awesome to have them track independently. I know that XBOX and PlayStation controllers also have stick buttons, are they accessible through Monkey? If not, I was thinking perhaps adding three new (at the least two) joy events: JOY_LSB, JOY_RSB and possibly JOY_MENU, These would map respectively to: Left Stick Button, Right Stick Button and if you would, the MENU button (specifically for the OUYA). The MENU button could be remapped to JOY_BACK or JOY_START instead if you prefer. The MENU button in OUYA is emulated, so you MUST trap it through the use of the KeyDown event AND treat it as a state - at least as far as I could get it. This will allow you to capture the single press for a Menu action to be allowed using it in-game. Double Tapping will throw you out to the Main OUYA screens. Just my two cents on my experience with it. Other than that, I believe the controllers for OUYA are supported well :) |
| ||
my Ouya died, i was trying to test MiniB3D: http://forums.ouya.tv/discussion/2583/it-died#latest |
| ||
@Adam: Sorry to hear that :( Hopefully you can get a replacement soon(ish)? miniB3D seemed to be faring well on the platform too! |
| ||
@Mark Sibly: I made s few adjustments to the Android (Ouya) Game target, with GREAT success! I got ALL three buttons Left Stick Button, Right Stick Button and the Menu Button to respond :) In "androidgame.java" I made changes to the two methods: So all thats left to do now is test it out. I modified the "joytest.monkey" code as follows: Execute the new code, and then turn on at least two controllers. Test all the controls out. When testing the MENU Button, press it once and it will turn and stay 1, press it a second time with a slight pause between the taps and it will change back to 0. Double Tapping will set off the OUYA to terminate the app as expected :) This code is yours for the taking should you choose to use it. :) |
| ||
@marksibly, you forgot to add "mojo/driver.monkey" to the github repo. |
| ||
@marksibly, also i can't compile iaptest on v75b: brl/monkeystore.monkey<85> : Error : Type 'IAsyncEventSource' not found |
| ||
@marksibly, sad but true: the very useful feature +VARNAME=stringkey doesn't work anymore on v75b. Command line: transcc_macos -target=C++_Tool +EXAMPLE=hello test.monkey Source code: #Print("EXAMPLE = " + EXAMPLE) Function Main:Int() Return 0 End Function Output from <v75a: TRANS monkey compiler V1.53 Parsing... EXAMPLE = hello Semanting... Translating... Building... TRANS monkey compiler V1.54 Parsing... EXAMPLE = hello Semanting... Translating... Building... Output from v75b: TRANS monkey compiler V1.55 Parsing... .../test.monkey<1> : Error : Cannot convert from Bool to String. |
| ||
Fixed XNA app resume causing last played sound to replay. I've got this happening in HTML5 as well, using v73b - has it been fixed for HTML5 in v75? |
| ||
@marksibly, also ${CD} doesn't work on v75b, i.e. Monkey won't copy libs in this code:#LIBS+="${CD}/native/chartboost-3.2/ios/libChartboost.a" #LIBS+="${CD}/native/chartboost-3.2/ios/Chartboost.h" |
| ||
Great stuff! Are there any plans to implement Metadata attributes? |
| ||
Most (all?) of the above issues should be fixed in v75c. |
| ||
Mark, you Sir, ROCK! Thank you for fixing the remaining OUYA controller issues :) I think this can be laid to rest :) |
| ||
So many updates so little time! Thanks for the ever continuing improvements to Monkey :D |
| ||
Great work! (Again!) |
| ||
Hi Mark, thank you for your work! There is a small bug in brl.json: if the JSON file contains empty Objects / Array, the parser throws an error (but the JSON file is actually valid). For example the following JSON file does not work: { "hello" : [ 1, 2, 3 ], "world" : [] } I tried to fix it by myself, with no luck :-( Could you please provide a fix? THANKS |
| ||
@mark This is nothing huge, but just for the sake of consistency. I noticed the documentation in mojo.input for the JoyHit() and JoyDown() sections are missing the three new constants you created for JOY_LSB, JOY_RSB and JOY_MENU. They are listed in mojo.keycodes though. |
| ||
> There is a small bug in brl.json: if the JSON file contains empty Objects / Array, the parser throws an error (but the JSON file is actually valid). Oops - fix here: https://github.com/blitz-research/monkey/blob/develop/modules/brl/json.monkey |
| ||
Thank you Mark ! I particulary appreciate conditionnal code implementation commands. |
| ||
Mark, If I wanted to extend the WinRT/WinPhone8 apps with c# code rather than c++ can this be done? I'm thinking about adding some extensions for managing Live Tiles and Notifications (via Windows Azure) as they are quite easy to do but c++ is not my thing. |
| ||
I have a simple game that uses the arrow keys for controls. The win8 build on Monkey73b works perfect, but I tried it in this build (75d) and it doesn't get the input from the keys. (i'm using KeyHit(KEY_LEFT), KeyHit(KEY_RIGHT) and KeyHit(KEY_UP), so... very simple) |
| ||
Strange problem with a gamepad (XBox 360 wired), if I plug it in by itself I get no response but if I plug it in at the same time as my only other controller (Competition Pro USB) both work fine? I was using the Joytest example with GLFW BTW. |
| ||
Checking TARGET_NAME doesn't work anymore? I'm trying:#IF TARGET_NAME="name" #End And I get a "Cannot convert bool to string" error... (on HTML5) |
| ||
Checking TARGET_NAME doesn't work anymore? I'm trying: There is no such variable. Use "TARGET".#If TARGET="name" #End |
| ||
There used to be one. You can set it when creating custom targets, and it gets translated in code to CFG_TARGET_NAME. Why I can't access it from Monkey code is a mystery to me. And I need it really bad - It's the one thing stopping me from having a working Firefox OS target. |
| ||
Forgive me if I'm wrong, but aren't you talking about 'TARGET.monkey' with the current target system? GLFW's 'TARGET.MONKEY' file: #TARGET_NAME="Glfw Game" #TARGET_SYSTEM="glfw" #TARGET_BUILDER="glfw" |
| ||
Exactly. For example, with FirefoxOS I created:#TARGET_NAME="FirefoxOS" #TARGET_SYSTEM="html5" #TARGET_BUILDER="html5" And if I check on code, #If TARGET returns "html5". There should be a #If TARGET_NAME returning "FirefoxOS", so I could differentiate both. (Someone even mentioned it on another thread to me, so that's why I figured it existed and somehow disappeared from recent versions?) |
| ||
Hey Mark, Microsoft introduced a new Advertising SDK! Maybe that's easier to integrate? |
| ||
Microsoft introduced a new Advertising SDK! Maybe that's easier to integrate? It's not. You still need XAML to display ads on windows phone 8... the 'new SDK' most involves in adding support to 'rich media ads' (flash?) |