Adds smooth movement/atom gliding, buffs everyone's speed by 2x. (#21662)

Revives https://github.com/Aurorastation/Aurora.3/pull/17215 with the
needed species changes.

As I said last time this was tried, the key issue is that our walkspeed
is a lot lower than any other server's. Even if we add atom gliding as
is, it would just look like gliding through molasses and would give you
motion sickness, because it takes a half-second to finish a glide to
another tile. Meaning that to compensate the movement speed has now been
significantly buffed for everyone. Yes, even dionae, G2, simple mobs,
everyone.

As compensation, m'sai/bishop/unathi sprint were especially nerfed
because otherwise they'd go lightspeed.



https://github.com/user-attachments/assets/7ba07389-b874-4a7d-8dd5-b5d3bfe611e4

---------

Signed-off-by: Matt Atlas <mattiathebest2000@hotmail.it>
Co-authored-by: Matt Atlas <liermattia@gmail.com>
Co-authored-by: VMSolidus <evilexecutive@gmail.com>
Co-authored-by: Batrachophreno <Batrochophreno@gmail.com>
This commit is contained in:
Matt Atlas
2026-02-03 17:17:11 +00:00
committed by GitHub
co-authored by Matt Atlas VMSolidus Batrachophreno
parent d002b8bd51
commit fa7214de3c
23 changed files with 179 additions and 43 deletions
+1
View File
@@ -397,6 +397,7 @@
#include "code\controllers\subsystems\sunlight.dm"
#include "code\controllers\subsystems\throwing.dm"
#include "code\controllers\subsystems\ticker.dm"
#include "code\controllers\subsystems\time_track.dm"
#include "code\controllers\subsystems\timer.dm"
#include "code\controllers\subsystems\trade.dm"
#include "code\controllers\subsystems\turf_fire.dm"
@@ -41,3 +41,6 @@
/// From base of area/Exited(): (area/left, direction)
#define COMSIG_MOVABLE_EXITED_AREA "movable_exited_area"
///called when the movable's glide size is updated: (new_glide_size)
#define COMSIG_MOVABLE_UPDATE_GLIDE_SIZE "movable_glide_size"
+24
View File
@@ -1,3 +1,27 @@
/**
* The minimum for glide_size to be clamped to.
* This is set to 1/32 to allow for up to 32 subdivisions of a single pixel move.
* Or 1024 subdivisions of a single tile movement.
* If you want it to look any better than this, beg Lummox for 64bit support.
*/
#define MIN_GLIDE_SIZE 0.03125
/// The maximum for glide_size to be clamped to.
/// This shouldn't be higher than the icon size, and generally you shouldn't be changing this, but it's here just in case.
#define MAX_GLIDE_SIZE ICON_SIZE_ALL
/// Compensating for time dilation
GLOBAL_VAR_INIT(glide_size_multiplier, 1.0)
///Broken down, here's what this does:
/// divides the world icon_size by delay divided by ticklag to get the number of pixels something should be moving each tick.
/// Then that's multiplied by the global glide size multiplier. 1.25 by default feels pretty close to spot on. This is just to try to get byond to behave.
/// The whole result is then clamped to within the range above.
/// Not very readable but it works
#define DELAY_TO_GLIDE_SIZE(delay) (clamp(((ICON_SIZE_ALL / max((delay) / world.tick_lag, 1)) * GLOB.glide_size_multiplier), MIN_GLIDE_SIZE, MAX_GLIDE_SIZE))
///Similar to DELAY_TO_GLIDE_SIZE, except without the clamping, and it supports piping in an unrelated scalar
#define MOVEMENT_ADJUSTED_GLIDE_SIZE(delay, movement_disparity) (ICON_SIZE_ALL / ((delay) / world.tick_lag) * movement_disparity * GLOB.glide_size_multiplier)
//Movement loop priority. Only one loop can run at a time, this dictates that
// Higher numbers beat lower numbers
///Standard, go lower then this if you want to override, higher otherwise
+3
View File
@@ -221,3 +221,6 @@
/// traits transparent turf
#define TURF_Z_TRANSPARENT_TRAIT "turf_z_transparent"
/// Unlinks gliding from movement speed, meaning that there will be a delay between movements rather than a single move movement between tiles
#define TRAIT_NO_GLIDE "no_glide"
+40
View File
@@ -0,0 +1,40 @@
SUBSYSTEM_DEF(time_track)
name = "Time Tracking"
wait = 100
runlevels = RUNLEVEL_LOBBY | RUNLEVELS_DEFAULT
var/time_dilation_current = 0
var/time_dilation_avg_fast = 0
var/time_dilation_avg = 0
var/time_dilation_avg_slow = 0
var/first_run = TRUE
var/last_tick_realtime = 0
var/last_tick_byond_time = 0
var/last_tick_tickcount = 0
/datum/controller/subsystem/time_track/Initialize()
return SS_INIT_SUCCESS
/datum/controller/subsystem/time_track/fire()
var/current_realtime = REALTIMEOFDAY
var/current_byondtime = world.time
var/current_tickcount = world.time/world.tick_lag
if (!first_run)
var/tick_drift = max(0, (((current_realtime - last_tick_realtime) - (current_byondtime - last_tick_byond_time)) / world.tick_lag))
time_dilation_current = tick_drift / (current_tickcount - last_tick_tickcount) * 100
time_dilation_avg_fast = MC_AVERAGE_FAST(time_dilation_avg_fast, time_dilation_current)
time_dilation_avg = MC_AVERAGE(time_dilation_avg, time_dilation_avg_fast)
time_dilation_avg_slow = MC_AVERAGE_SLOW(time_dilation_avg_slow, time_dilation_avg)
GLOB.glide_size_multiplier = (current_byondtime - last_tick_byond_time) / (current_realtime - last_tick_realtime)
else
first_run = FALSE
last_tick_realtime = current_realtime
last_tick_byond_time = current_byondtime
last_tick_tickcount = current_tickcount
+9 -2
View File
@@ -1,8 +1,8 @@
/atom/movable
layer = OBJ_LAYER
glide_size = 6
glide_size = 8
animate_movement = SLIDE_STEPS
appearance_flags = DEFAULT_APPEARANCE_FLAGS | TILE_BOUND
appearance_flags = DEFAULT_APPEARANCE_FLAGS | TILE_BOUND | LONG_GLIDE
var/last_move = null
/// A list containing arguments for Moved().
@@ -1070,3 +1070,10 @@
/atom/movable/proc/afterShuttleMove(obj/effect/shuttle_landmark/destination)
if(light)
update_light()
/atom/movable/proc/set_glide_size(target = 8)
if (HAS_TRAIT(src, TRAIT_NO_GLIDE))
return
SEND_SIGNAL(src, COMSIG_MOVABLE_UPDATE_GLIDE_SIZE, target)
glide_size = target
+1 -1
View File
@@ -285,7 +285,7 @@
energy = 7000
max_energy = 7000
regen_rate = 70 //100 seconds to full
slowdown = -1
slowdown = -0.3
instability_modifier = 0.9
cooldown_modifier = 0.9
@@ -10,7 +10,7 @@
desc = "The latest in sure footing technology."
item_flags = ITEM_FLAG_NO_SLIP
siemens_coefficient = 0.6
slowdown = -1
slowdown = -0.3
armor = null
cold_protection = FEET
@@ -298,7 +298,7 @@
icon_state = "scout"
item_state = "scout"
desc = "Armor designed for K'laxan scouts, made of lightweight sturdy material that does not restrict movement."
slowdown = -1
slowdown = -0.2
species_restricted = list(BODYTYPE_VAURCA)
armor = list(
@@ -15,7 +15,7 @@
BOMB = ARMOR_BOMB_PADDED
)
emp_protection = 100
slowdown = -1
slowdown = -0.3
species_restricted = list(BODYTYPE_HUMAN, BODYTYPE_UNATHI, BODYTYPE_SKRELL, BODYTYPE_VAURCA)
item_flags = ITEM_FLAG_THICK_MATERIAL
offline_slowdown = 0
@@ -260,7 +260,7 @@
BIO = ARMOR_BIO_SHIELDED,
RAD = ARMOR_RAD_SHIELDED
)
slowdown = -1
slowdown = -0.3
offline_slowdown = 0
airtight = 1
offline_vision_restriction = TINT_HEAVY
@@ -257,7 +257,7 @@
tail = "tajtail"
tail_animation = 'icons/mob/species/tajaran/tail.dmi'
slowdown = -1
slowdown = -0.4
brute_mod = 1.2
fall_mod = 0.5
@@ -383,7 +383,7 @@
stamina = 80
sprint_speed_factor = 1.2
slowdown = -2
slowdown = -0.6
standing_jump_range = 5
natural_climbing = TRUE
@@ -320,7 +320,7 @@ GLOBAL_LIST_INIT(golem_types, list(
bodytype = "Human"
slowdown = -2
slowdown = -0.6
brute_mod = 1.5
burn_mod = 3
@@ -345,7 +345,7 @@ GLOBAL_LIST_INIT(golem_types, list(
icobase = 'icons/mob/human_races/golem/r_cardboard.dmi'
deform = 'icons/mob/human_races/golem/r_cardboard.dmi'
slowdown = -1
slowdown = -0.3
brute_mod = 1.5
burn_mod = 3
@@ -656,7 +656,7 @@ GLOBAL_LIST_INIT(golem_types, list(
brute_mod = 1.2
burn_mod = 1
slowdown = -2
slowdown = -0.8
meat_type = /obj/item/ore/glass
@@ -711,7 +711,7 @@ GLOBAL_LIST_INIT(golem_types, list(
brute_mod = 1.2
burn_mod = 1.3
slowdown = -1
slowdown = -0.3
meat_type = /obj/item/stack/material/plastic
@@ -584,7 +584,7 @@
eyes = "zenghu_eyes"
brute_mod = 1.5
slowdown = -0.8
slowdown = -0.6
sprint_speed_factor = 0.6
sprint_cost_factor = 2
move_charge_factor = 2
@@ -200,5 +200,5 @@
brute_mod = 0.8
burn_mod = 2
fall_mod = 0
slowdown = -1
slowdown = -0.3
@@ -25,7 +25,7 @@
/singleton/maneuver/leap/tajara
)
darksight = 8
slowdown = -1
slowdown = -0.4
brute_mod = 1.2
fall_mod = 0.5
@@ -12,8 +12,8 @@
secondary_langs = list(LANGUAGE_SIIK_TAJR, LANGUAGE_DELVAHII)
slowdown = -0.8 //As opposed to -1 for Base tajara
sprint_speed_factor = 0.55 // As opposed to 0.65
slowdown = -0.2
sprint_speed_factor = 0.55
standing_jump_range = 2
stamina = 100 // As opposed to 90
brute_mod = 1.1 // Less Brute Damage
@@ -57,8 +57,8 @@
worked as hunters, later becoming warriors and soldiers as civilization developed."
species_height = HEIGHT_CLASS_AVERAGE
slowdown = -1.2 //As opposed to -1 for Base tajara
sprint_speed_factor = 0.75 // As opposed to 0.65
slowdown = -0.6
sprint_speed_factor = 0.75
standing_jump_range = 3
stamina = 80 // As opposed to 90
brute_mod = 1.3 // More Brute Damage
@@ -46,8 +46,8 @@
stamina = 120 // Unathi have the shortest but fastest sprint of all
stamina_recovery = 5
sprint_cost_factor = 1.45
sprint_speed_factor = 3.2
sprint_cost_factor = 1.75
sprint_speed_factor = 1.6
exhaust_threshold = 65
bp_base_systolic = 80 // Default 120
bp_base_disatolic = 50 // Default 80
@@ -73,7 +73,7 @@
icobase = 'icons/mob/human_races/vaurca/r_vaurcabb.dmi'
eyes = "vaurca_attendant_eyes"
slowdown = -0.8
slowdown = -0.6
brute_mod = 0.9
oxy_mod = 1
radiation_mod = 0.5
+12 -13
View File
@@ -186,8 +186,6 @@
if(mob.transforming)
return //This is sota the goto stop mobs from moving var
var/add_delay = mob.cached_multiplicative_slowdown
if(isliving(mob))
if(SEND_SIGNAL(mob, COMSIG_MOB_CLIENT_PRE_LIVING_MOVE, new_loc, direct) & COMSIG_MOB_CLIENT_BLOCK_PRE_LIVING_MOVE)
return FALSE
@@ -244,7 +242,6 @@
else
mob.inertia_dir = 0 //If not then we can reset inertia and move
if(mob.restrained()) //Why being pulled while cuffed prevents you from moving
var/mob/puller = mob.pulledby
if(puller)
@@ -259,15 +256,6 @@
move_delay = world.time + 1 SECOND // prevent spam
return FALSE
//If the move was recent, count using old_move_delay
//We want fractional behavior and all
if(old_move_delay + world.tick_lag > world.time)
//Yes this makes smooth movement stutter if add_delay is too fractional
//Yes this is better then the alternative
move_delay = old_move_delay
else
move_delay = world.time
if(mob.buckled_to)
if(istype(mob.buckled_to, /obj/vehicle))
//manually set move_delay for vehicles so we don't inherit any mob movement penalties
@@ -314,7 +302,6 @@
tally *= GLOB.config.walk_delay_multiplier
move_delay += tally
move_delay += add_delay
if(mob_is_human && mob.lying)
var/mob/living/carbon/human/H = mob
@@ -337,6 +324,16 @@
//We are now going to move
moving = 1
var/new_glide_size = mob.glide_size
if(old_move_delay + world.tick_lag > world.time)
new_glide_size = DELAY_TO_GLIDE_SIZE((move_delay - old_move_delay) * ( (NSCOMPONENT(direct) && EWCOMPONENT(direct)) ? sqrt(2) : 1 ) )
else
new_glide_size = DELAY_TO_GLIDE_SIZE((move_delay - world.time) * ( (NSCOMPONENT(direct) && EWCOMPONENT(direct)) ? sqrt(2) : 1 ) )
mob.set_glide_size(new_glide_size) // set it now in case of pulled objects
if(mob_is_human)
for(var/obj/item/grab/G in list(mob.l_hand, mob.r_hand))
switch(G.get_grab_type())
@@ -354,9 +351,11 @@
for (var/obj/item/grab/G in list(mob.l_hand, mob.r_hand))
if (G.state == GRAB_NECK)
mob.set_dir(REVERSE_DIR(direct))
G.affecting.set_glide_size(new_glide_size)
G.adjust_position()
for (var/obj/item/grab/G in mob.grabbed_by)
G.affecting.set_glide_size(new_glide_size)
G.adjust_position()
moving = 0
@@ -149,7 +149,7 @@
pass_flags = PASSTABLE | PASSGRILLE | PASSRAILING
range = 10
embed = 0
speed = 2
speed = 1
light_range = 4
light_color = "#b5ff5b"
+5 -5
View File
@@ -36,7 +36,7 @@ REVIVAL_BRAIN_LIFE -1
## This will globally modify the movement speed of all mobs.
## Note that it can do so unproportionally, meaning you'll lose the relationships between the different species. As such, modifying the delay multipliers below should be preferred.
WALK_SPEED 4
WALK_SPEED 3
## The following two will globally affect all movement speed, while retaining the proportional relationships between the different mob's movement speeds.
## Ideally, you want to modify these. Any value between 0 and 1 will increase speed by decreasing the movement delay, anything above 1 will slow everyone down by increasing the delay.
@@ -46,10 +46,10 @@ VEHICLE_DELAY_MULTIPLIER 1
## The variables below affect the movement of specific mob types.
HUMAN_DELAY 0
ROBOT_DELAY 1
MONKEY_DELAY 1
ALIEN_DELAY 1
ANIMAL_DELAY 1
ROBOT_DELAY 0
MONKEY_DELAY 0
ALIEN_DELAY 0
ANIMAL_DELAY 0
### Miscellaneous ###
+59
View File
@@ -0,0 +1,59 @@
################################
# Example Changelog File
#
# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb.
#
# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.)
# When it is, any changes listed below will disappear.
#
# Valid Prefixes:
# bugfix
# - (fixes bugs)
# wip
# - (work in progress)
# qol
# - (quality of life)
# soundadd
# - (adds a sound)
# sounddel
# - (removes a sound)
# rscadd
# - (adds a feature)
# rscdel
# - (removes a feature)
# imageadd
# - (adds an image or sprite)
# imagedel
# - (removes an image or sprite)
# spellcheck
# - (fixes spelling or grammar)
# experiment
# - (experimental change)
# balance
# - (balance changes)
# code_imp
# - (misc internal code change)
# refactor
# - (refactors code)
# config
# - (makes a change to the config files)
# admin
# - (makes changes to administrator tools)
# server
# - (miscellaneous changes to server)
#################################
# Your name.
author: MattAtlas, FluffyGhost
# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
delete-after: True
# Any changes you've made. See valid prefix list above.
# INDENT WITH TWO SPACES. NOT TABS. SPACES.
# SCREW THIS UP AND IT WON'T WORK.
# Also, this gets changed to [] after reading. Just remove the brackets when you add new shit.
# Please surround your changes in double quotes ("). It works without them, but if you use certain characters it screws up compiling. The quotes will not show up in the changelog.
changes:
- experiment: "Atom gliding is now in, which gives us smoother movement. Remember that this is affected by your FPS setting."
- experiment: "The baseline speed is now twice as fast for everything. Fast species were nerfed slightly to compensate."
@@ -291,7 +291,7 @@ GLOBAL_LIST_EMPTY(trackables_pool)
maxHealth = 50
health = 50
speed = 2
speed = 1
melee_damage_lower = 5
melee_damage_upper = 10