New chipmunk 2d module issues

About Monkey 2 Forums Monkey 2 Development New chipmunk 2d module issues

This topic contains 3 replies, has 2 voices, and was last updated by  Mark Sibly 2 years, 5 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #4773

    abakobo
    Participant

    Looks like some extern functions are note recognised anymore.
    At least cpPolyShapeNew wich was working before..
    a hellochipmunk.monkey2 with a polygon is attached
    What is strange is that I can see its definition in chipmunk_extern.monkey2 so I don’t know what to do.

    AND..
    I’m having a crash at the doccing phase on the chipmunk docs

    [/crayon]
    Attachments:
    1. hellochimpmunk.zip
    #4778

    Mark Sibly
    Keymaster

    Oops, forgot to add these. Try latest master.

    The module doesn’t actually use chipmunk_extern.monkey2 any more, it’s really just there for reference.

    I’ve manually copied bits from this into body.monkey2, shape.monkey2 etc, so it’s possible I’ve missed more.

    #4814

    abakobo
    Participant

    had a try…

    the polyshape funcs definitions in shape.monkey2 still had cpBody Ptr as argument so I replaced them with cpBody..

    but polys are not showing!
    In debug Mode I get the following error (a small notice window) (w7&w10):
    MSV C++ Runtime lib.:
    This application has requested the runtime to terminate it in an usual way

    In release mode it’s running but I can’t see the polygon (that I was seeing using the previous “unmodified” chipmunk module with just the “const” hack)

    I just added this code to the hellochipmunk (after circle init):

    [/crayon]

    The full file is attached to a previous post.

    #4840

    Mark Sibly
    Keymaster

    the polyshape funcs definitions in shape.monkey2 still had cpBody Ptr as argument so I replaced them with cpBody.

    Thanks, will fix (along with others…).

    The other problem is actually ‘our’ fault! The ‘mass’ var is of type int, so when you assign 0.3 to it you’re really assigning 0, which chipmunk doesn’t like. It’d be nice to trap the error somehow too…

    With that fixed it runs fine – it’s actually really fascinating watching even simple physics happening!

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.