Chipmunk + TimelineFX

About Monkey 2 Forums Monkey 2 Projects Chipmunk + TimelineFX

Tagged: ,

This topic contains 19 replies, has 6 voices, and was last updated by  peterigz 2 months ago.

Viewing 15 posts - 1 through 15 (of 20 total)
  • Author
    Posts
  • #6837

    peterigz
    Participant

    I had some old code from Blitzmax which used my own collision code, but thought I’d try doing it with Chipmunk instead. I really like Chipmunk and think it’d probably suit most of your collision needs. This demo uses chipmunk queries for culling off-screen objects, raycasting and any other general collisions and physics. I’d like to rewrite this as it’s all a bit of a mishmash after ripping out my own collision stuff, anyone interested in a full start to finish tutorial?

    #6839

    abakobo
    Participant

    That would be great!
    I planed to make some basic learning examples for chipmunk. The only thing I’ve not tested is the different joint types. Seeing how you’ve coded this adding timelineFX is quite interesting!

    #6840

    gasmonso
    Participant

    That would be awesome! I would greatly appreciate it as I’m sure would many others!

    #6848

    nerobot
    Participant

    +1.

    #7032

    peterigz
    Participant

    I’ve started a github repository for my monkey2 tutorials. I’m breaking everything down into parts and at the moment it is just heavily commented code (keeping it as simple as possible) which should still be useful. It should end up being quite a few parts and I might create a video tutorial for each part including the making of each effect used in TimelineFX.

    @Mark I’m still using a “Me” field to self reference the object so that it can be passed into the ChipMunk queries but I’m not sure how bad practice that is (it seems to work fine so far). You mentioned about updating the chipmunk module to change how this works with regards to passing monkey objects, any news on that (I know you’re busy!)? Or am I safe to keep using the Me method?

    Github: https://github.com/peterigz/Monkey2Tutorials

    #7034

    Mark Sibly
    Keymaster

    That’s fantastic, would love to see more!

    I’m still using a “Me” field to self reference the object so that it can be passed into the ChipMunk queries

    Should be fine as long as you remember to keep ‘me’ GC-alive somehow. Generally speaking, keeping ‘me’ in a stack or list or some container will do the job.

    I’m gonna be dealing with exactly the same issues soon when I tackle bullet physics for 3d and should be able to come up with a cleaner solution (although this isn’t all that bad!).

    #7523

    peterigz
    Participant

    This is now up to part 7, slowly getting there! Had lots of work come all at once but getting a bit more time again.

    Things are a bit more interesting in part 7 as you can now draw and erase tiles which are all added to the chipmunk space which automatically handles all the collisions. Next part will add scrolling around the map and parallax.

    #7526

    abakobo
    Participant

    That’s Nice and Clean! Great step by step tutorial. Congrats! Looking forward to see things exploding.

    #7680

    peterigz
    Participant

    Up to part 14 which is pretty much where I was at before I rewrote it all. You can have a look online with emscripten: https://www.rigzsoft.co.uk/files/spacecraft/SpaceCraft.html

    Controls: WASD to move about. Space paints rocks, backspace removes. Left mouse laser, right mouse tractor beam.

    I you wanted to compile part 14 you’ll need the latest version of TimelineFX, which is currently in review in the modules section, otherwise you can grab from GitHub here: https://github.com/peterigz/timelinefx.monkey2

    I want to do a YouTube walk-through from start to finish, and I’ll probably do it in much fewer parts (maybe even 1), it was just easier to do it broken up like that. Will probably tweak a bit more though, might add some lighting effects. Feel free to do your own thing with it!

    #7683

    Mark Sibly
    Keymaster

    Module has been updated and is now available via module manager!

    #11329

    nerobot
    Participant

    Is there way to disable simulation for custom body?

    I tried to use body.sleep function but got runtime error.

    Will try to temporarily remove body from world.

    EDIT: I found solution.

    #14604

    Diffrenzy
    Keymaster

    I was going to try TimelineFX out, but it seems to generate some errors with current mx2. Any plans for an update?

    #14605

    peterigz
    Participant

    It was running ok and I *think* I have the latest version of mx2 but will check later tonight and fix if there’s any issues.

    #14606

    Diffrenzy
    Keymaster

    Great! thanks for a speedy reply. I get an “invalid blend mode ” on Gameobject sample and then some other errors on Component sample, when I quick fix the blendmode thing.

    #14607

    peterigz
    Participant

    I fixed the Blendmode issue and uploaded a new version for Mark to verify, or you can grab from github: https://github.com/peterigz/timelinefx.monkey2

    I think those samples are just tests and not much to do with using the actual particle effects so everything else should be ok.


    Users who have liked this topic:

    • avatar
    • avatar
Viewing 15 posts - 1 through 15 (of 20 total)

You must be logged in to reply to this topic.