Monkey 2 » All Posts http://monkeycoder.co.nz/forums/forum/monkey-2-programming-help/feed/ Fri, 19 Apr 2019 09:40:18 +0000 http://bbpress.org/?v=2.5.14-6684 en-US http://monkeycoder.co.nz/forums/topic/banana-glwindow-test-black-output/#post-16169 <![CDATA[Reply To: Banana glwindow test black output]]> http://monkeycoder.co.nz/forums/topic/banana-glwindow-test-black-output/#post-16169 Tue, 09 Apr 2019 10:27:53 +0000 abakobo I had a small look and GLWindow extends Window and only has a few addition to Window. And Window works (there is this vsync issue with previous systems). So it’s looks doable. May be posting an issue on github could be interresting if you really need it working.
There is this vsync issue with different Mac systems for now and I’d love to see it solved as well as those gl issue. But Apple is not helping here..

]]>
http://monkeycoder.co.nz/forums/topic/banana-glwindow-test-black-output/#post-16167 <![CDATA[Reply To: Banana glwindow test black output]]> http://monkeycoder.co.nz/forums/topic/banana-glwindow-test-black-output/#post-16167 Sun, 07 Apr 2019 10:37:42 +0000 AdamStrange Nope, not operational 🙁

Mojo3d works, so there must be something to do with the GLWindow and the GL stuff that’s not correct anymore

]]>
http://monkeycoder.co.nz/forums/topic/android-keyboard/#post-16164 <![CDATA[Reply To: Android keyboard]]> http://monkeycoder.co.nz/forums/topic/android-keyboard/#post-16164 Sat, 06 Apr 2019 16:34:34 +0000 bosh77 Now I have another problem, I can’t detect the back button while the keyboard is active.

]]>
http://monkeycoder.co.nz/forums/topic/android-keyboard/#post-16163 <![CDATA[Reply To: Android keyboard]]> http://monkeycoder.co.nz/forums/topic/android-keyboard/#post-16163 Sat, 06 Apr 2019 06:52:27 +0000 bosh77 Thank You very much!!

]]>
http://monkeycoder.co.nz/forums/topic/banana-glwindow-test-black-output/#post-16162 <![CDATA[Reply To: Banana glwindow test black output]]> http://monkeycoder.co.nz/forums/topic/banana-glwindow-test-black-output/#post-16162 Sat, 06 Apr 2019 05:45:27 +0000 AdamStrange That’s very helpful information 🙂

I’ll do a quick hack and report back…

]]>
http://monkeycoder.co.nz/forums/topic/banana-glwindow-test-black-output/#post-16161 <![CDATA[Reply To: Banana glwindow test black output]]> http://monkeycoder.co.nz/forums/topic/banana-glwindow-test-black-output/#post-16161 Fri, 05 Apr 2019 13:42:11 +0000 abakobo here’s the commit mark made for the blank screen on mojave. it’s a sdl2 hack. But I thought you had made your own hack for your monkey2 fork. https://github.com/blitz-research/monkey2/commit/ce3a9ebdd92aa861358210e24c94d3d8c6a5631e
Maybe your problem has nothing to do with this blank screen issue on mojave, I haven’t tested the banana, just guessing here.

]]>
http://monkeycoder.co.nz/forums/topic/banana-glwindow-test-black-output/#post-16160 <![CDATA[Reply To: Banana glwindow test black output]]> http://monkeycoder.co.nz/forums/topic/banana-glwindow-test-black-output/#post-16160 Fri, 05 Apr 2019 07:35:06 +0000 abakobo Since Apple has deprecated opengl with Mojave there as been a lot of troubles. I think importing latest dev sdl2 would resolve the problem (and reverting back the displaylink commit for Mac vsync). I had a try but sdl2 is configured by default to dynamic linking and there is some hack to do to get it statically linked.

]]>
http://monkeycoder.co.nz/forums/topic/android-keyboard/#post-16159 <![CDATA[Reply To: Android keyboard]]> http://monkeycoder.co.nz/forums/topic/android-keyboard/#post-16159 Fri, 05 Apr 2019 07:17:01 +0000 abakobo Import sdl2 then it’s sdl2.SDL_StartTextInput( ) (and sdl2.SDL_StopTextInput( ) )

]]>
http://monkeycoder.co.nz/forums/topic/float-rounding/#post-16157 <![CDATA[Reply To: Float rounding]]> http://monkeycoder.co.nz/forums/topic/float-rounding/#post-16157 Thu, 04 Apr 2019 13:00:24 +0000 DruggedBunny That looks much more appropriate — you should never use floats for anything that requires accuracy, in any language!

They’re inaccurate by design as they have to work within a set number of bits.

Try this simple, obvious division:

Here, it prints 0.10000000000000001, but the result may vary on different platforms/targets, and this is to be expected for floating point numbers — they simply can’t represent all decimal numbers accurately.

Anyway, you’ve figured out a solution that looks good for currency.

]]>
http://monkeycoder.co.nz/forums/topic/float-rounding/#post-16156 <![CDATA[Reply To: Float rounding]]> http://monkeycoder.co.nz/forums/topic/float-rounding/#post-16156 Thu, 04 Apr 2019 12:12:54 +0000 jondecker76 For anyone else having a similar issue, I just made a simple currency class to ensure decimal rounding is handled as expected.  It’s nothing fancy, but does what I need it to do anyways

 

]]>