Pixel Projection - How-to? in Developer Help
|
|
Hi, i'm trying to figure out how does:
1) Pixel movement works in byond?
2) How to do it with projectiles.
I'm not asking for any code but any procs that may help with this or anything similar is welcomed and i can try to figure out myself.
Basically im trying to design my own pixel movement system and the pixel projectiles librarys aren't what im really looking for.
I'll know you'll ask me to reference up pixel_x and pixel_y but are there any maths involved in making a really good pixel projectile system?
|
Sure, and it's piss easy. Basically, you displace an atom's location every time it should move until it tries to move and it's already displaced "off" of its current tile, then you move it to the adjacent tile and readjust the displacing.
Though I don't know how fluid the results would be over a network and with multiple players nowadays, that is something to find out.
No differently than you'd do it with another movable atom such as a mob.
Just to make it clear, there's absolutely nothing to it other than using the pixel_* vars and BYOND's regular location/movement system (Move(), loc, etc).
If you want to do more in-depth collision detection than tile-based collision, you'll have to resort to some math to implement your bounding-box-based (or whatever you choose) collision, but nothing too groundbreaking. The rest is programming logic.
I believe there are many examples already on the forum and hub if you need a base or some pointers to get started from.