Hi,
I've been working on a project called Gorewörm - a fighting game where each player controls a wörm, trying to eat the other players while avoiding their heads. Each wörm will have their own special abilities and passives and stuff.. neat, huh?
Then I realized that what the game needed was physics, and I desided to use the Löve's physics system. Because of this dramatic change I started recoding the whole game. This is what I have at the moment:
Controls:
w / up to accelerate
a & d / left & right to rotate head
q to cut the other worm (debug)
e for screenshake (moar debug)
Also, try changing the window size!
There are a number of issues with it.
1) After you boost forward, the body whips around. Put some inertia in maybe? How?
2) Physics are inaccurate, resulting in wörms getting stuck at themselves, I know setMeter is the solution, I'm just not sure what the correct value would be.
3) setting vsync off affects physics, even though I'm using deltatime. Workaround?
I know it doesn't have graphics at the moment, my friend is working on it
The old version had pixel art by me, but it looked kinda terrible. And it isn't anywhere near finished, I've just been working on the new build for maybe a week, while still doing a lot of other stuff.
Once I get these things fixed and there are graphics and I put all the gamey stuff in I'll post a demo here.
Thanks
Physics help request! [Gorewörm]
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Re: Physics help request! [Gorewörm]
While I can't answer your questions I found it a bit odd that there is gravity.
Maybe a top-down approach would feel more natural?
Maybe a top-down approach would feel more natural?
Re: Physics help request! [Gorewörm]
You're applying force only to the first segment, which causes the whip motion. Spread the force over each segment equally.IndieLöver wrote:1) After you boost forward, the body whips around. Put some inertia in maybe? How?
This is where you need to experiment, I usually start with meter the size of my smallest object and work around that.IndieLöver wrote:2) Physics are inaccurate, resulting in wörms getting stuck at themselves, I know setMeter is the solution, I'm just not sure what the correct value would be.
Use a fixed time step for physics update and do as many updates as are currently needed to catch up. I.e. use 1/60 as deltatime, keep track of how much time has passed for your simulation and call physics update until you run out of time or up until x times so you prevent a death spiral (updates taking longer than deltatime resulting in an infinite loop).IndieLöver wrote:3) setting vsync off affects physics, even though I'm using deltatime. Workaround?
- IndieLöver
- Prole
- Posts: 29
- Joined: Mon Jun 10, 2013 8:49 am
Re: Physics help request! [Gorewörm]
Well, it will have different terrain, like water, air and ground and they all affect the worm gravity.rmcode wrote: Maybe a top-down approach would feel more natural?
Many thanks @Azhukar, the whip motion fix was so obvious!
Who is online
Users browsing this forum: Google [Bot] and 2 guests