Search found 8 matches
- Thu Feb 02, 2012 12:42 pm
- Forum: Support and Development
- Topic: Collision Detection
- Replies: 4
- Views: 2421
Collision Detection
I'm aware of both love.physics and Hardoncollider. But I'd like to hand tailor my collision and also learn something. So far as I understand collision detection ordinarily works by comparing each object/surface to all the other objects in the scene? I can imagine it is optimized by first testing for...
- Thu Feb 02, 2012 3:01 am
- Forum: Support and Development
- Topic: Friction From Scratch
- Replies: 15
- Views: 8276
Re: Friction From Scratch
Alright yeah as stated I suck at math. Still a lot tho.MarekkPie wrote:x + x*2*2 = x + 4x, which is still linear.
If you had two objects that spawned two more objects that spawned two more objects...that all did the same thing, then it would be 2^x, which is exponentially.
- Wed Feb 01, 2012 9:52 am
- Forum: Support and Development
- Topic: Friction From Scratch
- Replies: 15
- Views: 8276
Re: Friction From Scratch
Frames are a measure of hertz yes, the smaller the linear timestep the more frames you need by x + x*2 and if you have 2 operations each frame that's then x + x*2*2. Yes?
- Wed Feb 01, 2012 8:53 am
- Forum: Support and Development
- Topic: Friction From Scratch
- Replies: 15
- Views: 8276
Re: Friction From Scratch
I'm not sure how these functions aren't reusable? You could use any length finding function to supply the length for this setlength function. Benefit being you still only need to compute the length once. I think this is very clear, functionally. Even if I don't use the absolute minimum amount of cha...
- Tue Jan 31, 2012 11:29 pm
- Forum: Support and Development
- Topic: Friction From Scratch
- Replies: 15
- Views: 8276
Re: Friction From Scratch
Hey, the reason I'm taking the old length is so you don't have to compute the length more than once. It's a bit funny that you are arguing about whether n*n or n^2 is faster but use sqrt(x*x,y*y) frivolously. :crazy: The length function is perhaps a bit complex yes. Most of it is just vestigal remna...
- Tue Jan 31, 2012 11:21 am
- Forum: Support and Development
- Topic: Friction From Scratch
- Replies: 15
- Views: 8276
Re: Friction From Scratch
Alright I vectored everything up. Works pretty well now. I've attached the new code if you want to check it out.
My next challenge would be collision detection. I have some ideas and some questions, should I just post them now or make a new thread?
My next challenge would be collision detection. I have some ideas and some questions, should I just post them now or make a new thread?
- Tue Jan 31, 2012 12:20 am
- Forum: Support and Development
- Topic: Friction From Scratch
- Replies: 15
- Views: 8276
Re: Friction From Scratch
Alright yeah I probably should have vectored it from the beginning. I just suck at math. :( To clarify what I'm doing is I find the approximate equivalent diagonal length to an orthogonal length given by 1/ sqrt2 then I normalize the vector to be positive and within a range of 0 - 1: --not really a ...
- Mon Jan 30, 2012 8:55 am
- Forum: Support and Development
- Topic: Friction From Scratch
- Replies: 15
- Views: 8276
Friction From Scratch
Ok this maybe sounds completely simple and obvious, but I just can't figure out what is wrong here. I've made a small circle that you can steer around using the arrow keys. The first thing I wanted to handle was to solve the "strafejumping" problem of full movement along two axes adding up...