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 / 2D physics, can't get object to move more than 10 units per frame

Author
Message
Cybermind
Valued Member
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: Denmark
Posted: 8th Apr 2020 11:19
Hi, thanks for looking here : ) I'm experimenting with 2D physics, but I can't get a sprite to move more than 10 AppGameKit units per frame. I've set mass to 100, damping to 0, applied A LOT of force but it seems to cap movement at 10 AppGameKit units per frame. Why is that? I can generate an example if need be. Right now I'm thinking about scaling everything so that 10 AppGameKit units would be max speed in a scaled world, just curious if the cap.
13/0
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 8th Apr 2020 11:31
perhaps my blitzkrieg example will help
arrow keys move space shoots

fubarpk on Itch...………...https://fubarpk.itch.io/
fubarpk on googleplay..https://play.google.com/store/apps/developer?id=fubarpk
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 8th Apr 2020 21:28
There are two things that allow you to increase speed;
1) SetPhysicsScale(). Setting this to a small value should give you a modest increase in speed
2) The most effective (i think) it to set your virtual resolution very small. This gives you quite a significant boost in speed

Login to post a reply

Server time is: 2024-04-19 17:23:08
Your offset time is: 2024-04-19 17:23:08