home.social

#pymunk — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #pymunk, aggregated by home.social.

fetched live
  1. A quick sketch with my #pymunk helpers (to test some pickle enabling improvements)
    The sketch-a-day archives and tip jar are at: abav.lugaralgum.com/sketch-a-d Code for this: github.com/villares/sketch-a-d #Processing #Python #py5 #CreativeCoding

    PS: Warning - you should not be loading pickle files from unknown folks from the Internet, you know? 00xmora.github.io/posts/Pickle Just save and load you own pickle data!

  2. More #pymunk experiments, I think I have a basic "experimental helpers" module with a few wrapper classes.
    The sketch-a-day archives and tip jar are at: abav.lugaralgum.com/sketch-a-d Code for this: github.com/villares/sketch-a-d #Processing #Python #py5 #CreativeCoding

  3. WIP I'm pursuing an idea I discussed with Ramalho once about making some thin class wrappers around #pymunk objects to simplify creation (and py5 drawing) of the simulations. The sketch-a-day archives and tip jar are at: abav.lugaralgum.com/sketch-a-d Code for this: github.com/villares/sketch-a-d #Processing #Python #py5 #CreativeCoding

  4. I have built a new bundling of Portable Thonny #Python IDE for #WIndows with #py5 and some other libraries pre-installed (#shapely, #trimesh, #pymunk & etc.) it would help me if people could test it:

    github.com/villares/thonny-por

    More about this (and example code to test!) at abav.lugaralgum.com/como-insta

    On other news, I would love to find someone with #MacOS dev skills willing to volunteer re-packaging Thonny with py5 for MacOS

  5. I made a little hourglass demo using #Pymunk (2D physics) and #Tkinter ( #TCL / #Tk Gui via #Python). It's nothing special, but fun to watch.

    codeberg.org/sforman/OddsAndEn

  6. A small Pymunk example for class.
    No interactive segment-wall drawing for this one. And I can't use pickle for this sketch in imported mode :(
    (see previous day for both features and the triangulated polys!) Code at: github.com/villares/sketch-a-d
    More sketch-a-day: abav.lugaralgum.com/sketch-a-d
    If you like this, support my work:
    paypal.com/donate/?hosted_butt
    liberapay.com/Villares
    wise.com/pay/me/alexandrev562
    #pymunk #Processing #Python #py5 #CreativeCoding

  7. I want to simplify #pymunk + #py5 use for my students but I struggle with finding good strategies… Pymunk has two types of (linked) objects for each simulated object: body and shape. For complex objects (like concave shapes) you can use more than one convex shape linked to the same body. In these cases I usually want to have an extra shape to draw and hide the triangulation.
    I don't want to keep extra data structures to track the simulation objects to draw. I tried both extending and monkey patching either body or shape objects to be "drawable" so I can just iterate the native pymunk structures and ask stuff to draw themselves (would be nice, huh?), but there is always some snag. If I extend shape classes, I stumble on the complex objects with many shapes drawn with divisions. If I extend the Body class, the problem is static objects have shapes but share a virtual constant body, more of a flag, so I can't add anything to it, so back to keeping track of a separate list of static shapes… Then performance & serialization issues, I want to be able to easily pickle simulations, but if I add Py5Shape objects to the extended/modified classes they become unpickable...
    I have bigger fishes to fry right now (the paralyzing PhD) but this is something I would like to pair with someone more experienced to work on.

  8. I'm obviously completely biased, but, if you are an educator teaching #Python and using #pygame / #pygamece, do check out #py5 (py5coding.org).

    I'm sure other sprite & game stuff must be easier in pygame, but I'm adapting a #PyMunk example, and IMHO, events are so much easier in py5...

    (I'll try post it here tomorrow, I should be doing something else, as usual...)

  9. Schlangenfraß: Video-Tutorials zum Wochenende

    Da mein Programm für die nächsten Wochen oder gar Monate darin besteht, mindestens die ersten drei Kapitel aus Daniel Shiffmans »The Nature of Code« nach Python und Pygame zu portieren und um eigene Beispiele zu erweitern, habe ich mir zur Vorbereitung erst einmal ein paar Video-Tutorials herausgesucht, die ich Euch nicht vorenthalten möchte: kantel.github.io/posts/2025022 #GameDev #Python #Pygame #Pymunk #VPython #Trinket #NatureOfCode

  10. Weiter mit der Python Arcade Bibliothek?

    Die jüngste (Wieder-) Entdeckung der Python Arcade Spielebibliothek hat mich ziemkich gefesselt und die letzten Tage nicht in Ruhe gelassen. Und so habe ich weiter mit ihr experimentiert und dabei einiges gelernt: kantel.github.io/posts/2025021 #Python #GameDev #Arcade #Pyglet #Pymunk

  11. Updated: Sharing today a new version of my #Thonny portable (the beginner friendly #Python IDE) with #py5 #shapely #trimesh and #pymunk pre-installed. This "re-packaged distribution" makes it easier for my students to have a #CreativeCoding environment on Windows, and is specially useful for school labs with installation constraints...

    Please help me test it!
    github.com/villares/thonny-por
    Some code: abav.lugaralgum.com/como-insta

    I'd like help to build and sign a MacOS "equivalent" and maybe make a Linux AppImage, I'm not sure if AppImage will work as it would need to let people install further libraries. DM of you'd like to help!