Experimental v67c now up!

Monkey Forums/Monkey Programming/Experimental v67c now up!

marksibly(Posted 2013) [#1]
Hi,

The latest in the experimental v67 series is now available!

I've added very simple admob and gamecenter modules - see docs for brl.admob and brl.gamecenter. You wont be able to run example code from the docs 'as is' - you'll need admob/itunes connect setup etc.

I initially added these via ios_ext and android_ext targets, which worked OK, but I eventually decided to have a go at a more modular approach instead.

So I've added a #LIBS app config setting that you can use to add (a limited form of) libs to your modules - ios and android only for now.

On iOS, #LIBS can be used to add .h, .a and .framework files to a project - .h and .a files are copied to a 'libs' dir inside .build/ios, and .a and .frameworks are added to the build phases.

On Android, #LIBS can be used to add .jar files. These are copied to a 'libs' dir inside ./build/android.

See source for brl.admob and brl.gamecenter for example usage of #LIBS.

I'll be improving the capabilities of #LIBS over time (for more targets/file types etc) but it'll never be able to handle *everything*, in which case the new target system provides a mechanism for more 'esoteric' needs.

I don't plan on adding a whole lot of stuff like admob, gamecenter etc (there is so much around now!), but people have clearly been struggling a bit with 3rd party API integration so it's probably a good idea to provide official, if minimal, implementations of a few to at least give people something to go on.

Finally, I'm pretty happy with the general v67 package, new target system etc, so this release will likely be promoted to 'official' barring any show stopping bugs.


slenkar(Posted 2013) [#2]
thanks for the admob


therevills(Posted 2013) [#3]
Thanks for the update...

Just checking out the VERSIONS.TXT:
***** v67d *****



Rushino(Posted 2013) [#4]
Thanks Mark for this! Hopefully i can make soon this v67 the official version for my game.


benmc(Posted 2013) [#5]
This is amazing, thank you! AdMob and GameCenter are SO HUGE when it comes to mobile. IAP would be incredible someday, but this alone will save me hours on every project. We appreciate your hard work and dedication to making Monkey so great!!!


MikeHart(Posted 2013) [#6]
Awesome, simply awesome. Thanks for Admob.


Difference(Posted 2013) [#7]
Awesome.
Good call on the #LIBS decision.
Looking forward to testing.


Xaron(Posted 2013) [#8]
Yes, very nice, Mark! Another thing would be in app purchases... :)


siread(Posted 2013) [#9]
Nice one, Mark. I'll try it out soon.


ElectricBoogaloo(Posted 2013) [#10]
Awesome stuff. Look forward to trying out GameCenter stuff. It's one of the last few things on my todo-list, and you've just made it a more "official" way of doing it :D thanks!

..don't suppose you fancy tackling basic mod playing, next, do you? ;)


Skn3(Posted 2013) [#11]
woohoo :D cheers! LIBS gets a massive thumbsup for me!


ziggy(Posted 2013) [#12]
I've got an alpha version of Jungle Ide using this new compiler (not yet background compilation and still to do, but getting there...)


ziggy(Posted 2013) [#13]
Possible bug:
When building for Android, the compiler remains resident even when I close the app in the phone. It does even remain alive after closing TED, so you have to go to taskman to manually close it. It's a bit weird. I would expect TED to close any background process before closing itself.


Amon(Posted 2013) [#14]
May I get access to the Alpha please Ziggy? Not to worried about the background compiler just that after using Jungle for so long TED is quite painful! :)


ziggy(Posted 2013) [#15]
@Amon: I'll release it soon, as only the experimental part of monkey uses an alpha parser in jungle, so it could live with current version without any interferences. I'll provide an update tomorrow (currently trying to solve something first).


Amon(Posted 2013) [#16]
No problem. I guess an extra day won't hurt. :)


Soap(Posted 2013) [#17]
Thank you for the updates!


rIKmAN(Posted 2013) [#18]
Sounds great, thanks for the update!


ziggy(Posted 2013) [#19]
Another possible thing: If I base some calculation on Millisecs() on Android, it seems to not be very precise (I'm using it with Sin to make a wave-like effect in my game). If I use a frame counter and use this for the same calculation, everything is smoith, so Millisecs() seems to have a very bad resolution on Android, or it's executing very slowly... ? I don't recall this happening on previous builds. I'll testit further tonight and provide additional feedback.


marksibly(Posted 2013) [#20]
> When building for Android, the compiler remains resident even when I close the app in the phone

This is ADB, the 'android debug bridge' - a server style process that communicates with the device and runs in the background. You can manually kill it for now using task manager and finding/killing any ADB process.

It's mostly harmless, except for the incredibly annoying habit of locking build dirs so you can't delete them - is this the issue you're having?

Trans used to kill this before/after each android build, but it improves build times significantly if you just leave it running - I guess because it doesn't have to resync with the device each build. So I've tried it that way for now.

I could revert to 'kill each build', or Ted could kill it when you exit, or I could add 'Kill ADB' to the build menu...thoughts?


Sammy(Posted 2013) [#21]
Try updating your Android SDK, this helped me when ADB started misbehaving previously.


Amon(Posted 2013) [#22]
@Mark

Personally adding 'Kill ADB' would be fine with me!


Samah(Posted 2013) [#23]
@marksibly: I could revert to 'kill each build', or Ted could kill it when you exit, or I could add 'Kill ADB' to the build menu...thoughts?

IMO just leave it how it is now.


ziggy(Posted 2013) [#24]
Is far as I'm concerned, the problem I have is you HAVE to kill it in order to be able to make another build, so I don't see how this can speed up build time? unless you're not testing your builds and unly build them, you can't recompile without killing the process. Also, it's running two instances of adb at every run, not sure if that's correct behavior. Once the app ends, only one of those instances is kept alive, preventing the tested program to let Transcc process die. If you run the programm again, another adb instance is launched so you keep getting two of them, and needing to stop the build/run process even when the build/run has ended.

I don't really need anything fixed, as I'm working on Jungle. I was just beta testing it in order to help find any possible bugs. Jungle Ide allows you to kill any process tree in a transparent and clean way, so not a big deal for me. Just thought I had to let you know, just in case


ziggy(Posted 2013) [#25]
Trans no longer informs of the compiler version, it was nice and useful to know wich version where you using for the compilation.


Tibit(Posted 2013) [#26]
Awesome stuff :)


golomp(Posted 2013) [#27]
Thank you Mark, a great step with Admob and Gamecenter.


MikeHart(Posted 2013) [#28]
Under HTML5 I get huge negative values regarding Millisecs(). What do their represent? Is the difference between two calls still the amount of milliseconds between these calls?


Erik(Posted 2013) [#29]
Is touch fixed for windows?


Silverwolf(Posted 2013) [#30]
Exactly the things I wanted added :)

I really am going to need to look at porting my game to this system to get it onto IOS.

Keep up the good work.

P.S. The kickstarter spine animator running at the moment would be a great asset to monkey. Just need a few to voice they want monkey support for it...


slenkar(Posted 2013) [#31]
just out of curiousity why does admob need a test device ID?

ADMOB_ANDROID_TEST_DEVICE1


EdzUp(Posted 2013) [#32]
I would kill adb on monkey exit

Does anyone have a reason why when extracting the monkey zip files they are protected on linux 12.04? Basically this means i cant delete em and have to faff around trying to get permissions sorted so i can get rid of the old directories


impixi(Posted 2013) [#33]

Under HTML5 I get huge negative values regarding Millisecs(). What do their represent? Is the difference between two calls still the amount of milliseconds between these calls?



I have projects that do not function correctly in v67c, because they rely on the old Millisecs() behavior. IIRC, previously Millisecs() returned the amount of time since the app had started running?

EDIT: From the manual

Returns the number milliseconds (thousandths of a second) the application has been running.



But as you point out, Millisecs() currently (V67c) returns -ve values in HTML5. I'm guessing it is long -> int conversion/precision issue. Looking into it now...



I'm also receiving the following browser-reported error, unpredictably:
Monkey Runtime Error: TypeError: bb_app__game is undefined.

Windows 8 64bit, FireFox 18.0.1

EDIT: That Monkey Runtime Error is my fault. I must remember to delete the build directory if compiling with multiple Monkey versions!


impixi(Posted 2013) [#34]
Well, I can get my projects functional by altering the Millisecs function in \MonkeyPro67c\modules\brl\native\game.js:

BBGame.prototype.Millisecs=function(){
	//return (Date.now())|0;
	return (Date.now());
}


This will return positive and semi-accurate incremental values since the previous Millisecs() call. But it wont return the milliseconds since 1970 (as the native Javascript would do) because that would only fit in a long integer (or byte array, etc).

It also does not provide the original Millisecs() functionality of returning the number of milliseconds since app start. For that, the BBGame prototype would need a field initialised and incorporated in the calculation, similar to how it was done in V66b.


MikeHart(Posted 2013) [#35]
I have no problems with the Millisec values per se, just wanted to know what the represent. A small change to fEs timing system needed to be made, that is all.


MikeHart(Posted 2013) [#36]
Tested Admob in the IOS simulator, works fine there.


ElectricBoogaloo(Posted 2013) [#37]
Just installed, and immediately spotted a bug.
(Jumped from v66b to v67d, so apologies if this bug's been around for a while!)

My HTML5 target uses a neat little sidebar on the left, to let me pick different resolutions for testing.
Although the resolution code works wonderfully well (tooting my own horn), the updated Monkey has created a minor flaw in the engine.
MouseX() and MouseY() are now giving co-ordinates based on the whole browser's page, and not the actual canvas area, meaning all co-ords are offset by the width of the sidebar.

You can see the effect by simply wrapping the <canvas> section in <center>'s, then running a simple mouse-based test thing.
Erk!!

Now, it's true that I could simply remove the sidebar, but a bug is a bug, and I thought it was worth reporting!


MikeHart(Posted 2013) [#38]
Mmmh, when I check for the Mouse coordinates outsite the canvas, they never become bigger than its size.


slenkar(Posted 2013) [#39]
im using linux only, none of the targets are appearing in the IDE,
they did in the last version (67b)
I edited the config file too

EDIT- its because the executables dont have the privliges to execute

the solution is to do chmod 777 on the executables

EDIT2-
now I get this error:
BUILD FAILED
/root/Dropbox/monkeygames/skirmish/skirmish.build/android/build.xml:83: Cannot find /root/adt-bundle-linux-x86/tools/ant/build.xml imported from /root/Dropbox/monkeygames/skirmish/skirmish.build/android/build.xml

EDIT3-
ah its cos android sdk has to be
/root/adt-bundle-linux-x86/sdk
NOT
/root/adt-bundle-linux-x86

EDIT4-
now I get this error
-compile:
    [javac] Compiling 4 source files to /root/Dropbox/monkeygames/mahjong/mahjong.build/android/bin/classes
    [javac] /root/Dropbox/monkeygames/mahjong/mahjong.build/android/src/com/bikini/MonkeyGame.java:1464: cannot find symbol
    [javac] symbol  : variable ADMOB_ANDROID_TEST_DEVICE1
    [javac] location: class com.bikini.MonkeyConfig
    [javac] 		AddTestDev( MonkeyConfig.ADMOB_ANDROID_TEST_DEVICE1,req );
    [javac] 		                        ^
    [javac] /root/Dropbox/monkeygames/mahjong/mahjong.build/android/src/com/bikini/MonkeyGame.java:1465: cannot find symbol
    [javac] symbol  : variable ADMOB_ANDROID_TEST_DEVICE2
    [javac] location: class com.bikini.MonkeyConfig
    [javac] 		AddTestDev( MonkeyConfig.ADMOB_ANDROID_TEST_DEVICE2,req );
    [javac] 		                        ^
    [javac] /root/Dropbox/monkeygames/mahjong/mahjong.build/android/src/com/bikini/MonkeyGame.java:1466: cannot find symbol
    [javac] symbol  : variable ADMOB_ANDROID_TEST_DEVICE3
    [javac] location: class com.bikini.MonkeyConfig
    [javac] 		AddTestDev( MonkeyConfig.ADMOB_ANDROID_TEST_DEVICE3,req );
    [javac] 		                        ^
    [javac] /root/Dropbox/monkeygames/mahjong/mahjong.build/android/src/com/bikini/MonkeyGame.java:1467: cannot find symbol
    [javac] symbol  : variable ADMOB_ANDROID_TEST_DEVICE4
    [javac] location: class com.bikini.MonkeyConfig
    [javac] 		AddTestDev( MonkeyConfig.ADMOB_ANDROID_TEST_DEVICE4,req );
    [javac] 		                        ^
    [javac] Note: /root/Dropbox/monkeygames/mahjong/mahjong.build/android/src/com/bikini/MonkeyGame.java uses unchecked or unsafe operations.
    [javac] Note: Recompile with -Xlint:unchecked for details.
    [javac] 4 errors

BUILD FAILED
/root/adt-bundle-linux-x86/sdk/tools/ant/build.xml:710: The following error occurred while executing this line:
/root/adt-bundle-linux-x86/sdk/tools/ant/build.xml:723: Compile failed; see the compiler error output for details.
TRANS FAILED: Android build failed.

Done.


EDIT5= the error goes away if I do this
#ADMOB_ANDROID_TEST_DEVICE1="TEST_EMULATOR"
#ADMOB_ANDROID_TEST_DEVICE2="TEST_EMULATOR"
#ADMOB_ANDROID_TEST_DEVICE3="TEST_EMULATOR"
#ADMOB_ANDROID_TEST_DEVICE4="TEST_EMULATOR"

but I dont know if this has any effects on the final release


marksibly(Posted 2013) [#40]
Hi,

re: negative Millisecs...I'll probably restore the original behavior of Millisecs and add a Millisecs field to GetDate instead.

> You can see the effect by simply wrapping the <canvas> section in <center>'s, then running a simple mouse-based test thing.
Erk!!

Will take a look...

> Mmmh, when I check for the Mouse coordinates outsite the canvas, they never become bigger than its size.

What target? Did they used to?


slenkar(Posted 2013) [#41]
ok when I put in these lines it compiles
#ADMOB_ANDROID_TEST_DEVICE1="TEST_EMULATOR"
#ADMOB_ANDROID_TEST_DEVICE2="TEST_EMULATOR"
#ADMOB_ANDROID_TEST_DEVICE3="TEST_EMULATOR"
#ADMOB_ANDROID_TEST_DEVICE4="TEST_EMULATOR"


but the game crashes on a real android device,

so what do i put there instead?

if i put nothing it wont compile as my post above


MikeHart(Posted 2013) [#42]
Hi Mark, tested on html5. Was trying to confirm his bug. For me they should not return bigger values than the canvas.


marksibly(Posted 2013) [#43]
Slenkar,

Can you successfully run the example in the admob class docs?

Have you deleted .build dir - CONFIG.TXT should now include 4 ADMOB_ANDROID_TEST_DEVICEX config vars.

Have you got an admob publisher ID?


slenkar(Posted 2013) [#44]
yes I have an admob publisher ID, I tried the example and it worked
on an android device


here is the debug log
E/AndroidRuntime( 9335): FATAL EXCEPTION: main
E/AndroidRuntime( 9335): java.lang.ClassCastException: android.widget.LinearLayout cannot be cast to android.widget.RelativeLayout
E/AndroidRuntime( 9335): 	at com.bikini.BBAdmob.run(MonkeyGame.java:1436)
E/AndroidRuntime( 9335): 	at android.os.Handler.handleCallback(Handler.java:605)
E/AndroidRuntime( 9335): 	at android.os.Handler.dispatchMessage(Handler.java:92)
E/AndroidRuntime( 9335): 	at android.os.Looper.loop(Looper.java:137)
E/AndroidRuntime( 9335): 	at android.app.ActivityThread.main(ActivityThread.java:4486)
E/AndroidRuntime( 9335): 	at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 9335): 	at java.lang.reflect.Method.invoke(Method.java:511)
E/AndroidRuntime( 9335): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
E/AndroidRuntime( 9335): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
E/AndroidRuntime( 9335): 	at dalvik.system.NativeStart.main(Native Method)
W/ActivityManager(  182):   Force finishing activity com.bikini/.MonkeyGame


I am not using anything but normal monkey commands


slenkar(Posted 2013) [#45]
yes I have an admob publisher ID, I tried the example and it worked
on an android device


here is the debug log
E/AndroidRuntime( 9335): FATAL EXCEPTION: main
E/AndroidRuntime( 9335): java.lang.ClassCastException: android.widget.LinearLayout cannot be cast to android.widget.RelativeLayout
E/AndroidRuntime( 9335): 	at com.bikini.BBAdmob.run(MonkeyGame.java:1436)
E/AndroidRuntime( 9335): 	at android.os.Handler.handleCallback(Handler.java:605)
E/AndroidRuntime( 9335): 	at android.os.Handler.dispatchMessage(Handler.java:92)
E/AndroidRuntime( 9335): 	at android.os.Looper.loop(Looper.java:137)
E/AndroidRuntime( 9335): 	at android.app.ActivityThread.main(ActivityThread.java:4486)
E/AndroidRuntime( 9335): 	at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 9335): 	at java.lang.reflect.Method.invoke(Method.java:511)
E/AndroidRuntime( 9335): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
E/AndroidRuntime( 9335): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
E/AndroidRuntime( 9335): 	at dalvik.system.NativeStart.main(Native Method)
W/ActivityManager(  182):   Force finishing activity com.bikini/.MonkeyGame



I am not using anything but normal monkey commands


marksibly(Posted 2013) [#46]
The main.xml file in the .build dir templates/res/layout dir has changed to use a relative layout - you'll need to change your app's main.xml too.


Rushino(Posted 2013) [#47]
There some problem with Ignition and v67d.

See :


slenkar(Posted 2013) [#48]
so does this line cause the crash?
#ANDROID_SCREEN_ORIENTATION="landscape"


or do i just need to delete my build folder


Playniax(Posted 2013) [#49]
Hi,

The Ignition problem is a bug in Ignition. You can download Ignition V1.5c and it should be solved. This bug was there all along but never surfaced before Mark fixed the translator.

Bye


Skn3(Posted 2013) [#50]
Hey Mark,

Could we get ".mm" added to the list of supported #LIB files for ios? Quite important for integrating into 3rd party modules and bridging the gap with our own glue code.

For anyone interested you can modify this easily:
src/transcc/builders/ios.monkey line 226

change to:
Case "a","h","mm"


Here is a compiled mac transcc replacement for anyone who wants it:
http://www.skn3.com/junk/monkey/transcc_macos.zip


slenkar(Posted 2013) [#51]
admob works great now thanks


marksibly(Posted 2013) [#52]
> Is far as I'm concerned, the problem I have is you HAVE to kill it in order to be able to make another build, so I don't see how this can speed up build time?

Not here I don't have to - I can rebuild the same/different apps again and again without having to kill ADB. I just can't seem to delete the app's android .build directory with ADB running...

What are other people experiencing? Can anyone else only build an app for Android once without having to find/kill ADB?

Note that F5 now does a 'log-cat to console' thing which will indeed 'hang' transcc until you hit the 'Stop' button. This is by design though (yes it'd be nice if I could detect when the Android app exited - but I can't yet), and isn't really anything to do with ADB. F7 should still just build/exit cleanly though.

> Trans no longer informs of the compiler version, it was nice and useful to know wich version where you using for the compilation.

Didn't notice that! Will fix...

> Could we get ".mm" added to the list of supported #LIB files for ios? Quite important for integrating into 3rd party modules and bridging the gap with our own glue code.

You can already achieve this by renaming the mm to cpp and using Import.

Not pretty, I know...I do plan on adding more file types like this, but probably via a different SRCS var, along with c/cpp/java/js/as etc., and I don't want to mung things up more than is necessary at this point.


MikeHart(Posted 2013) [#53]
As you did in the android admob module, we can add activities to the manifest file. Would be nice to be able to add permissions as well.


maverick69(Posted 2013) [#54]
Don't get me wrong: Thanks for the update, but I don't understand why Marc is wasting his time with things like putting AdMob and Gamecenter into the Monkey "core". This is definitely something the community should take care of while Marc should focus on more important core stuff - for example a better system for third party modules.

I haven't had a looked yet in this update, but the #LIB-thing sounds like the right step. But there are many other things which are important IMHO, for example the possibility for modules to change project settings (like the manifest file) so Mods can be used smoothly.

In my opinion it should be possible to delete the build folder completely and everything should be fine again as soon as I rebuild it. At the moment I have to reconfigure the whole project for each target which is very annoying.


MikeHart(Posted 2013) [#55]
@maverick69: I see the Admob and Gamecenter module as examples on how to do it. And he did add some preprocessor things to change the manifest file. I need one more but it is definately one step in the right direction. Refactoring how targets are added was imho a great step in Monkey. Of course it will break compatibilty with former integrations but it should be hard to add the stuff you had added right into the source now into a dedicated module.


Skn3(Posted 2013) [#56]
What are other people experiencing? Can anyone else only build an app for Android once without having to find/kill ADB?


I have noticed that on windows for me when running on android direct to device (not tested emulator) I am unable to kill the execution with the IDE's stop button. This will hang the IDE. If I kill the adb from taskmanager then the IDE will recognise this properly without hanging.

You can already achieve this by renaming the mm to cpp and using Import.

Not pretty, I know...I do plan on adding more file types like this, but probably via a different SRCS var, along with c/cpp/java/js/as etc., and I don't want to mung things up more than is necessary at this point.


Already discovered this after much experimentation, I didn't mind the implementation it is nice and simple! it would be good if there was maybe a small bit of info in the docs explaining some tips n tricks for integrating native code?

Don't get me wrong: Thanks for the update, but I don't understand why Marc is wasting his time with things like putting AdMob and Gamecenter into the Monkey "core". This is definitely something the community should take care of while Marc should focus on more important core stuff - for example a better system for third party modules.


Having a proof of concept module for 3rd party service modules is one very good reason to integrate admob and game center officially. I just finished a Chartboost module today and it was nice to have something to refer to.

Having game center and other services officially supported is very important as it means monkey doesn't rely on a 3rd party developer who might vanish from the community in a few months time. How many times have you gone to use a lib/module and then found its WELL out of date?


michaelcontento(Posted 2013) [#57]
@maverick69 +1 on that

the #LIBS-thing seems to be a step in the right direction, but it's currently rather limited because it won't work:
... with non-jar android libraries
... ".mm" files for iOS (and renaming files in third party libs is not an option)
... iOS dependencies are always linked as "REQUIRED"

and there is so much more that is left out / currently not taken care of such:
... AIDL files on android
... changes on other files like the layout.xml

don't get me wrong. monkey is an awesome product! marc is one hell of an awesome guy! but please don't spend your time on stuff the community can provide. i mean .. why is there no iOS equivalent of #ANDROID_APP_LABEL, #ANDROID_APP_PACKAGE or #ANDROID_SCREEN_ORIENTATION? stuff that's quite frustrating at the core of monkey :(


Skn3(Posted 2013) [#58]
... iOS dependencies are always linked as "REQUIRED"


a #LIBS_OPTIONAL would be a good additional preprocessor var?


slenkar(Posted 2013) [#59]
Marc should focus on more important core stuff - for example a better system for third party modules.


When he puts admob into monkey it gives him first hand experience and allows him to see what the best third party module system would be :)


michaelcontento(Posted 2013) [#60]
Having game center and other services officially supported is very important as it means monkey doesn't rely on a 3rd party developer who might vanish from the community in a few months time. How many times have you gone to use a lib/module and then found its WELL out of date?


And whats a good solution to this problem? Sharing code in this forum without a proper SCM? Building even more huge frameworks? Should marc implement everything on his own?

IMHO this problem is not limited to monkey. It's a fundamental problem of open source or communities like this in general. And how did other languages tackle this? With a proper package management. And I think this is possible for monkey too. And if we would split our huge frameworks into small parts, share them via Github, Google Code or Bitbucket most of all problems should disappear. If your anxious that something will disappear in the future? Fork it! You've fixed a small bug? Send the patch as pull-request back to the maintainer. Curious what has been changed since "your download"? git diff or hg diff and your done (compare this with some libs that are shared exclusively as zip-file in this forum ...).

And yes - the package management must be able to apply patches to various files inside the build folder. This is one major point where monkey is different to other languages which only need some "download, extract and optional create a system/user wide executable". But it's no rocket sience and would vastly improve the sharing / reusability within the community. And isn't that what we want / need?


MikeHart(Posted 2013) [#61]
@michaelcontento. Do you get payed for bitching about our "huge frameworks"? Please stop that, you don't need to use other frameworks or is someone forcing you?
And please define framework, because imho a loose collection of classes and functions like what you distribute doesn't justify to be named a framework. Imho a framework HAS to be tied closely together to make things easier for their users.


Soap(Posted 2013) [#62]
I agree with michaelcontento on most everything.

MikeHart: Please do not be hostile. Monolithic frameworks which have a ton of internal dependencies are less useful than self encapsulated features. Intentionally creating these dependencies is not necessary with good design.

It's actually not useful for any of us to have the nice stuff if the core of Monkey is not feature complete and working well. Game center or IAP features are useful but there are more pressing features I hope Mark is working on and maintaining - such as some ideas michaelcontento outlined. I too wish he would put the public domain part of the source on github and then begin accepting pull requests. I also wish Mark would hire some good people to make him a better sales site / take up more marketing opportunities / professionally maintain all of the 3rd party things

If we had an official git place to push stuff then there would be less worry about loss when people leave the community. If Mark had a specific open license requirement for publishing code there then everyone else could help maintain it.


AdamRedwoods(Posted 2013) [#63]
the #LIBS-thing seems to be a step in the right direction, but it's currently rather limited because it won't work:

include and library pathing for compilers
flash's sandbox mode for debug player testing "-use-network=False"

i hacked in a general CC_OPTS to tag compiler directives at the end, but the problem i forsee is since monkey automatically adds a semi-colon when += preprocessor variables, then the combination of modules using CC_OPTS will cause problems with one another.

LIBS is one way to get around this, but i for one, would like to see more transcc flexibility for people wishing to bring in advanced third-party libraries.
(nom nom nom)


AdamRedwoods(Posted 2013) [#64]
I too wish he would put the public domain part of the source on github and then begin accepting pull requests.

I have a different opinion about this type of thing. i feel Mark has a good vision for this product, and therefore MUST filter requests and design decisions.


Amon(Posted 2013) [#65]
What AdamRedwoods said!

Mark has a proven track record of consistently creating Games Development Languages that do the job and make it fun to develop.

I think things are progressing well and nothing too major in changes should happen.


Soap(Posted 2013) [#66]
There is a misunderstanding here. I'm not talking about the layman "request" to have something done - I'm talking about Mark accepting patches and bug fixed and features directly from the community in an organized way.

https://help.github.com/articles/using-pull-requests


zoqfotpik(Posted 2013) [#67]
Woohoo @ admob!

Mark, thanks so much for your ongoing work on this fine product, it makes things easy that would otherwise be impossible to accomplish on so many platforms. Cheers!


MikeHart(Posted 2013) [#68]
And who decides which of the user patches and requests gets build in? What one wants in Monkey I might not want. You get the picture? Mark build Admob and Gamecenter into Monkey, something I thought he would never do. You get great examples now how to do modules which can be pretty easy to implement and to me it seems people are still not happy.

Imho what some here ask for (this centralized, automatic patch thingy) is wishful thinking that will never happen. We are talking here about Monkey, not Visual C studio from Microsoft.

Monolithic frameworks which have a ton of internal dependencies are less useful than self encapsulated features. Intentionally creating these dependencies is not necessary with good design.


@Soap, it depends on what your goal is. If you want to use parts of it separately, then true it isn't. If you want the user to have a less work as possible when coding a game, then it is something to consider. It all depends on what you want to do. To me it matters if I need to write 500 lines of code for a half decend game/prototype or 1500 lines where 1000 lines are glue code. If you are happy to write so much more then go ahead, enjoy it.

Anyway, your needs are already served or? Isn't Michael C's collection and Diddy build like that? So you should be happy already.


muddy_shoes(Posted 2013) [#69]
@MikeHart

I can't speak for others but I'd assume that BRL would always decide what gets included in the official distribution/master repository. There's nothing unusual about this set-up. Plenty of languages have processes by which community patches/feature additions/libraries become "core".

As for an automatic update system it's really not something that requires a Microsoft to achieve. I'm honestly amazed that Monkey still has no installer/update mechanism. I thought the "just unzip it over what you've got" set-up was a temporary thing, not the final solution. A module manager is equally within the grasp of a small dev. Ziggy has a partial solution in Jungle, he just didn't make it a workable solution for Monkey as a whole by creating an open cross-platform command-line version.

There are many great things about Monkey but it does have failings when it comes to curation of community knowledge and code, having well-structured, flexible build processes and things like organising bug-reports/feature-requests. There are legitimate criticisms and suggestions to make to improve these matters and much of what's been said in this thread has been said before.

Also, finally, the community itself has a horrible habit of responding to any criticism as some terrible attack. While it may be natural that long-term Blitz users feel some loyalty to the products, it's not particularly healthy to have such a defensive reaction if the objective is to expand the userbase beyond that clique.


ziggy(Posted 2013) [#70]
he just didn't make it a workable solution for Monkey as a whole by creating an open cross-platform command-line version.
I'm on a big work load but I have plans to open it and provide an open source implementation of it. The missing bits that are holding this back from an open release is the fact that there is not any unzip library that can be used with Monkey (AFAIK). That would solve 50% of the issue.


Belimoth(Posted 2013) [#71]
Also, finally, the community itself has a horrible habit of responding to any criticism as some terrible attack. While it may be natural that long-term Blitz users feel some loyalty to the products, it's not particularly healthy to have such a defensive reaction if the objective is to expand the userbase beyond that clique.


This has been a major struggle for me trying to recommend Monkey to others, many of the people I've told about it comment on how venomous some of the responses are to threads where people have found something difficult or unintuitive.


marksibly(Posted 2013) [#72]
> I have noticed that on windows for me when running on android direct to device (not tested emulator) I am unable to kill the execution with the IDE's stop button. This will hang the IDE.

Weird, what OS?

What do you mean by 'unable to kill the execution'? Do you mean kill execution of trans or the android app?

Currently, you can only kill trans, and it works fine for me here on Windows 7. If you compile/run (ie: F5) within Ted, the app will build and launch and app output will be sent to Ted's console until you hit 'stop'. This will only stop trans though, the app will continue to run on the device.


maverick69(Posted 2013) [#73]
I have a different opinion about this type of thing. i feel Mark has a good vision for this product, and therefore MUST filter requests and design decisions


Mark can accept or decline pull requests. This is how the whole stuff works. When using Github its also possible to discuss each pull request separately and decide later if it should be merged in the master branch. Tools like github are so POWERFUL tools when it comes to collaboration.

Of course its Mark's decision to use such a tool, but I definitely vote for it because I think it would fasten up development, bug fixes and gives the community the opinion in collaborate in a more easy & powerful way.

Do you get payed for bitching about our "huge frameworks"? Please stop that, you don't need to use other frameworks or is someone forcing you?


I think what Michael means is that its silly to solve the same problems over and over again. Of course different frameworks have different features and approaches so this is fine.

But a good example is this other thread around here where people trying to crowd fund IAP-Modules or other stuff that is around here in the forum for ages.


Skn3(Posted 2013) [#74]
> I have noticed that on windows for me when running on android direct to device (not tested emulator) I am unable to kill the execution with the IDE's stop button. This will hang the IDE.

Weird, what OS?

What do you mean by 'unable to kill the execution'? Do you mean kill execution of trans or the android app?

Currently, you can only kill trans, and it works fine for me here on Windows 7. If you compile/run (ie: F5) within Ted, the app will build and launch and app output will be sent to Ted's console until you hit 'stop'. This will only stop trans though, the app will continue to run on the device.

Bye!
Mark


Unable to press stop in the monkey IDE. If I press stop then the IDE hangs. The only way to stop is to manually kill the adb in task manager.

Windows 7 64bit.


Samah(Posted 2013) [#75]
I've had this going for a while now...
http://code.google.com/p/monkey-ext/

Feel free to fork and/or make pull requests. Remember that Mojo is not public domain.


Skn3(Posted 2013) [#76]
Monkey is evolving nicely! looking back at version 42b compared to now, a lot has been added. It is really positive that a massive re-factoring is happening at the moment as well. The additions of 3rd party lib support is getting better and can only improve. People just need to be a bit patient.


marksibly(Posted 2013) [#77]
> Unable to press stop in the monkey IDE. If I press stop then the IDE hangs. The only way to stop is to manually kill the adb in task manager.

Weird, unless anyone has any clever ideas I guess I better revert it then.

Bit of a bummer though, as build times are around twice as fast here AND it's very nice being able to see Print output in console!

Does this work for *anyone* except me?!?


ziggy(Posted 2013) [#78]
Yes, it works for me on Jungle. And it is fast and it is nice to get the Print outputed to the console. Maybe it should be as simple as closing the process when a new compilation is requestesd, if it's still running?
It may be related ot not, but can it be a pending flush operation blocking pipes? That happens sometimes from C# but not sure if it is a .net specific thing, or something innerent to window streaming pipes


marksibly(Posted 2013) [#79]
> Yes, it works for me on Jungle.

But not Ted?

I mean, are you getting the same symptoms as Skn3, ie: Ted locks up if you click 'Stop' while running an Android app?


ziggy(Posted 2013) [#80]
No, Jungle Ide does not lock up, but Jungle is using a background thread to read/write and comunicate with transcc, so the thread may (or may not) be locked. Not sure how to properly test it, but maybe I could add a sort of timer/counter/something and see if it gets blocked.

EDIT: Or I can try it on Ted directly wich is a lot easier. I'm on version c67c tho, if that's changed I need to update first. Do I have to?


EdzUp(Posted 2013) [#81]
One minor thing that needs adding is the java stuff in the linux config so it will look for it, this is required for android compiling so it can find javac :)

It would be nice to have all the config options from the windows config file so it all moves forwards together


ziggy(Posted 2013) [#82]
It works properly for me on Ted too. No blocking.


MikeHart(Posted 2013) [#83]
On OSX it works fine.


Skn3(Posted 2013) [#84]
I will try this again tomorrow to double check. One thing I noticed was there were two instances of adb each time I went to kill the task? Not sure if that is standard practice?


pantson(Posted 2013) [#85]
Hi Mark
After a few issues with my recent project on the latest builds, I have narrowed it down to DeviceWidth and DeviceHeight equating to 0 in OnCreate in Android only. This is definitely in v67b and v67c

Test code
Strict

Import mojo

Function Main:Int()
	New Test()
	
	Return 0
End Function

Class Test Extends App
	Const FPS:=30
	field scale:Float		
	
	Method OnCreate:Int()
		Print "width="+DeviceWidth()
		Print "height="+DeviceHeight()
		
	    SetUpdateRate(FPS)

		scale=1.0
		
	    Return True
	End Method

	Method OnUpdate:Int()

		Return True
	End Method
  
	Method OnRender:Int()
	    PushMatrix()
	    Cls()
		Scale scale,scale
		
		DrawText "width="+DeviceWidth(),20,20
		DrawText "height="+DeviceHeight(),20,40
	    PopMatrix()
	
	    Return True
	End Method

End Class


results in Monkey window for Android
I/[Monkey]( 1822): width=0
I/[Monkey]( 1822): height=0


XNA, HTML etc all return the correct value for device dimension.

What do other people get?

Rich


MikeHart(Posted 2013) [#86]
I had the same problems with DeviceSomething and told Mark that. I wanted to have it fixed. And I think he did already. Try V67e.


pantson(Posted 2013) [#87]
theres v67e already??
I really thought i was up to date lol
ta!


therevills(Posted 2013) [#88]
v67e?? When did that get released??


Amon(Posted 2013) [#89]
A couple of days ago!


MikeHart(Posted 2013) [#90]
Mark had mentioned it somewhere in a post here.


therevills(Posted 2013) [#91]
Yeah I found it... but maybe Mark should advertise it a bit better...


ElectricBoogaloo(Posted 2013) [#92]
What? But I've only JUST started coding with 67d!

Hmm. Anyway, I was about to suggest that Mark could possibly add a "GetLeaderboard()" type function.
With GameCenter it's possible to retrieve sets of highscores from the server, so you can display the Top-10 (or whatever) within your game, rather than having to rely on the shitty slow Apple-stuff.
If you take a look at NeonPlat iOS (free) you'll see how much more together the scoreboard feels, when it's actually integrated into the game.

Apologies if this is already in e. Haven't tried that, yet.


pantson(Posted 2013) [#93]
Hi
in v67e, I'm now getting an error in Windows XNA build. Was def working in v67c
Have deleted the build folder.
Anyone else seen this?
Program.cs(632,21): error CS1056: Unexpected character '`' [D:\dev\test\ads.build\xna\MonkeyGame\MonkeyGame\MonkeyGame.csproj]



Skn3(Posted 2013) [#94]
Only got round to testing again today...
I will try this again tomorrow to double check. One thing I noticed was there were two instances of adb each time I went to kill the task? Not sure if that is standard practice?


I tried again today on the old version (67d) and still crashes. About to try 67e...

[edit]

Still crashes and tested with firepaint in mak folder.


marksibly(Posted 2013) [#95]
Hmm, not sure what to do about this...works for everyone else (both of them!) and it's VERY convenient being able to see Android Print output.

Got anything else weird running? Updated android SDK lately?

Anyone else got any idea what could be going on?


tOmzone(Posted 2013) [#96]
I have the same problem like pantson with building for XNA.

But anyway, thank you Mark for updating monkey so frequently :)


marksibly(Posted 2013) [#97]
> Program.cs(632,21): error CS1056: Unexpected character '`' [D:\dev\test\ads.build\xna\MonkeyGame\MonkeyGame\MonkeyGame.csproj]

Oops - will fix.

> One thing I noticed was there were two instances of adb each time I went to kill the task? Not sure if that is standard practice?

Yes - once you use any ADB command, it checks to see if a singleton ADB server is running and, if not, starts one. This shows up in task manager as an adb.exe process (they probably should have called it something else).

Therefore, while the ADB command is executing (eg: while an android app is running and transcc is in the middle of an ADB logcat) there will be 2 ADB processes - the ADB server (which is connected to the device), and the ADB logcat process (which is connected to the server).

Once the ADB logcat process finishes (which is where you seem to be having problems - I can just kill it with the Ted stop button) there will be one ADB process left running - the server. This is normal, it just means the next time you execute an ADB command, it doesn't have to create a new ADB server so doesn't have to reconnect with the device etc.

Previous versions of Monkey killed the ADB server before and after compiling, but that is unlikely to help with capturing F5 output as ADB logcat will just start a new server and trans will be in the same state.


Skn3(Posted 2013) [#98]
Havn't got anything else weird running that I know of.

I did recently update the SDK.


That's what I have installed


marksibly(Posted 2013) [#99]
Ok, just updated my SDK too (never noticed packages->reload menu before!) and, after an initial 'can't delete bin dir' hiccup(!), no problems building/killing again and again since.

Just to be perfectly clear, here's what I'm doing (on a Nexus 7):

1) Start Ted.
2) Open bouncyaliens.
3) Select 'Build and run' from the build menu.
4) Wait for it to start on the device.
5) Select 'Kill' from the build menu.

At this point, the app is still running but transcc has been successfully killed and I can see a blue 'done.' in the console window. Does Ted lock-up for you at this point?

Think I'll start a thread about this next release...


EdzUp(Posted 2013) [#100]
Will update to the latest as I have had the ABD problem, I'm on 67c on Linux. This time it even stopped me ejecting me flash key as it was 'in use', even after killing it I had problems ejecting it and had to restart the Linux laptop.

I known it will take longer to compile but could we have a kill ABD on end program option in the menu somewhere or on be default?


qwerty(Posted 2013) [#101]
Hi guys
in v67e, on my android device don't handled phisical volume buttons. When you press them - nothing happens. Sound level does not change.

in v67b they are working good, when you press - standart android window pops up, like this:



Can anyone check this too, please?


Skn3(Posted 2013) [#102]
1) Start Ted.
2) Open bouncyaliens.
3) Select 'Build and run' from the build menu.
4) Wait for it to start on the device.
5) Select 'Kill' from the build menu.


Well serious what the hell. Tried it again today and it works???

also in the previous versions of monkey it works...

Well I don't know what to say apart from my computer is haunted? I had shut down inbetween previous attempts so my system is running from the same state as it was. Very weird.

Is the kill procedure a blocking call? Perhaps you could have it threaded and then force kill adb after a timeout? Or even just say something like:

its taking a long time.. shall I kill?
[KILL!] [NO I LIKE WAITING]


marksibly(Posted 2013) [#103]
> in v67e, on my android device don't handled phisical volume buttons. When you press them - nothing happens. Sound level does not change.

Working here with bananas/mak/audiotest sample with both sounds and music looping.

In both cases, the 'slider' dialog pops up and you can change the volume.

What does audiotest do on your setup?

ps: using a nexus 7.

> Is the kill procedure a blocking call? Perhaps you could have it threaded and then force kill adb after a timeout? Or even just say something like:

No idea what's up there.

Kill doesn't/shouldn't block, but Ted still waits (asynchronously, in the background) for processes to finish before it re-enables the 'kill' button. Still, it should remain 'live' while waiting...


marksibly(Posted 2013) [#104]
> in v67e, on my android device don't handled phisical volume buttons. When you press them - nothing happens. Sound level does not change.

Working here with bananas/mak/audiotest sample with both sounds and music looping.

In both cases, the 'slider' dialog pops up and you can change the volume.

What does audiotest do on your setup?

ps: using a nexus 7.

> Is the kill procedure a blocking call? Perhaps you could have it threaded and then force kill adb after a timeout? Or even just say something like:

No idea what's up there.

Kill doesn't/shouldn't block, but Ted still waits (asynchronously, in the background) for processes to finish before it re-enables the 'kill' button. Still, it should remain 'live' while waiting...


Skn3(Posted 2013) [#105]
Weird so I wonder what it could have been!


qwerty(Posted 2013) [#106]
What does audiotest do on your setup?

Just play/stop/loop sounds and music :)

Ok, I took 5 pure versions (67a,b,c,d,e), without any changes (except correct paths in config), and build audiotest for each version, then test volume button on the device(Android 4.0.4) to see the pop up.
And I found that:
67a - ok
67b - ok
67c - no
67d - no
67e - no

And then I found the missing line (from version 67c) in android\modules\native\androidgame.java
if( !_androidGame._keyboardEnabled ) return false;
in onKeyDown. When I returned it - volume button started to work correctly, and the 'slider' dialog pops up in c,d,e too.

So, is it simply missing? or is it really not needed there? But as I said, without it 'slider' dialog don't pops up on my device.


ziggy(Posted 2013) [#107]
If I try to build with this parameters:
transcc_winnt.exe -run -config=debug -target=Html5_Game -modpath="C:\Monkey Compiler\MonkeyPro67c\modules;C:\Monkey Compiler\shared modules" "C:\Users\Manel\Documents\Jungle Ide Framework\Temporary Files\untitled_1.monkey"

I get:
Parsing...
C:/Users/Manel/Documents/Jungle Ide Framework/Temporary Files/untitled_1.monkey<1> : Error : Module 'junglegui' not found.
Exit code: -1

The compilation process fails. It complains that it's unable to find the junglegui module, but the module folder is inside:
C:\Monkey Compiler\shared modules

Am I writing wrong the paramters or the multifolder thing is not working as expected? If it is the later, could the be fixed?


marksibly(Posted 2013) [#108]
> Ok, I took 5 pure versions (67a,b,c,d,e), without any changes (except correct paths in config), and build audiotest for each version, then test volume button on the device(Android 4.0.4) to see the pop up.

Thanks for looking into that, it should be fixed in the next update (although I still can't reproduce it). Your device must handle volume buttons differently than mine.

What sort of Android device (+Android OS) are you using?

> The compilation process fails. It complains that it's unable to find the junglegui module, but the module folder is inside:

Spaces in path perhaps?

Does setting MODPATH in config.blah.txt work?


ziggy(Posted 2013) [#109]
Spaces in path perhaps?
It has spaces in paths in the two of the paths passed, but it refuses to find anything in the second one. I'm checking now the MODPATH in config and get back with additional feedback


ziggy(Posted 2013) [#110]
EDITED AFTER MORE TESTING

Removing the spaces from the paths, and also setting them by config.winnt.txt seems to work. But the command line parameter way of doing it seems to get ignored always. I'm particulary interested in the command line version of this.

EDIT2: Setting an invented folder and any folder in the command line makes any regular "hello world" program to compile, so it makes me thing that the parameter is just being plain ignored.

Example:
transcc_winnt.exe -run -config=debug -target
=Html5_Game -modpath="Z:\my_invented_folder_and_drive" "C:\Users\Manel\Documents
\Jungle Ide Framework\Temporary Files\untitled_2.monkey"
This compiles, while it should fail to find anything. (unless it uses default location if provided one is wrong).

Another separated issue non related:
If you launch TransCC from the command line, and it has the -run option on, and you've just installed Monkey, a pop-up asking for permission to execute the mserver is shown. That's ok and expected on regular windows setups. The thing is that if you "cancel" this dialog, the mserver keeps alive in the taskmanager, the transcc process keeps waiting foerever, and the commandline window gets irresponsive untill you explicitly kill the mserver application.


qwerty(Posted 2013) [#111]
to marksibly

sony xperia sola MT27i (Android 4.0.4)


EdzUp(Posted 2013) [#112]
adb still doesnt quit on Windows Vista Ultimate with 67e I dont know if it supposed to be killed when monkey is exited but it doesnt atm.

Also doesnt get removed on linux either.