Experimental v81b now up! [MONKEYNEWS]

Monkey Forums/Monkey Programming/Experimental v81b now up! [MONKEYNEWS]

marksibly(Posted 2014) [#1]
Hi everyone,

[edit]
v81b now up

Linux version is now 64 bit - this may not be permanent, just wanted to get it going mainly. Several fixes/updates to recent glfw3 module too. See info below.
[/edit]

Experimental version 81a is now up!

The major change is the addition of the glfw3 target. Unfortunately, this may not be quite 100% quite stable, as it's based on the glfw repository instead of the release version due to a couple of Mac issues, but it seems to work pretty well so far. For now, I'd probably recommend sticking with glfw2 for releases.

There's also a quicky config setting for glfw3 in there - GLFW_WINDOW_SAMPLES - which you can use to try out multisampling, eg: #GLFW_WINDOW_SAMPLES=4. Maybe. I gave it a VERY quick try out earlier and I think it did something? Ultimately, this needs to be controllable at runtime, so commands will need to be added, but it might be fun to play with for now.

Also, I renamed the target names at they appear in the TARGET.MONKEY files. This controls the names that appear in the IDE target selection combo box (and that should be all it affects!) and was done just to clean up the plethora of targets a bit - it was getting pretty confusing. I'd also like to rename the actual dirs, but that's a bigger deal that can wait.

Note that if you writing an Android app that uses iap, you should now use the API 10 Android target, not the API 3 one, because IAP will not work in API 3 apps starting Jan 2015. In fact, I really should rip the iap stuff out of the API 3 target - next release!


***** v81b *****

Added #GLFW_WINDOW_DECORATED to glfw3 target - set to 'false' to create a borderless etc window.

Fixed macos glfw3 audio not working.

Ant now referenced by absolute path in android builder because Yosemite...

Fixed glfw/glfw3 targets so they can build with mingw64 (TDM-GCC-64 tested). Building with mingw64 will produce 64 bit apps by default.

Removed forced 32 bit architecture for macos stdcpp builds.

Moved some hard coded gcc options from transcc to makefile for glfw target.

Added AppPath/AppArgs/SetEnv/GetEnv/ChangeDir/CurrentDir/Execute/ExitApp to brl.process - brl.filepath, brl.filesystem and brl.process should now be preferred over os module (although that wont be going anywhere just yet).

Added src/mserver/mserver.monkey, src/launcher/launcher.monkey and src/rebuildall.monkey for linux 64.

Renamed src/monkey->src/launcher; removed src/modman.

Added #GLFW_VERSION int var to glfw targets.

Fixed glfw3 window resizing not updating DeviceWidth/DeviceHeight.

Fixed weird yosemite issue where ant wasn't found when building for android.


***** v81a *****

Renamed a bunch of targets - see IDE combo box. Shouldn't affect monkey code?

Added new glfw3 target (note: had to apt-get install libxcursor-dev and libxinerama-dev on Linux)

More extern extends null fixes for debugger/gc.

Fixed bug where extern 'extends null' objects confused cpp debug builds.

Tweaked android audio so pool.stop() isn't inadvertantly called twice.




Playniax(Posted 2014) [#2]
Thanks Mark!


dopeyrulz(Posted 2014) [#3]
Great!


nigelibrown(Posted 2014) [#4]
Thank you for this, required for dual screen game I have been working on. Any chance of undecorated windows to enable this now? #GLFW_WINDOW_BORDERLESS=True


ziggy(Posted 2014) [#5]
Awesome! XD Just in time for our next project


Snader(Posted 2014) [#6]
Nice work Mark!


Xaron(Posted 2014) [#7]
Nice, thanks for that and your sign of life! ;)


SLotman(Posted 2014) [#8]
Mark, I'll ask again: is there any hope for us to have a #TARGET_NAME to check inside Monkey?

It would help, in cases like having a HTML5 target and a FirefoxOS target for example (Both HTML5, but the second one needs some extra stuff to work without problems)...


CopperCircle(Posted 2014) [#9]
Thanks :)


Koradin(Posted 2014) [#10]
Thanks, Mark. Appreciate all you are doing!


marksibly(Posted 2014) [#11]
> Mark, I'll ask again: is there any hope for us to have a #TARGET_NAME to check inside Monkey?

Could you describe what you're after a bit better?

In the case of a specialized firefox target, my advice would be to:

* Copy the existing html5 target - rename the dir html5_firefox or something.

* If necessary, add something like #HTML5_FIREFOX_APP=True to the html5_firefox/modules/monkeytarget.monkey file. Monkey code can then use...

#If HTML5_FIREFOX_APP
...I'm special!...
#Endif

...for special case code. Note that is only works due to a recent change that means #If blah can be used with un-defined blah, in which case it returns false. It used to cause a compile error.

Just renaming the value returned by #If TARGET (if that's what you mean) is a non-starter as it'll break lots of existing code. Perhaps you mean something like #If SUBTARGET? I've thought about that too, but don't see how it's any better than #If HTML5_FIREFOX_APP above - in some ways, it's worse coz' you're likely to end up with #If SUBSUBTARGET sooner or later!


Erik(Posted 2014) [#12]
We want this in trans:

config.monkey   File [\modules\trans\config.monkey]
Global ENV_TARGET_NAME$   <13>

builder.monkey   File [\src\transcc\builder.monkey]
ENV_TARGET_NAME=tcc.target.name   <47>
SetConfigVar "TARGETNAME",ENV_TARGET_NAME   <59>  


So we can write this:

#If TARGET="glfw" Then

  #If TARGETNAME="Desktop Game (Glfw2)" Then
    Import "native/native.glfw2.cpp"

    Extern
      Function MouseZ:Int()="native::MouseZ"
      Function SetMousePos:Void(x,y)="native::SetMousePos"
      Function SetBorderlessWindow:Int()="native::SetBorderlessWindow"

  #End

  #If TARGETNAME="Desktop Game (Glfw3)" Then
'    Import "native/native.glfw3.cpp"
    Function MouseZ:Int()
      Print "TODO: MouseZ for glfw3"
      Return 0
    End
    Function SetMousePos:Void(x,y)
      Print "TODO: SetMousePos"
    End
    Function SetBorderlessWindow:Void()
      Print "TODO: SetBorderlessWindow"
    End
  #End
#End


Perhaps I'm missing something about how it's supposed to work?


marksibly(Posted 2014) [#13]
I'd be more in favor of something like: #If GLFW_VERSION=2 etc. This could be added to the monkeytarget.monkey file easily enough.

There are a few things I don't like about making TARGETNAME a var. For one, it'd lock target name completely, ie: I wouldn't be able to mess with it as freely as I just have with risking breaking a bunch of code.

But more importantly, It'd cause problems for anyone wanting to 'fork' glfw2 or glfw3 - they'd HAVE to create a new target name for their new target, so any code that relied on TARGETNAME would suddenly break under the new target.

The other option is to add something new, like #SUBSYSTEM, but I can't think of anything this would solve that GLFW_VERSION wouldn't.

I can easily enough add GLFW_VERSION - any other requests like this? ANDROID_OUYA?

Android API level is a bit trickier as it involves the manifest file so it really needs to be read from manifest somehow. But doable if needed.


SLotman(Posted 2014) [#14]

* If necessary, add something like #HTML5_FIREFOX_APP=True to the html5_firefox/modules/monkeytarget.monkey file. Monkey code can then use...

#If HTML5_FIREFOX_APP
...I'm special!...
#Endif



Oh! didn't know this would work now! It is exactly what I need, thank you!!! :)


itto(Posted 2014) [#15]
Great Mark! :) What will you be working next?


Erik(Posted 2014) [#16]
GLFW_VERSION sounds great.


MonkeyPlotter(Posted 2014) [#17]
Thanks for the latest update, ;)


golomp(Posted 2014) [#18]
Thank you Mark, you are always at state of art.
(shame on me i am still programming with V77F... tss tss...)
(but from time to time i try new functionnalitys on Mark's experimental versions)


Nobuyuki(Posted 2014) [#19]
much appreciated! GLFW3 to the moon!


nigelibrown(Posted 2014) [#20]
Sorry to ask again but: Any chance of undecorated windows?


skid(Posted 2014) [#21]
On Mac GLFW has working audio but GLFW3 seems to be broken.


Leginus(Posted 2014) [#22]
Thanks Mark. Your work is really appreciated


slenkar(Posted 2014) [#23]
If I have 32 bit linux I just need to execute rebuildall.sh?


Koradin(Posted 2014) [#24]
Many thanks for the GLFW3 fixes and especially the 64 bit capable build! Appreciate it!


marksibly(Posted 2014) [#25]
> If I have 32 bit linux I just need to execute rebuildall.sh?

You'll also need to rebuild ted, which involves installing qtcreator.

I'm not sure if linux mokey will be going full 64 bit just yet. If there are people who still use 32 bit linux (and can't upgrade for some reason - does this include you?) I'll probably just stick with 32 bit releases.

But I wanted to get linux monkey going on 64 bit (since I'm using 64 bit linux myself now on a new-ish machine) so I thought it'd be interesting to release/discuss.


EdzUp(Posted 2014) [#26]
I use 32bit Linux on a eeepc 701sd as the cpu is 32bit, will have a look at getting bigger better hardware as soon as but its a small netbook and is brilliant for monkey and max coding. Would it be possible to have a 32bit Linux desktop target AND a 64bit one it could be under Desktop 32bit and Desktop 64bit?


MikeHart(Posted 2014) [#27]
I noticed that in V81b, on OSX 10.8.5, when starting Monkey, TED and MServer, OSX mentions these app being from an ussigned developer so they don't start at first. You need to start each one via the context menu so they start from within the apps too. This never happend before.


slenkar(Posted 2014) [#28]
yeah I still just have a 32 bit desktop


EdzUp(Posted 2014) [#29]
Is it just me or does this version of monkey take ages to start to compile, after the building process the system takes at least ten to eighty seconds to start the process?


nigelibrown(Posted 2014) [#30]
Thank you for making #GLFW_WINDOW_DECORATED accessible, next request, can you please add SetDevicePosition(xpos,ypos) as my Dual screen device is centered on the main monitor and I need it at 0,0 to enable it to span both. I have added the command to my version of 81b calling glfwSetWindowPos( _window, xpos, ypos ); and it works as expected.


slenkar(Posted 2014) [#31]
tried to compile mserver in Monkey81 with monkey80
/root/Dropbox/Monkey/src/mserver/mserver.monkey<205> : Error : Identifier 'AppPath' not found.

EDIT-ah I had to compile transcc then I could compile mserver :)


Sub_Zero(Posted 2014) [#32]
@Mark: Are you planning on implementing openal64 will the x64 executable utilize openal32?

I get this:

c:/testsdks/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.8.1/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible ../openal/libs/Win32/OpenAL32.lib when searching for -lOpenAL32


Keep up the good work btw :)


slenkar(Posted 2014) [#33]
Is there some kind of new connection between html5 and mserver?

Sometimes my game locks up and when I click on mserver it starts again

this is with both the new and old mserver

EDIT- oh the game was on release mode and it was crashing because of an operation on an empty list.
So clicking mserver must have made the game continue after crashing


EdzUp(Posted 2015) [#34]
Is there something im doing wrong as I cannot execute any of the monkey executables on Linux, I can run 80c perfectly but 81b doesnt open at all and isnt recognised. I have it set to executable and all the relevant permissions are there just the Monkey, Ted etc apps dont do anything when clicked

has something changed between 80c and 81b?


dawlane(Posted 2015) [#35]
I think that Mark did say somewhere that the binaries for Linux would be 64bit as that's what a lot of Linux users are using. Use an earlier version of Monkey to recompile the later versions of MonkeyX and install Qt Creator for Ted.


EdzUp(Posted 2015) [#36]
Ok, another layer of faffing around :/