pixel-perfect rendering, all sprites have same 1:1 scale

This commit is contained in:
azykov@mail.ru
2026-09-09 19:10:50 +03:00
parent 4e30c585d1
commit 43f6004fb0
16 changed files with 340 additions and 137 deletions
+7 -7
View File
@@ -13,31 +13,31 @@ export const TWIGS_PER_TREE = 2;
export const TWIGS_PER_BUSH = 5;
/** How close the character must get to a node's center to start chopping it. */
export const INTERACTION_RADIUS = 56;
export const INTERACTION_RADIUS = 19;
/** Radius of the circle around a node that ejected resources can land in. */
export const DROP_EJECT_RADIUS = 70;
export const DROP_EJECT_RADIUS = 23;
/** Seconds for a resource's ballistic flight from the node to its landing spot. */
export const DROP_FALL_DURATION = 0.5;
/** Peak height (px) of a resource's arc while falling from the node. */
export const DROP_FALL_ARC_HEIGHT = 40;
export const DROP_FALL_ARC_HEIGHT = 13;
/** Seconds for a landed resource's flight into the character's inventory. */
export const DROP_COLLECT_DURATION = 0.25;
/** Peak height (px) of a resource's little hop while flying into the inventory. */
export const DROP_COLLECT_ARC_HEIGHT = 16;
export const DROP_COLLECT_ARC_HEIGHT = 5;
/** Nodes (trees/bushes) won't spawn closer than this to the character's starting position. */
export const ENTITY_MIN_DISTANCE_FROM_CENTER = 140;
export const ENTITY_MIN_DISTANCE_FROM_CENTER = 47;
/** Nodes won't spawn closer than this to each other, regardless of kind. */
export const ENTITY_MIN_DISTANCE_BETWEEN = 100;
export const ENTITY_MIN_DISTANCE_BETWEEN = 33;
/** Nodes won't spawn within this many px of the map edge. */
export const ENTITY_EDGE_MARGIN = 70;
export const ENTITY_EDGE_MARGIN = 23;
/** How long the hit-shake animation plays once a hit actually lands (character or rabbit) —
* a brief flash at the moment of impact, not for however long the attack itself takes. */
+5 -5
View File
@@ -10,20 +10,20 @@ export const RABBIT_ACTION_DURATION = 0.5;
export const RABBIT_PAUSE_DURATION = 0.5;
/** Max distance covered by a single jump. */
export const RABBIT_JUMP_DISTANCE = 80;
export const RABBIT_JUMP_DISTANCE = 27;
/** Peak height (px) of a jump's parabolic arc — same idea as a resource drop's arc when it flies
* off a chopped tree. */
export const RABBIT_JUMP_ARC_HEIGHT = 30;
export const RABBIT_JUMP_ARC_HEIGHT = 10;
/** By day, a rabbit won't choose a jump target closer than this to the character. */
export const RABBIT_MIN_DISTANCE_FROM_CHARACTER = 130;
export const RABBIT_MIN_DISTANCE_FROM_CHARACTER = 43;
/** How close the character must be, by night, for a rabbit to strike instead of jumping toward them. */
export const RABBIT_STRIKE_RANGE = 28;
export const RABBIT_STRIKE_RANGE = 9;
/** How close the character must get to hit a rabbit. */
export const RABBIT_HIT_RADIUS = 40;
export const RABBIT_HIT_RADIUS = 13;
/** A rabbit's max HP (fixed — unlike the character's, there's no upgrade for it). */
export const RABBIT_MAX_HP = 3;
+2 -2
View File
@@ -27,7 +27,7 @@ export const UPGRADE_LIST: UpgradeDef[] = [
name: 'Скорость движения',
baseCost: 5,
costGrowth: 1.35,
effectAtLevel: (level) => 160 + (level - 1) * 20,
effectAtLevel: (level) => 50 + (level - 1) * 6,
formatEffect: (v) => `${Math.round(v)} px/с`,
},
{
@@ -67,7 +67,7 @@ export const UPGRADE_LIST: UpgradeDef[] = [
name: 'Радиус подбора',
baseCost: 5,
costGrowth: 1.3,
effectAtLevel: (level) => 46 + (level - 1) * 6,
effectAtLevel: (level) => 15 + (level - 1) * 2,
formatEffect: (v) => `${Math.round(v)} px`,
},
{