I was looking through some of my old demos and thought to myself, man, these are terrible. So I deleted them.
Macro Move, one of the deleted demos, was my first real attempt at making smooth diagonal movement using four directional keys rather than eight. It was far from perfect but it did the job for the most part. It was after reading this feature request that I decided to take another shot at it after having gained a bit more experience.
Simple Move is the result of that effort. I chose to build this as a library rather than a demo so users could drop it right into their game and have it working with minimal effort. The code itself should be fairly self-explanatory so I didn't bother cluttering it up with comments on every other line. I really don't like how comments can sometimes be needlessly long or wordy so I tried to keep everything simple and to the point. Hopefully anyone with at least a base level understanding of DM will be able to follow along quite easily.
There are three different movement types. DEFAULT is similar to the regular BYOND movement, only when holding two keys you will move in the direction of the key you pressed first. DIAGONAL will combine keys like NORTH and EAST to make you walk NORTHEAST. STRAFE will use movement similar to what's in Decadence where if you're walking NORTH and go to step EAST, your character will step NORTHEAST while still facing NORTH.
Simple Move is being released for free. You could donate if you'd like, but that's not necessary. If you notice any bugs or can't get it to work please let me know and I'll see what I can do.
Dec 23 2011, 5:04 pm