Alone in the Dark (1-3)/Game Mechanics and Glitches

From SDA Knowledge Base

Jump to: navigation, search

Contents

Alone in the Dark 1

ABOUT THE GUIDE

  • Most of the information here is derived from testing the English CD-ROM version (GOG). If you want to study AitD 1 more, you should consider using a different version, since no other version has been tested nearly as thoroughly. The French CD version in specific is a good choice because of reasons explained under "known version differences".
  • Mostly Emily was used in testing, there being no known reasons to go with Edward in a speedrun.
  • The division into topics is sometimes very arbitrary. A lot of the notes could have been placed into other parts of the guide as well and it may thus not be easy to use it as a quick reference to particular aspects of the game while skimming over what's not presently germane, without using a custom system of bookmarks. Some notes are given in two places and so edits should ideally happen in both. These may not be the best practices. Feel free to discuss the format on the discussion page (top left) so future guides may be better-organized. That having been said, to get well-enough versed in the game's/games' workings, you will have to cut through a very decent portion of the guide regardless of its exact organization.
  • Inevitably some points are made more than once and even more vague and more detailed bullets may be given on the same topics. The notes were generally made from a segmented run's point of view, being able to abuse saving and loading.
  • LIFE, ANIM etc. numbers are given with a space in-between for clarity (ANIM 55, LIFE 112) even though in the scripts they're always spelled together. Also in the scripts CVAR is spelled C_VAR.
  • Because of some issues with file conversions, I may have been working with files that were at 25 FPS instead of 60 FPS (what you should use) sometimes when counting frames between events happening. Thus there may be a small amount of incorrect frame counts given in the guide. Please report this and any other mistakes.
  • Another erratum is working on the assumption that timing for each segment of a segmented run should end on the first frame of the menu showing. In fact, it is the first frame of the save menu. Thus many save/load tricks might sound like they can save more time than they really can.
  • Feel free to contact the primary author of the guide (LotBlind) or tigrou (code-related and more technical questions) for consultancy through the SDA forums during any serious [speedrunning] endeavours. Also the guide is in a wiki format for a reason: it may be edited by anyone. Use the discussion page for relevant questions.

GLOSSARY

Game-internal terms

Game-internal terms Meaning
object the entities in the OBJETS.ITD file that have properties like BODY, LIFE, FOUNDLIFE etc., but in the guide this may have been used in the everyday sense as well
actor refers to any object that has been moved into the active actors' array in the RAM, but may have been confused with objects in some places
FRAME the game uses this to refer to keyframes, confusingly
TRACK pre-scripted movement, defined in LISTTRAK
BODY 3D models defined in the LISTBODY and LISTBOD2 files
ANIM animations defined in the LISTANIM and LISTANI2 files
LIFE the game's scripts are called LIFEs. The term "script" has been used sometimes. Stored in a file called LISTLIFE.
LIFE_MODE called LIFEMODE in the guide, determines if an actor is active at a given time based on focused actor location
MOVE movement mode
TRACK_MODE deprecated term for "MOVE"
animActionType an actor field, ACTIONTYPE in the guide
HIT This is all of: a possible actor ACTIONTYPE field value; the name of the command that causes an actor to enter the PRE_HIT and HIT ACTIONTYPEs (in the LIFEs); and an actor field that stores the ID of the actor that has just been HIT by it.
IN_HAND the item currently equipped, e.g. a weapon
VAR/CVAR the variables and constant variables the game writes into during gameplay
ExRy floor and room, as given in the game files and shown in the Room Viewer
Example Example


