Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Creating a ragdoll from scratch (What am I doing wrong?)

Author
Message
JLM
9
Years of Service
User Offline
Joined: 21st Jul 2015
Location:
Posted: 14th Oct 2016 01:10 Edited at: 14th Oct 2016 01:16
Hi guys,

I'm writing a simple ragdoll from scratch, but there's two thing acting weird that I'm unsure of.
1 - The joint limits I'm setting seem to have no effect, and;
2 - When in physics debug mode, all moving sprites have a line drawn from the sprite to the top left of the play area.

What's happening;
Once the "ragdoll" comes in contact with the floor, instead of just slumping over it rather explodes and the sprites go nuts all over the play area.

Check out the code below, no external images/resources (I lied, it does use one png, one pixel by one pixel, white, I'll link it below), so just paste/run.

Note: When running my code, be sure to close the player a few seconds after things go crazy, as it looks like it's starting a hefty memory leak when things go awry.

pxl.png (download resource image)

-Writing programs for years, new to AGK2

Attachments

Login to view attachments
CJB
Valued Member
20
Years of Service
User Offline
Joined: 10th Feb 2004
Location: Essex, UK
Posted: 14th Oct 2016 10:32
fyi: You can use CreateImageColor to create a 1x1 pixel image of any given colour.
V2 T1 (Mostly)
Phone Tap!
Uzmadesign

Login to post a reply

Server time is: 2024-11-25 01:59:36
Your offset time is: 2024-11-25 01:59:36