Wall running explanation?

Have you ever tried wall-running? It works the same way in real life.
 
when you move diagonally you move one pixel forward and one pixel sideways
instead of just one pixel forward
so it can be faster
And here I thought it was a quirk of the Doom engine and its endless clones.

Beautiful explanation, man.
 
when you move diagonally you move one pixel forward and one pixel sideways
instead of just one pixel forward
so it can be faster
To add to this. Modern games tend to use linear interpolation to avoid this issue. Basically you find the magnitude of the direction vector with

[I]sqrt[/I](x²+y²)

Then you normalize the vector by dividing x and y by the magnitude calculated above. This gives you a new vector that you would use in your movement code.

For example, if your direction is (1,1) then you'd do.

sqrt(1²+1²)=1.414
1/1.41=0.707
So your new direction vector becomes (0.707,0.707).
 

Users who are viewing this thread

Connect with us

Support this Site

RGT relies on you to stay afloat. Help covering the site costs and get some pretty Level 7 perks too.

Featured Video

Latest Threads

Remember Dave The Barbarian?

This is actually the ONLY show ever to both make me laugh like a maniac at age 12 and every...
Read more

VGM Covers, Parodies, Arranges

Share your favorite video game Covers!! Whether they be remixes, parodies...
Read more

Wall running explanation?

How come some old games had the player going faster when going against a wall at a certain angle?
Read more

Remove yellow color from old consoles/Controllers?

I have my old trusty PSone with a controller that is more yellow than its original white color...
Read more

Remember Angela Anaconda?

I know that this is a vastly disliked show, but I feel that a lot of it is unwarranted & the...
Read more

Online statistics

Members online
86
Guests online
949
Total visitors
1,035

Forum statistics

Threads
15,277
Messages
370,084
Members
896,480
Latest member
Aleeccc

Today's birthdays

Advertisers

Back
Top