Additional terms

  • focused actor = actor that was set as the CAMERA_TARGET, usually the PC
  • PC = player character
  • EM/ED = Emily/Edward
  • "having control" = VAR 0 being 1
  • INV = ALLOW_INVENTORY = inventory being accessible
  • OOB = [to go] out-of-bounds (verb, noun, adjective...)
  • IB = in-bounds
  • desync = by default means desync of the ZV and ROOM Y-coordinates from their normal difference = vertical desync
  • kf = keyframe inside an ANIM
  • subframe = really sub-keyframe (one frame within a keyframe: what's normally called a "frame")
  • hitbox = the box that is used to check whether a melee attack is connecting with another actor, displayed in red in the RV
  • bbox = bounding box (also known as "zv"): the box used for collision checks with other actors and colliders, displayed in green (or white) in the RV
  • transition = the PC hitting a floor/transition trigger to move onto another floor
  • s/l = save and reload the same file
  • slt = save/load turn
  • ftt = deprecated term "first-time turn" referring to an incomplete slt
  • Cx = camera with ID x
  • ExCy = camera on floor x with ID y
  • RV/Viewer = Room Viewer
  • MV = Memory Viewer
  • CV = Cache Viewer

All of the VARs, CVARs, ANIMs, BODYs etc. were named by LotBlind and those names are, as such, unofficial. All the names were written into a file called vars.txt. The game doesn't come with human-readable names for most things, except for items that you pick up which have the names shown in-game. Even those are only referred to by their IDs in the code if vars.txt was not present during decompiling LISTLIFE.ITD.

Some variables and such may be referred to with different names/typography since during the project, tigrou may have renamed game-internal fields to be easier to understand, and in some cases, the original terminology was returned to afterwards. An attempt was made to conformize everything. Then again, the information is often too technical to get a perfect grasp of through this guide alone anyway.

META

USEFUL FILES

DOSBOX/EMULATORS

ROOM VIEWER

LIFEDISA/TRACKDISA/MEMORY VIEWER

CACHE VIEWER

FREE IN THE DARK HACK

GAME

GAME FILES

KNOWN VERSION DIFFERENCES

GENERAL

CONTROLS

MEMORY/CACHES/BUFFERS/SOUND SAMPLES

SAVING/LOADING

PAUSING

LIFE SCRIPTS

IMPORTANT/SPECIAL LIFES

IMPORTANT/SPECIAL VARS, CVARS, AND OTHER VARIABLES

INTERRUPTS

RENDERER

PALETTE

GAME WORLD

COLLIDER FLAGS

TRIGGERS

TRACKS

STAIRS/TRANSITIONS

DOORS

FRONT DOORS/JELLY

CAMERAS

CAMERA VIEWS

CAMERA DEFOCUS TRICK

WRONG PICKUPS/WRONG TRIGGERS

ROOM/VIEW DESYNC

OBJECTS AND ACTORS

OBJECTS

ACTORS/ACTIONTYPES

ACTOR SERIALIZATION INTO OBJECTS/OBJECT FIELDS/ACTOR FIELDS

BODYS

ANIMS/ANIMATIONS (GENERAL, NOT MOVEMENT)

ACTOR FLAGS

PLAYER CHARACTER

EMILY AND EDWARD DIFFERENCES (ANIMS)

PLAYER STATE

BODY/IN_HAND

BODY/IN_HAND DESYNC

SPACE

MOVEMENT

MODX/MODY/MODZ

ANIMATIONS (MOVEMENT)

EMILY AND EDWARD DIFFERENCES

SPEED

CORNERING

ROTATION

ACTIONS

(SPACE)

PUSHING

JUMPING/HOVERING

CLIMBING

GRAVITY/FALLING

VERTICAL DESYNCING

ITEMS/INVENTORY/MENUS

INVENTORY/ITEMS

FLASKS

THROWING THINGS

BOW/FIRING ARROWS

FIRING A GUN

ENEMIES/FIGHTING

PREGZT/BOSS FIGHT

CTHONIAN (WORM)

E2 ARROWS/AXES

OTHER ENEMIES

= HITFORCE/DAMAGE MANIPULATION

[NOT] DYING

TIMERS/CHRONO/TIMER MANIPULATION

LAGGING/FRAMERATE

SNAPBACK

DELAY TURN/DELAY SNAP

PICKUP TURN/SNAP

PICKUP TURN/PICKUP SNAP

LAMP TURN/LAMP SNAP

SAVE/LOAD TURN (SLT)

QUICK ROTATION

OOB/CLIPPING

SIDEWAYS CLIPPING

CONVEX CLIPPING

OPENING CLIPPING

LAG MANIPULATION/LAG SNAP/LAG OOB

SNAPBACK CLIP

TRIGGER BOUNCE OOB

PUSHABLE OOB

CHAIN CLIPPING

PUSHABLE LAG OOB

PUSHABLE WEDGE OOB

PUSHABLE OOB OOB

PUSHABLE NARROW OOB

CLIMB OOB

FALL OOB

COLLISION OOB

PUSH CLIPPING/LIGHTWEIGHT CLIPPING

PRACTICAL TIPS/APPLIED

PRACTICAL TIPS/OPTIMIZATIONS

TIMING CERTAIN ACTIONS

THEORETICAL IN-BOUNDS/GLITCHLESS RUN

EXPERIMENTAL SPECULATION

MIGHT HELP IN AITD 2 OR 3

TAS-ONLY/GLITCHING/CRASHING/SOFTLOCKING/MEMORY CORRUPTION

GENERAL

THROWN OBJECTS SOFTLOCK

3D-WRAP-AROUND GLITCH

RENDER BUG/2D-WRAP-AROUND

POTENTIAL EXPLOITATION

MEDKIT RENDER BUG TRIALS

SOUND BUG

MISCELLANEOUS

MISCELLANEOUS/COMBINED TRICKS

TECHNICAL NOTES

(Probably) Pointless Trivia

UNANSWERED QUESTIONS

Alone in the Dark 2

Alone in the Dark 3

Jack in the Dark

Personal tools