106 reputation
4
bio website
location Switzerland
age
visits member for 2 years, 3 months
seen Oct 12 at 9:14

Jul
10
comment Game getting progressively laggier?
I can try that, however answers I get on here can be useful for my later projects or in case I don't manage to improve anything after profiling.
Jul
10
revised Game getting progressively laggier?
added 736 characters in body
Jul
10
awarded  Commentator
Jul
10
comment Game getting progressively laggier?
Basically it does not have any intervals, it has a state variable which represents if the jump button is pressed. Then during every game step it checks if that state variable is true, if it is it basically moves the player further upwards, and if it isnt anymore it makes him fall normally. It also has a value that represents the maximal amount of time it will keep speeding upwards until it starts falling automatically. To interpolate some stuff related to the jumping I use Math.log() wuite a few times.
Jul
10
comment Game getting progressively laggier?
Well I have objects, which are players. Those don't need collisons yet, so they dont have any. Then I got my Platforms, which are described by 2 x values and one y value, and I basically check if a player "collides" with the line described by those values my platforms have.
Jul
10
comment Game getting progressively laggier?
@Tharwen That's one problem, I dont want to have to post my full code here, not only because I dont want you looking at it but also because it would be quite alot to put into a post here.
Jul
10
comment Game getting progressively laggier?
what do you mean by brute force collision detection?
Jul
10
awarded  Editor
Jul
10
revised Game getting progressively laggier?
added 133 characters in body
Jul
10
comment Game getting progressively laggier?
You sure about it? It's 32 KB of code, I really dont want to "force" anyone to read that much code. What I acctually wanted was some sort of list or something of things that cause such behaviour in general.
Jul
10
asked Game getting progressively laggier?
Jul
4
comment How do I interpolate air drag with a variable time step?
Also there is a little problem with the ln(), if 1-ktv0 is smaller than 0 it's a ln of a negative number, what doesn't work. EDIT: Nevermind, since k is negative that will never happen...
Jul
4
comment How do I interpolate air drag with a variable time step?
Or can I simply attach my '+g*v^2/2' to that? I dont think tough...
Jul
4
comment How do I interpolate air drag with a variable time step?
This is more like what I was searching for than the other answer, however I don't see g, the gravity, in your formulas. How would I put that into those formulas?
Jul
4
accepted How do I interpolate air drag with a variable time step?
Jul
4
awarded  Student
Jul
4
awarded  Scholar
Jul
4
comment How do I interpolate air drag with a variable time step?
I think I get your idea now... However I am worried about the "spiral of death" mentioned in the article you provided. I'll see what I can do about that. Thank you for your help!
Jul
4
comment How do I interpolate air drag with a variable time step?
To my understanding your code acctually calculates a frame for every tick, eventough the game loop only runs like once every e.g. 30 ticks. In that case your game still acts as tough it would make a step every tick, eventough it acctually makes a step every 30 ticks, but one that acts as tough it was 30 individual frames? Am I getting this right.
Jul
4
asked How do I interpolate air drag with a variable time step?