V45 now available! [MONKEY NEWS]
Monkey Forums/Monkey Programming/V45 now available! [MONKEY NEWS]
| ||
Hi, V45 is now up, and includes bug fixes, better unicode handling and *simple* virtual keyboard support! The virtual keyboard is only for iOS and android and does NOT display characters or do anything fancy other than provide, well, a 'virtual keyboard'. After calling EnableKeyboard, your app can then use GetChar inside OnUpdate to read characters as they are typed. When 'Return' or 'Esc' is hit (ie: chr 13 or 27) it's up to you to then DisableKeyboard. Check out the bananas/mak/keyboardtest demo. I'm kind of dubious about the worth of this for a variety of reasons, but it does seem fair enough that if you can 'type stuff' on a desktop pc, you should also be able to (somehow) 'type stuff' on other platforms too - ie: all it's really doing is implementing GetChar! Alas, the XNA virtual keyboard works quite differently - it's modal and effectively fullscreen (on wp7 anyway) so would probably require more work/commands to make useful. I assume xbox/wp7 do have a proper virtual keyboard in there somewhere, but it doesn't appear to be exposed by XNA. Maybe later. Modules: mojo.input - HTML5 target now recognizes LMB, RMB, MMB. mojo.input - Added EnableKeyboard, DisableKeyboard for SIMPLE virtual keyboard support on iOS and Android ONLY. monkey.map - modified Map.Compare() method so it takes 'K' (ie: Key) type params instead of plain objects. mojo.input - changed KEY_BACKSLASH to 220. mojo.graphics - fixed non-pow2 tex handling on ios and glfw. Trans (1.18) HTML5 target HTML now disables RMB popup menu for canvas. Trans now built in release mode (was debug) for faster compiling. Fixed spaces in []. Added check for 'Super' calls to abstract methods. Cleaned up debug mode, you should now get a stack trace for every (Monkey) null object, array index or Error() error in debug mode. Cleaned up flash target a bit - bitmap creation is now in mojo code, not target code. Validates abstract methods of non-instanced classes too now - used to only validate instanced (ie: Newed) classes. Fixed strict mode not complaining about non-void functions without terminating return. Fixed void->bool conversions causing crash. Improved unicode handling of os.LoadString, os.SaveString and mojo.app.LoadString. |
| ||
No preprocessor enhancement? I'm a sad panda. :( |
| ||
Virtual keyboard support is useful. >mojo.input - HTML5 target now recognizes LMB, RMB, MMB. Awesome! Thank you, Mark. :) |
| ||
Now after this update i got glfw error TRANS Failed to execute 'C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe /p:Configuration=Debug;Platform="win32" MonkeyGame.sln', return code=1 |
| ||
:) Thank you for the keyboard support on iOS and Android. Tested on Android and it works perfectly. |
| ||
Mark I love you! :D HA, just kidding of course but this virtual keyboard stuff is EXACTLY what I need! Thanks! I'm kind of dubious about the worth of this for a variety of reasons Well Mark, that's easy. You need this if you want to make something like a highscore list where the player enters his name. |
| ||
virtual keyboard support! i love you! |
| ||
thanks a lot! |
| ||
Great! |
| ||
Wow! monkey is getting better and better. Thanks. |
| ||
Thanks for the virtual keyboard. At last I can make some projects with monkey! Yay! |
| ||
I'm kind of dubious about the worth of this for a variety of reasons You also need it for casual games where the player enters their name at the start. Its kind of prerequisite. |
| ||
I assumed that the focus of keyboard input for phone devices (and the xbox to a lesser extent) was to get some sort of response to a question (e.g. asking for your name) instead of monitoring key presses in a live manner. |
| ||
raz - I think you might've misunderstood how you would use the virtual keyboard. :) Mark - not all of use monkey to make 'standard' games, or even games at all. I often have projects that aren't games as such, but just need games technology to visualise data or to give the feel of a game. Think of educational games for example. |
| ||
Ahh ok. It's just I've never seen an Android game that makes use of the keyboard on the fly. |
| ||
thanks mark just curious about the virtual keyboard, does it cover the entire screen when it appears? does monkey pause the game when the keyboard appears? |
| ||
i love mark too very very much !! but why cant i run glfw!!! this error!! TRANS Failed to execute 'C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe /p:Configuration=Debug;Platform="win32" MonkeyGame.sln', return code=1 |
| ||
I get nothing onscreen (besides the click-here text) with the keyboard demo running in the Android emulator. I don't know if this is because it has a "built-in" keyboard, but typing on that produces no text either. |
| ||
@hardcoal Have you tried deleting your build directory? This is what usually happens when you do an update. |
| ||
Just tried out the virtual keyboard in the iOS simulator - works perfectly! |
| ||
Thanks for the update! Are there any undocumented changes to Strict mode? I have one of the methods in my class returning a value in an If..Then..Else block which refuses to compile ("Missing return statement") unless at least one Return statement exists outside of a block. There is an easy workaround, but I'm wondering if the previous behavior was incorrect in some way. |
| ||
Soap: There is an easy workaround, but I'm wondering if the previous behavior was incorrect in some way. In my opinion, yes it was incorrect. It's unreachable code and should throw a compile error. |
| ||
Big And no i havnt but i will ... tnx |
| ||
Nice update there! Dabz |
| ||
Just been testing the virtual keyboard on my phone, seems to work okay - but it only gets individual key hits you can not use predictive words (my default keyboard is Swype). |
| ||
In my opinion, yes it was incorrect. It's unreachable code and should throw a compile error. Actually, I ran into this yesterday and meant to post about it -- here's an example, from AutoFit: |
| ||
Hi, OK, a few points regarding strict mode and return statements. The latest update now requires a return statement at the end of a function in strict mode - even if it's redundant, eg: Method T() If x Return 1 Else Return 0 Endif Return -1 'redundant! But now needed... End However, I'm gonna have a crack at fixing this so returns aren't required if code is unreachable. This wont be perfect (as reachability analysis is 'conservative') so you may end up having to add a return statement even though you know the code can't get there. But Monkey already does some reachability analysis to keep Java happy, so I may as well make use of it. And it'll at least take care of obvious cases like the above. The hard part is adding enough 'returns' to keep C++ compilers (and AS) happy (which all seem to deal with missing returns in different ways!), but not so many that Java/C# gets upset! |
| ||
@DruggedBunny: Here's a less verbose version: Method VMouseX:Float (limit:Bool) Local mouseoffset:Float = MouseX() - DeviceWidth() * 0.5 Local x:Float = (mouseoffset / multi) / (vzoom + (VDeviceWidth () * 0.5)) If Not limit Then return x Local widthlimit:Float = vwidth - 1 If x <= 0 Then Return 0 If x >= widthlimit Then Return widthlimit Return x End And even better: Method VMouseX:Float (limit:Bool) Local mouseoffset:Float = MouseX() - DeviceWidth() * 0.5 Local x:Float = (mouseoffset / multi) / (vzoom + (VDeviceWidth () * 0.5)) If Not limit Then return x Return Min(Max(x, 0), vwidth-1) End :) |
| ||
Brilliant, nice addition :D |
| ||
OT: @Samah -- thanks, meant to go through and try to optimise this/make it prettier. I know it looks awful, so I'll add your code if it works the same! |
| ||
Just to let you know that the Android Keyboard stuff seems a tad broken with non-default keyboards... On my phone I have 3 keyboards: * Swype * LG * Android You cant do swype words and the backspace is dodgy, it seems you have to double the number of hits per characters to delete them (eg you have 4 characters you need to hit the backspace 4 times to start to delete the last character). The LG one works okay, but its based on the old mobile phone numpad (eg one key acts as 3 keys), so when you hit 3 three times it displays C. Any way of forcing the default keyboard? |
| ||
It seems like Java/Android doesn't like Monkey Abstract methods because they don't return anything (: |
| ||
Just got word from bigfishgames that the ios virtual keyboard IS the preferred data entry method. |
| ||
Oh wow - didn't realise RMB in HTML was fixed in V45... downloading now! Thanks! |
| ||
Hi, V45c is now up! Hopefully we're onto V46 next... |
| ||
Hi Mark, just wanted to thank you for another great update. Is there any possibility that you can include skidracers fixes to Monk in the next update as I feel that it is the only thing letting Monkey down at the moment. I`m not talking anything major, just some basic highlighting improvements (to bring it up to Blitz3D\BMax standard) would be very welcome. Jason. P.S. I was also just reading this site, (an old worklog of yours) http://www.hi-toro.com/blitz/oldsites/blitzsite2000/worklog.html As someone who was a great fan of your Amiga Blitz products I am so glad that you are still here creating these fantastic tools for us. Thanks for making games creation so much fun! |
| ||
thanks Mark ! - Monkey Rocks ! :) |
| ||
Nice update. My game engine now gets a compile error with Flash, html5 builds ok. I updated to Flex4.5.1 too but same problem. Those strings/images/sounds are being accessed through a string rather than directly. eg: filename$ = "blah.jpg" LoadImage(filename) instead of Loadimage("blah.jpg") |
| ||
Are you using correct upper-lower case function names, such as LoadImage versus loadImage? Or does that not help. |
| ||
Yep, was all working in V44 . The errors are limited to just the asset loader: |
| ||
Have you deleted the build folder after you update to new version? Usually Flash target ( and probably other targets) has a problem if you don't delete the old build folder. Happened to me once. HTML5 worked fine, but Flash target couldn't compile. But deleting the build folder did the trick. |
| ||
argh, how'd I forget that? :) works now. thanks. |
| ||
Have you deleted the build folder after you update to new version? This gets people (including me) every time! Maybe if Monkey adds a version number in the source code and when compiling it checks the number and if it is a different version ask the user to delete the build folder... "Current source code was built using Monkey v43, trying to compile with Monkey v45. Do you want to delete the build folder?" (Of course Monkey should not automatically delete the build folder, as the developer may have stuff in there they need!) |
| ||
(Of course Monkey should not automatically delete the build folder, as the developer may have stuff in there they need!) And if custom preprocessor directives are ever added, in theory the developer should never need to have stuff in there. :) |
| ||
in theory the developer should never need to have stuff in there. Nah you will still need stuff in there. For example with Android you need your icons in the build folder and with HTML5 you can change the favicon etc ;) |
| ||
Ta for the update! Monkey does rock.....'arrrrrddddd! :) |
| ||
Hi Mark, Are you planning a port of MaxGUI to Monkey for a level of cross-platform UI? |
| ||
no |
| ||
Hi Mark, Are you planning a port of MaxGUI to Monkey for a level of cross-platform UI? no You're not Mark, you're Keith. |
| ||
Hi Mark, Are you planning a port of MaxGUI to Monkey for a level of cross-platform UI? In my opinion, It would be much better to use current Java target to get access to the Swing library for cross-platform desktop dev. Just an idea... |
| ||
But the current Java target is for Android, not desktop... although it could be changed ;) For a cross-platform GUI for all the current targets, it would need to be pure graphics mode no native stuff... a bit like the GUI stuff in Diddy :) |
| ||
Monkey is AWESOME, and a stroke of brilliance by Mark. I just had to say that... ;) |
| ||
Monkey is AWESOME, and a stroke of brilliance by Mark. I just had to say that... It is. Plus its not overly difficult to translate Blitzmax code to Monkey. Time-consuming, tedious, occasionally soul-destroying, but not difficult. :)If debugging was easier then it would really be the dog's dangly bits. |
| ||
My dog dont have dangly bits, we cut em off. |