Anything related in any way to game development as a whole is welcome here. Tell us about your game, grace us with your project, show us your new YouTube video, etc.
All I need is how to resolve collision when the moving object is moving diagonally.
I have already implemented one-directional resolution but whenever the object moves diagonally the object jumps like he collided on the x axis ( because this is checked before y ).
Example code or article links are greatly appreciated.
Edit: Edited the subject because I am an idiot. SHOCKER!
Last edited by RandomDever on Thu Aug 09, 2012 6:11 pm, edited 3 times in total.
Yep I said that but that's not what I mean't.
Just simple rectangular collision which is Axis-aligned I guess.
Just so I don't have to edit the entire post again axis-aligned means no rotation right?
Thanks dandymcgee that first article worked like a charm.
I now have a basic physics engine.
BTW does anyone know why my rendering is jumpy?
It seems to jump consistently every second. So I render a square moving 60 pixels per second and every second it jumps ahead a few pixels. It's not super noticeable but it is noticeable.
RandomDever wrote:Thanks dandymcgee that first article worked like a charm.
I now have a basic physics engine.
BTW does anyone know why my rendering is jumpy?
It seems to jump consistently every second. So I render a square moving 60 pixels per second and every second it jumps ahead a few pixels. It's not super noticeable but it is noticeable.
I had that shit in my programs as well. I think it was something to do with the 60 FPS-limitation. After a second, it noticed that the program was running too fast, and then slowed down a bit. Or hurried up, depending on the CPU-speed.
I reduced the frame rate to 50 and seems to be better.
But running at such a low frame rate makes getting a fast velocity to look good difficult.
But I'll see how it looks when I test animation and I'll return here if I have any questions.
Marking as solved.