Jump to content

Recommended Posts

Currently replacing my old HILARIOUSLY dumb ground-checker system with actual collision based physics. And it's been going great so far except I've come across the same problem I did with my old system.

After standing still for 30 ticks (exactly 1 second) physics collision callbacks just stop responding for that entity until you move again.

(Strangely enough, using a locomotor function refreshes the time for ALL entities on screen)

I'm guessing this might not be a bug but some sort of lag-reduction measure, but I can't figure out how to get rid of it.

Although I guess if I really can't fix it, I can just do what I did with the old system and just do RunForward() and Stop() on the same tick every 30 ticks to refresh the timer.

Hmm. Assuming I understood correctly, this might be because, in the original game, you don't need to have constant collision detection since there aren't a lot of moving objects that will collide. It would be inefficient to have it running all the time, so it probably turns off when the entity isn't moving.

 

With all the work you're putting into this, I think you might as well have started with another game engine (perhaps custom?). There are definitely some things that you won't be able to access through the lua API. I'm not sure if the physics are one of them.

Although, the distribution of the final game might be more difficult than uploading a mod.

 

This seems like what you are looking for: (Found in the 'prefabs/world.lua' file)

inst.entity:SetCanSleep(false)

 

Hm, it didn't seem to do anything. Plus, all players have this set to false already in playercommon.lua

 

Oh well, for now I've just set a timer to launch everyone at their current velocity every 29 frames and it seems to work fine.

With all the work you're putting into this, I think you might as well have started with another game engine (perhaps custom?). 

 

Are you kidding?! I don't know how to make a full game! I wouldn't have references to look off of, or other examples to study, or a cool community to ask for help from. Man I barely knew what I was doing when I started this, I am just taking "learning as you go" to the extreme. 

 

I made the entire Kaji character mod without knowing how to pass variables into a function.

how does that mod even function, I can't believe I pulled it off.

 

Plus, there are a few other reasons I need it to be a Don't Starve mod. For features yet to be revealed...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...