Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Code Gallery (https://forums.graalonline.com/forums/forumdisplay.php?f=179)
-   -   Bare Bones Movement (https://forums.graalonline.com/forums/showthread.php?t=78043)

DustyPorViva 12-24-2007 04:17 AM

Bare Bones Movement
 
1 Attachment(s)
Started a thread about this in the scripting section, and I've completed it for now, so I thought I'd post it. This is a bare-bones movement system. So all it can do is:
> lets you walk
> Lets you sit and swim
> wall detection is near-perfect, at ANY speed. I have tested this on a gmap at the speed of 10 tiles/0.05 second and it was flawless. I wouldn't even pass through a single-width tile. It's really fun on a gmap :P
It even words at odd speeds and such.

Anyways, here's the script(bad request :/). Please post comments, suggestions. I'm aware of the following problems:
> I do not check for a wall on the side of the player when walking around a wall.
> Hitting a wall from the left or going up is not 'flush', due to the way the loop and detection works. It's not apparent visually, but it creates an odd floating number with the players x/y position.

Future additions:
> Dynamic platform jumping. No more will you only be able to jump down a cliff if it's short enough! I know the formula and I plan on making it so you can jump down any cliff height!
> Diagonal wall-check. Hate the fact that walking against a cliff wall that's diagonal treats it like a square tile? No more, I plan on making it so walking against a 'diagonal' looking tile will cause you to actually walk diagonally.

Switch 12-24-2007 04:20 AM

Short script
Complex :p

gemini2 12-24-2007 11:38 PM

Very nice script, and I can't wait for those future additions :D

pokeSMOT 02-09-2008 06:39 AM

OMG! This movement system is awesome. I hope you don't mind that I'm using it <3

Inverness 02-09-2008 07:09 AM

That huge block of math at the bottom collapsed my brain.


All times are GMT +2. The time now is 01:40 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.