Mark Sibly

Forum Replies Created

Viewing 15 posts - 421 through 435 (of 1,431 total)
  • Author
    Posts
  • in reply to: Emscripten network socket #10969

    Mark Sibly
    Keymaster

    It look like emscripten emulates sockets with websockets, so yes/no. You’ll need a server that can handle websockets and I have no idea how you’d go about setting that up or how to interface with it. Also, the native socket code would need to be extensively rewritten – this thread is enough to scare me off for now:

    https://github.com/kripken/emscripten/issues/3611

    Its the kind of thing I think we’d need some real expert help with.

    If yer bored, give the new desktop sockets in develop branch a try. I came up with quite a few tweaks and fixes today and I think it’s mostly working now.

    in reply to: [Android] Wrap Java SDK #10968

    Mark Sibly
    Keymaster

    Have a look at the jni module and the std.requesters android code for OpenUrl, which is mixed c++/java.

    in reply to: Creating custom dialogs. #10967

    Mark Sibly
    Keymaster

    Dialogs have a ContentView property which is where you put the ‘contents’ of the dialog (which is often itself a DockingView that contains other views, or a list view etc) and you can use Dialog.AddAction to add “Okay”,”Cancel” etc buttons/actions.

    Open() and Close() are used to show/hide the dialog, and you can use fibers to ‘block’ until the dialog has closed (although you don’t have to).

    Here’s a minimal example:

    in reply to: [Android] Wrap Java SDK #10964

    Mark Sibly
    Keymaster

    You’ll need some to write a jni wrapper to access it from monkey2.

    in reply to: Socket closed/client disconnects #10951

    Mark Sibly
    Keymaster

    I’m still running echoserver_udp in server mode, try and connect if you want – email me for IP/PORT.

    in reply to: Socket closed/client disconnects #10950

    Mark Sibly
    Keymaster

    I hosted via port forwarding.

    The code is just the bananas code, but with the new client or server fibers commented out in the ctor.

    in reply to: Socket closed/client disconnects #10946

    Mark Sibly
    Keymaster

    Just tried both echoserver and echoserver_udp with nerobot in russia and both worked fine. Perhaps start with getting those working?

    in reply to: Best Practice: Class vs Struct and Array vs List #10919

    Mark Sibly
    Keymaster

    Hi,

    I recommend  Stack<T> as a good general purpose container. It behaves very much like an array you can add things too, eg:

    You can use Insert and Erase to insert and erase elements by index, Find to find the index of an element, Remove to an element by value etc.

    in reply to: Insectoids #10881

    Mark Sibly
    Keymaster

    Actually, doesn’t seem to be slowing browser down at all here, and both apps are running at 60hz.

    Focus does indeed need to be fixed – anyone know how to set focus to an iframe? Is there some trick to it? Could also a be a wasm issue I guess. And yes, would be nice to have apps properly suspend if they don’t have key/input focus.

    in reply to: Monkey 2 structure question? #10880

    Mark Sibly
    Keymaster

    Woah, that’s an interesting approach – why pre-rotate/scale everything? To make conversion eaiser?

    Anyway, mostly works here, though enemy bombs are strangely large and explosions have no alpha but apart from that it’s insectoids!

    Takes about 7 seconds to start in debug mode, but only about half a second in release.

    in reply to: Bug: Full Screen at the start #10878

    Mark Sibly
    Keymaster

    I think it’s an SDL/windows thing. This fixes it for me:

    (Note: you should be able to just go ‘App.Idle+=BeginFullscreen’ but that doesn’t work right now due to a bug I just fixed!)

    This effectively delays the call to BeginFullscreen until the next ‘batch’ of OS events has been processed. I’m not 100% sure why this necessary but I will keep looking.Worse case, I can just implement this ‘delay’ actually inside BeginFullscreen.

    in reply to: Bug: Full Screen at the start #10877

    Mark Sibly
    Keymaster

    Hmm, seems like it should work to me and could be an SDL thing. Will have a look.

    in reply to: Tuple experiment and usages #10876

    Mark Sibly
    Keymaster

    Thanks for that, will do some reading!

    I don’t actually think ‘()’ would be a problem after all. Comma separated list of types would be trickier due to ‘,’ in Local, Global etc decls, esp. if ‘named’ tuple members are allowed.

    in reply to: Insectoids #10869

    Mark Sibly
    Keymaster

    And again…? Stretch or resize?

    in reply to: Insectoids #10868

    Mark Sibly
    Keymaster

    http://monkeycoder.co.nz/insectoids/Insectoids.html

    I like how the ‘hot pink’ icon jumps out at you (very easy to spot monkey2 file type icons) but at that scale it’s a bit much! Might need to change it up…

    Pretty amazed wasm in an iframe works too, although can’t set focus?

Viewing 15 posts - 421 through 435 (of 1,431 total)