Experimental v67f now up!

Monkey Forums/Monkey Programming/Experimental v67f now up!

marksibly(Posted 2013) [#1]
Hi,

Just a few tweaks...


Added linux support for JDK_PATH in config.linux.txt.

Fixed broken transcc -modpath arg.

Fixed hex/bin syntax highlighting in Ted.

Added KEY_MENU (android) - check with KeyHit.

Added ANDROID_GAMEPAD_ENABLED for experimental gamepad support.

Added KEY_BACK (android back button) and KEY_CLOSE (glfw/desktop xna window close button). Check for these with KeyHit. Note: XNA KEY_CLOSE pretty dodgy. Clicking close but not actually closing the window seems to put XNA into a weird zombie state, where window has focus etc, but Game.IsActive returns false. Therefore, I'm currently ignoring Game.IsActive for desktop XNA. xbox/wp7 XNA should be a unaffected by this!

Changed #ifdef to #if for TARGET_OS_IPHONE checks in lang.cpp.

Fixed ios apps not installing properly on latest simulator (and attempted to future proof the process a bit).

Removed show-stopping stray back-tick from xnagame.cs.

Cleaned up android back button processing a bit - back button key events no longer eaten by GameView and KEY_ESCAPE/KEY_BACK now dispatched by Activity.onBackPressed() instead.

MODPATH setting added to bin/config.blah.txt config file.



Note: this should probably not be considered experimental any more - I'll be promoting it to 'full release' soon assuming there are no show stoppers in there.


therevills(Posted 2013) [#2]
Hi Mark,

I've just tried to run an example (Storyboard) from Diddy using v67e, and I get the following error:
Error : Duplicate identifier 'game' found in module 'monkeytarget' and module 'framework'.


Diddy uses a global "game" variable for convenience...

Global game:DiddyApp


If we change this to "diddyGame", it will break a lot of people's code. Do we have any other solutions?


Paul - Taiphoz(Posted 2013) [#3]
I think , and I know this may be selfish but it would be wiser if mark changes his variable, slap a suffix or prefix on there mark.


marksibly(Posted 2013) [#4]
I'll be looking into this (I think it's the name of the game module that's clashing) and will likely fix it BUT I think you should probably rename this anyway - a global 'game' var is just nasty, esp. in a module.


marksibly(Posted 2013) [#5]
> I think , and I know this may be selfish but it would be wiser if mark changes his variable, slap a suffix or prefix on there mark.

I don't think *either* of us should be using a global identifier called 'game' - it's just asking for problems like this.


ziggy(Posted 2013) [#6]
thanks. I'll give it a good test this weekend.


Paul - Taiphoz(Posted 2013) [#7]
Mark "I don't *either* of us should be using a global identifier called 'game' - it's just asking for problems like this. "

your right of course, I was trying to avoid me having to fix some of my code lol.


marksibly(Posted 2013) [#8]
Well, I've decided to rename brl.game to brl.gametarget which will 'fix' this issue for now and means you guys can get away with using a global 'game' var - but yuck!


slenkar(Posted 2013) [#9]
the last version (e) had a few issues
http://www.monkeycoder.co.nz/Community/posts.php?topic=4570
and I think there is bug with DeviceWidth on android

as it crashes on SetScissor using devicewidth()

just try compiling and running an android app that uses autofit on a real device
(dont know how it behaves on the emulator)


Rushino(Posted 2013) [#10]
@Mark great to know this is getting out of experimental soon! I will upgrade my project soon!


Amon(Posted 2013) [#11]
Recompile with -Xlint:unchecked for details.


Trying my game with 67f generates the above error! I'm compiling to Android.


AdamRedwoods(Posted 2013) [#12]
Trying my game with 67f generates the above error! I'm compiling to Android.

if that's miniB3D v0.33.4 then there's an error in opengl11.monkey, GetGLError(), then return 0 needs to be outside the if statement.


Amon(Posted 2013) [#13]
Sorry should have said I'm using diddy!

[edit] Any app using diddy with v67f fails with the same error.


Samah(Posted 2013) [#14]
If this is the game identifier clash, I believe therevills will be making that fix soonish.


marksibly(Posted 2013) [#15]
> If this is the game identifier clash, I believe therevills will be making that fix soonish.

I did a quick 'n' nasty reupload of v67f with a fix for the 'game' symbol clash (hey, it's Friday afternoon!) so you can leave diddy's 'game' as is if you want (although I'd *much* prefer 'DiddyGame' or something). I really need to work on import flexibility a bit here too...later.

The Android errors he's getting look like dependancies on the old (now removed) internal MonkeyGame class. You'll have to use the new BBAndroidGame etc classes now...

Also, looks like Sprite.Draw is illegally overloaded as the testAnimation sample is giving me a 'can't determine overload' error for player.Draw().


therevills(Posted 2013) [#16]
I'm in the process now of updating Diddy to work with v67.

Also, looks like Sprite.Draw is illegally overloaded as the testAnimation sample is giving me a 'can't determine overload' error for player.Draw().

That's strange, it use to work, I can see why it doesn't, but it did ;)
Method Draw:Void()

Method Draw:Void(rounded:Bool)

Method Draw:Void(offsetx:Float = 0, offsety:Float = 0, rounded:Bool = False)



ziggy(Posted 2013) [#17]
I can confirm that the modpath fix works as expected in all my tests.


Tibit(Posted 2013) [#18]
How do I get modpath to work??

This says "module monkey not found":

MODPATH=MODPATH="${MONKEYDIR}/modules";"C:\Google Drive\GameProjects\Monkey\MonkeyModulesFolder"

I have all my framework modules in /MonkeyModulesFolder/ and the onces that come with monkey in {MONKEYDIR}/modules

I tested in both TED and Jungle.


Amon(Posted 2013) [#19]
Unrelated to Monkey but what are the chances of being able to change the default colouring of Jungle. The dark theme doesn't do it for me. :)


ziggy(Posted 2013) [#20]
@Amon: I could very easily add a clear varation of it. It was white before being relased and I think the old skin should be compatible. that said, anything related to Jungle Ide, please, make it on the Jungle Ide threads or on the jungleide community (so we don't steal this thread about latest Monkey version)


slenkar(Posted 2013) [#21]
I forgot to mention the bug where the preprocessor arguments are ignored is on Linux

(e.g. admob ID, screen orientation)


tOmzone(Posted 2013) [#22]
Mark,

i still cant compile for XNA and also not for GLFW.
I get the following errors (i tried to translate into english) when i build for XNA:

error CS1502: The best match for the overloaded method 'c_IntObject.m_IntObject_new(int)' has some invalid arguments.
error CS1503: Argument '1': Conversion from 'void' to 'int' is not possible.

And for GLFW:
error C2664: 'c_IntObject::m_new': Conversion of parameter '1' from 'void' to 'int' is not possible.

Is it possible, that it has sth to do with the Non-Strict mode of monkey? Because I never write ":void" behind my methods that
return nothing. I just leave them without a specified returning type (so basically its int). It worked in v66.

edit: Yes, I deleted my build dir before trying to compile. And I installed the XNA redistributables and the XNA gamestudio files.


devolonter(Posted 2013) [#23]
Thank you! But OpenUrl still doesn’t work in GLFW (Mac) and iOS. Will it be implemented in non-experimental V67?


Grey Alien(Posted 2013) [#24]
OpenURL works fine for me on iOS in 66b. Did it break after that? Doesn't work in GLFW Mac for me in 066b.


therevills(Posted 2013) [#25]
I actually cant find the OpenURL code for iOS, but for GLFW the code is only there for Windows and Linux.


Skn3(Posted 2013) [#26]
How do I get modpath to work??

This says "module monkey not found":

MODPATH=MODPATH="${MONKEYDIR}/modules";"C:\Google Drive\GameProjects\Monkey\MonkeyModulesFolder"

I have all my framework modules in /MonkeyModulesFolder/ and the onces that come with monkey in {MONKEYDIR}/modules

I tested in both TED and Jungle.


Add this to your config file:
MODPATH="${MONKEYDIR}\modules;YOUR_MODULES_PATH_HERE;"



ziggy(Posted 2013) [#27]
How do I get modpath to work??
You'll get this functionality integrated into the preferences dialog of Jungle in the next Jungle update.


slenkar(Posted 2013) [#28]
ok it seems that the preprocessor directives are no longer being written to monkey.config but they actually show up correctly in the java source code of the actual app

also my android game doesnt crash anymore with the latest version (f)
so everything is working fine now sorry about that


EdzUp(Posted 2013) [#29]
Excellent will test asap :)


MikeHart(Posted 2013) [#30]
Building for the IOS simulator works now in v67f.


Alienforce(Posted 2013) [#31]
Win8 app (32/64/ARM) and Win8 Phone Works great!!!


marksibly(Posted 2013) [#32]
> error CS1502: The best match for the overloaded method 'c_IntObject.m_IntObject_new(int)' has
> some invalid arguments.
> error CS1503: Argument '1': Conversion from 'void' to 'int' is not possible.
> And for GLFW:
> error C2664: 'c_IntObject::m_new': Conversion of parameter '1' from 'void' to 'int' is not possible.

Can you please post some Monkey code so I can try and reproduce this?

In general, 'it doesn't work' reports like this are next to useless for me - *what* doesn't work? If I can't reproduce an issue, I can't fix it.

> Thank you! But OpenUrl still doesn’t work in GLFW (Mac) and iOS. Will it be implemented in non-experimental V67?

Yeah, will do.


EdzUp(Posted 2013) [#33]
works with all my projects here :D


devolonter(Posted 2013) [#34]
Yeah, will do.

Nice! Thank you for info.


Tri|Ga|De(Posted 2013) [#35]
If I try to compile to ex. iOS i get this error.

TRANS monkey compiler V1.46
Parsing...
Semanting...
Translating...
Building...
Can't find /* libs */ = {
TRANS FAILED: Failed to mung XCode project file


I also get an compile error with GLFW, Android, but HTML5 compiles.


MikeHart(Posted 2013) [#36]
I just tried Xcode with v67 and it works fine. Did you delete the build folder?


Tri|Ga|De(Posted 2013) [#37]
I deletede the build folder and get this error:
TRANS FAILED: Error executing 'xcodebuild -configuration Debug -sdk iphonesimulator', return code=16640
** BUILD FAILED **


The following build commands failed:
	CompileC build/MonkeyGame.build/Debug-iphonesimulator/MonkeyGame.build/Objects-normal/i386/main.o main.mm normal i386 objective-c++ com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
Done.


The GLFW works now.

I'm trying to compile this simple code:
Import mojo

Class MyApp Extends App


	Method OnCreate()
		SetUpdateRate 30
	End
	
	Method OnUpdate()

	End
	
	Method OnRender()
		Cls
	End
End


Function Main()
	New MyApp
End


I tried Firepaint example and cant compile that either.


Tri|Ga|De(Posted 2013) [#38]
Okay I made a new folder and copied the MonkeyPro67f files and now its okay.
I just did just override the older folders and files in my first attempt.


EdzUp(Posted 2013) [#39]
On me Mac Mini (Snow leopard 10.6.8, 4Gb ram) Ted crashed every time I started it from a USB Key ( I have it on a 8Gb USB Flash drive so I can use it with Windows/OSX/Linux without having to faff around with everything every time.

To sort it I had to delete the entries in the Ted config that related to my source files, once this was done it opened fine again. Ted crashed to the point I had to do a 'Force quit'. I had two source files in the config that was also opening from the USB key.


York(Posted 2013) [#40]
I just tried the new version 66f on iOS.

I'm not sure if it has been mentioned: I noticed that DeviceHeight() and DeviceWidth() return always 0 on my iPhone 4 (iOS 5). On my iPad Mini (iOS 6) they return the correct values.


ziggy(Posted 2013) [#41]
York: be sure to check DeviceHeight and DeviceWidth after the OnCreate has been fired.


York(Posted 2013) [#42]
Yeah. Thanks. Now I see that this only occurs in the OnCreate method.


tOmzone(Posted 2013) [#43]
Guys, can you compile this with XNA? Doesnt work here for me.

import mojo
#REFLECTION_FILTER = "*"
Import reflection

Function Main()
	New Program()
End

Class Program Extends App

	Method OnCreate()
		SetUpdateRate(60)
	End Method
	
	Method OnUpdate()
		If KeyDown(KEY_ESCAPE) Then Error("")
	End Method
	
	Method OnRender()
	End Method

End Class



MikeHart(Posted 2013) [#44]
...


tOmzone(Posted 2013) [#45]
Thanks for your fast answer. But it still does not work for me :(

I still get these erros:

error CS1502: The best match for the overloaded method 'c_IntObject.m_IntObject_new(int)' has some invalid arguments.
error CS1503: Argument '1': Conversion from 'void' to 'int' is not possible.

edit: The same problem exists with GLFW target


time-killer-games(Posted 2013) [#46]
I absolutely love this new version! Keep up the great work! =D


Playniax(Posted 2013) [#47]
Yes, the module path thingy rocks!


CopperCircle(Posted 2013) [#48]
Hi, just tried the OpenUrl command on IOS but it seems to do nothing?, should it not open the browser with the page I put in as the string?

Thanks.