Collision & Gravity

Posted by Scott_AW on May 29, 2007, 5:35 p.m.

Collision and gravity, jumping and crouching. Sink and swim.

Its not 100% perfected but its pretty darn good when comparing how much time it took to implement.

Since I had already coded collisions into my maps it was simply a matter checking map info to player info. Gravity turned out to be easier to do then I thought, so heres a demo. I capped the fps at 30 for overal speed testing, as in how fast do I really want the game to run. Day and night also passes by quickly to display the smooth transition. There is no sky yet.

Tech Demo here –> http://64digits.com/users/Scott_AW/engine_build_06.zip

You now have the option to compile or load a level. Currently a level is already compiled as low, if you want it higher select compile instead of load. If you don't want to wait forever for it to compile the level, press load instead.

'T' will enable/disable water.

Be brutal with it so I know what needs to be fixed or tinkered.

Comments

noshenim 17 years, 6 months ago

hmm. maybe smoother collisions?

basicly set the moving to xp and yp instead of directly moving x and y. if xp is free x+=xp and yp, y+=yp…

eagly 17 years, 6 months ago

Its looking good, although I had problems when trying to get out of the water back onto land. You might want to look into that.

Looks like you're making good progress. :)