Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Adam Baxter
    @voltagex
    I'll need more help with the Minecraft side of it
    Russell Keith-Magee
    @freakboy3742
    That part I can’t help with :-)
    Adam Baxter
    @voltagex
    It's been so long since I used the decompilation stuff
    Russell Keith-Magee
    @freakboy3742
    But if you can find a “hello world” Java Minecraft plugin, I can show you how to convert that to Python.
    Russell Keith-Magee
    @freakboy3742
    The other approach is Rubicon - that takes the embedding route. It makes it easy (or… easier… :-) ) to use JNI to communicate between Python and Java runtimes
    Adam Baxter
    @voltagex
    Okay, will do. Probably starting at some point on Saturday
    I'll take a look at both
    Russell Keith-Magee
    @freakboy3742
    so you end up embedding the CPython interpreter as part of a Java C module, but then the Python bridge means you can access Java objects fairly transparently.
    Adam Baxter
    @voltagex
    Wonder if Flask would run there ;)
    Russell Keith-Magee
    @freakboy3742
    In Rubicon? Sure. In VOC… probably not.
    Rubicon is plain old CPython, in embedded mode.
    So any legal Python is still legal
    VOC would require an implmementation of the native parts of the standard libarry doing networking.
    Adam Baxter
    @voltagex
    So cool to see how far BeeWare has come
    dgelessus
    @dgelessus
    I wonder, does rubicon-java require CPython to be installed already, or is it sufficient to put the CPython native DLLs into the jar along with the rubicon-java classes?
    I'm asking because the usual installation process for Minecraft mods is "put this jar into this folder", possibly along with another jar as a dependency. Having to install a native dependency first would be very unusual.
    In any case, I'd guess that VOC would be the simpler option, because then the final jar would only contain regular class files and no special native dependencies.
    Russell Keith-Magee
    @freakboy3742
    @dgelessus I’m pretty sure they DLLs would need to be external - after all, they need to be picked up by the dynamic linker when the code runs, and the OS won’t have anything that can introspect.
    So yeah - it’s not going to lead to a very nice end-user experience… and I’m not sure it could be optimised all that easily
    The downside with VOC is that all you get is the language - you don’t get much of the standard library (at least, not at present)
    Whether that’s enough… kind of depends on your plugin, I guess :-)
    dgelessus
    @dgelessus
    I know of at least one other mod (https://github.com/mightypirates/opencomputers) that has a Lua interpreter as a native dependency, so it's not impossible to do. If VOC is not an option, it might be worth looking into how they handle their native DLLs.
    Russell Keith-Magee
    @freakboy3742
    @voltagex ^ Might be worth checking that one
    Russell Keith-Magee
    @freakboy3742
    Hey folks! A big milestone: Podium (BeeWare’s slide presentation tool) is now cross-platform - it works on both macOS and Linux! We’d love people to try it out; getting started instructions can be found here: https://github.com/beeware/podium
    We’re going to release packaged binaries (with Briefcase) once we’ve shaken out the bugs.
    We’d also love help to get this ported to Windows.
    Adam Baxter
    @voltagex
    @freakboy3742 so the minecraft thing...
    @freakboy3742 turns out that minecraft modding is still a mess, and it's quite difficult to make work
    and I may have bit off more than I can chew :/
    Russell Keith-Magee
    @freakboy3742
    @voltagex Awww… shucks. Oh well - thanks for trying anyway.
    Peter Bittner
    @bittner
    Is it possible to use the Canvas to do some kind of Arcade game programming? A simple form of agar.io (I'd guess that's a typical use case for otherwise using pygame).
    Russell Keith-Magee
    @freakboy3742
    @bittner Depends on how complex your use case is. I’d guess it’s possible to reproduce something like an old-school Asteroids clone - although you wouldn’t have sound.
    I can’t say I’ve tried, though.
    Keyboard input might be one thing missing
    although it wouldn’t be hard to crib a working solution from what WebView does.
    Peter Bittner
    @bittner
    When you look at agar.io, it's steered with moving the mouse (on the PC) and with touching the screen (on a mobile device).
    Russell Keith-Magee
    @freakboy3742
    Ok; just had a quick play. My immediate impression is that it’s not going to be possible out of the box right now, but I’d be interested in hearing what is missing, and how we’d integrate it.
    Peter Bittner
    @bittner
    (Side note: Take into account, I'm certainly lacking the game programming mindset and skills. Using pygame is hard for me. I'd like to do some kind of two for-loops, one that moves the screen, the other that takes user interaction into account -- or be that events, whatever.)
    Russell Keith-Magee
    @freakboy3742
    I’ll admit game programming isn’t really my thing either - but that’s due to a lack of personal interest
    so I’m not completely up to speed with how PyGame works, or how programming PyGame is different.
    Peter Bittner
    @bittner
    Same here. What about keyboard input, really? Would it be possible to wait for user input and then move (x, y) and draw an arc or something? That could be a nice starting "game" (aka "the screen changes when I press keys").
    Russell Keith-Magee
    @freakboy3742
    So - the approach I’d take would be a persistent “draw” loop that sleeps for 1/20th of a second between iterations implementing redraws, with a keyboard handler that updates the state/position of the objects being controlled.
    Adam Baxter
    @voltagex
    @freakboy3742 did you see my other screenshots on the toga issue?
    Russell Keith-Magee
    @freakboy3742
    @voltagex I commented on the thread a couple of hours ago; is there another update I’m not seeing?
    Adam Baxter
    @voltagex
    argh, notifications for emails aren't coming through
    GTK at 300% scaling is fine, Windows at any scaling other than 100% is truncating controls
    sidenote: it'd be really useful to be able to force Toga to load a specific backend (I think GTK will load on Windows if it's installed)
    Russell Keith-Magee
    @freakboy3742
    GTK is the only backend that is likely to be useful in that way; but if we ever get a working Qt or curses backend, the option to pick a backend might be useful
    Something like an environment variable would be relatively easy to add to toga/platform.py as an override for sys.platform.
    Dan Yeaw
    @danyeaw
    Great news on Podium support for Linux!
    Adam Baxter
    @voltagex
    SetProcessDPIAware is weird.