Skip to content

Latest commit

 

History

History
257 lines (233 loc) · 12.2 KB

TODO.md

File metadata and controls

257 lines (233 loc) · 12.2 KB

TODO

Refactor the rendering.

  1. Menus and HUD need a buffer to draw on to
  2. Software player view needs buffer to draw on to
  3. OpenGL and Vulkan???
  4. do_enemy_move() -> p_try_move() -> p_check_position() is very costly
  • p_check_position is called multiple times, witha BSP trace in each call, new_chase_dir() potentially calls the chain 7 times
  • TODO: use the blockmap
  • add reject table
  • Remove the #[allow(static_mut_refs)]

Need to move more of the explicitly software stuff in to the software rendering

BUGS

  • Player not taking damage from rockets or barrels
  • Total kills: doesn't count for player if they shoot a barrel and that barrel kills a demon.
  • Floating blood? Happens near doors and looks like an error between hi/lo clipping (difficult to reproduce)
  • [-] Aim/shoot tries to hit low enemy even if portal blocks view

Features to add

  • Mlook, requires:
  • mlook options
  • Dehacked support
  • Lump name SWITCHES, extend the switch list (BOOM)
  • Lump name ANIMATED, extend the animated texture list (BOOM)
  • Lump name TRANMAP for transparency? (BOOM)
  • New linedef flag, bit 9, PassThru, that allows one push to activate several functions simultaneously (BOOM)
  • Generalized linedef types added in range 2F80H - 7FFFH (BOOM)
  • Generalized sector types using bits 5-11 of the sector type field (BOOM)
  • UMAPINFO
  • UDMF (general)
  • UDMF (zdoom extended)

Graphics

  • OpenGL renderer
  • Vulkan renderer
  • Widescreen (software)
    • Correct FOV for proper 4:3 scale drawing (segs/flats)
    • Adjust all sprites to correct aspect of screen
    • apply ratio scaling to scale_from_view_angle()
    • apply ratio scaling to draw_column_style_flats() distscale var
    • apply ratio scaling to projection in bsp module
    • apply ratio scaling to fov_scale in bsp module
    • Adjust lightmaps to match
    • Add display res selection
    • Menus and HUD scaling + ratio correction

GAMEPLAY STUFF

  • Nightmare respawn
    • P_RespawnSpecials()
    • Add to queue in P_RemoveMobj()
    • Respawn demons
    • Adjust trooper/bruiser speeds (gamestate)
  • Limit skull count on map from elementals shooting them out
  • Wad mobj flags a different to in-game info flags...
  • Implement UMAPINFO support https://doomwiki.org/wiki/UMAPINFO
  • [-] Really need swept-volume collisions (done half-arsed)
  • [-] P_KillMobj (target/source stuff)
  • P_UpdateSpecials (todo: level timer)
  • gameplay interact: needs access to players[]

CORE/FEATURE FUNCTIONALITY

  • All gameplay features for Doom and Doom II
  • Status bar (face, health, armour, keys, ammo, cheats)
  • Powerup/damage palette effects
  • Thinkers for all things
  • [-] HUD (Done except for multiplayer chat)
  • [-] Menu screens (partial. New game, quit)
  • Intermissions and finale
    • Stats
    • Episode end text
    • Bunny screen
    • Doom II cast
  • Automap
  • Demo playback
    • tic cmds are not deterministic due to movement and position being f32? The movement speed and friction is correct. Lets look at the timing of cmds within the main loop
  • Save/load game
  • [-] Sound:
    • Verify positional sound
    • Verify distance and cutoff
    • Check the volumes (had to divide midi track vol in half)
    • Add the pitch shift
    • Maybe use the usefulness field..
    • OPL2 emulation (a lot of work here)
    • Load music from extra wads (needs UMAPINFO parsing)

IMPROVEMENTS

  • Make responders use ticcmds to ensure they are generic
  • Analyse the game further to allow more use of unwrap_unchecked() where we know for sure the data is initialised and valid.
  • The Thinker data access methods really should return Option<T>
  • Thinkers: For inner data get, add a compile-time cfg opt to panic, or return Option.
  • Need to reset sector sound targets if player dies
  • refactor the stair-builder loop to use lines iter. It currently needs two mutable accesses to data in a loop
    • let target = unsafe { (*target).object_mut().mobj() };// make a shortcut for this
  • Where aiming/shooting at an object the shooter should be a point while target + radius is considered

DONE

  • Demons don't wake on spawn when they should?
  • Shots in Map 19 of sunder tank framerate. Likely sector sound propagation + enemy begin search for player (Nope, it was thousands of BSP searches looking for the player)
  • Check that WadSubSector parse type is correct. Is it really i16? (parsing the lot as u16 now as -1 is used for u16::MAX anyway. Fucking C sucks)
  • Demons shouldn't open locked doors (Actual Doom isue)
  • Make skulls attempt to scale inanimate objects. This is related to objects taking the full Z-axis
  • Telefrags don't work. Does work but ignored for demons
  • panicked at 'attempt to add with overflow', render-soft/src/segs.rs:477:18 -- yl = (self.topfrac + HEIGHTUNIT) as i32 + 1; -- Nuked it all with visplane removal
  • Fix the types in texture module
  • P_TeleportMove teleport_move
  • Check textures are correctly sized an aligned
  • Find the cause of missing draw columns in large maps like e6m6 (float precision in angle_to_screen())
  • Convert static arrays in much of the renderer structs to Vec since at high res they can potentially overflow the stack
  • Statusbar doomguy face god-mode
  • BFG spray
  • Pain elemental attacks and die
  • Archvile attacks and chase
  • Archvile raise the dead
  • Clipping under sprites (like hanging things)
  • Step over sprites that are short
  • Prevent player getting stuck in door if standing next to when close (change_sector() needs to check object radius is crossing over segs)
  • E1M5 lamps are on window height not floor (they get raised by the lifting floor in other sector: Note: something with height clipping height_clip() and floorz)
  • E2M1 after second teleport there is a missing plane line at top of floor drop
  • Doom 2 M13 thread '<unnamed>' panicked at 'called Result::unwrap()on anErr value: "Parameter 'size' is invalid"', sound/sdl2/src/lib.rs:344:74
  • M30 thread 'main' panicked at 'attempt to divide by zero', /home/luke/Projects/room4doom/intermission/doom/src/lib.rs:257:40
  • Step over things if higher
  • e2m8 thread 'main' panicked at 'index out of bounds: the len is 0 but the index is 0', render/software/src/things.rs:401:21
  • Revenant rockets head off in wrong direction
  • angle_to_screen has an impact on sizing and scale (note: needed a float tweak and floor())
  • Statusbar doomguy face attacked-from-angle
  • Screen wipe
  • Shade screen with red palettes for increased damage (not the "took damage" flash)
  • Player sprite isn't rendered with 'static' if player is invisible
  • Chaingun guy doesn't do burst-fire (shoots, but not sustained) (remove invalid state set)
  • Monsters don't activate when player is real close (related to angle fix?)
  • Colours seem off for darker areas? (was incorrect float conversion on zlight table creation)
  • Re-implement warp
  • Player can get stuck in doors if the close on the edge of bounds the thinker list fucnction for the door sector runs it doesn't see it
  • Shadow-pinkies (use p_random instead of rewriting framebuffer)
  • Sprites colourmap/light selection (spectors)
  • Average the lines in a sector for sound origins (determined by center of sector AABB)
  • Don't shoot sky
  • Explosions shouldn't hit above or below (sight check)
  • E1M5 Candelebra not on ground?
  • Lift sounds for E5M3 don't stop
  • Shots from demons don't push the player
  • Sight angle incorrect for any mobj not 90-270 degrees:
if !all_around {
    let angle = point_to_angle_2(xy, self.xy).rad() - self.angle.rad();
    if angle.abs() > PI && self.xy.distance(xy) > MELEERANGE {
        continue;
    }
}

changed to:

if !all_around {
    let xy = point_to_angle_2(xy, self.xy).unit(); // Using a unit vector to remove world
    let v1 = self.angle.unit();                    // Get a unit from mobj angle
    let angle = v1.angle_between(xy).abs();        // then use glam to get angle between (it's +/- for .abs())
    if angle > FRAC_PI_2 && self.xy.distance(xy) > MELEERANGE {
        continue;
    }
}
  • Reduce use of *player and unsafe
  • Sector sound origin for specials
    • iterate sector lines to find max bounding box for sector and set sound_origin
  • INFLOAT, floatok, skulls
  • EV_DoDonut (E2M2)
  • EV_StopPlat - requires tracking some active platforms.
  • Some buttons no-longer change? (Shouldn't have been if else-if)
  • P_RecursiveSound - use flood through sectors. P_NoiseAlert
  • Sector sound targets - done with P_RecursiveSound
  • Recheck planes (seems correct now)
  • Make powerups count down
  • Load sprites
  • fixed-colourmap (special effects like rad suit, invuln, player-hit)
  • Sound state machine on new thread
  • Move "extra light" arg up the call chain to lightmap selection functions
  • P_TouchSpecialThing
  • Shooting
  • Shooting special items/lines
  • Thing collisions
  • EV_Teleport (todo: telefrag stuff)
  • Sound distances (SDL helpers?)
  • sound-server using rx/tx channels
  • track the playing sound sources and the channels they are on
  • Music:
    • Convert MUS to MIDI
    • Play using basic SDL2 + fluidsynth
    • Play using GUS via SDL2 + timidity (DMXGUS lump)
  • A method to find all SubSectors in a radius This is required for explosion type stuff
  • FIXED: Needed to pass actual endpoint Vec2 for check: Thing collisions are basic, they need "drift" off the center of a thing
  • FIXED: incorrect mover. E5M1 second "eye" to shoot doesn't react
  • Sprite rotations
  • FIXED: Sprite sorting: impl Ord on VisSprite for rust iiter sorting
  • Sprite clipping (issues with planes, doors)
  • FIXED: Teleport telefrag killing entire sector not just spawn point: Radius check
  • Implement P_DamageMobj
  • Doom 2 M4 chopper window bottom plane is not done?
  • E1M4 round room, floor strip inside of door steps isn't getting a visplane? + Same as D2M4. Both checked in Slade. Fixed by ignoring missing texture to ensure visplane is built.
  • Fixed: needed to null-check :-| Doom 2 teleports cause segfault
  • P_PlayerInSpecialSector
  • FIXED: Fix Doom II map 4. There seems to be something causing a thinker list invalid ref?
  • FIXED: Get the occasional crash from thinker slots running out before level start?
  • Implement EV_BuildStairs
  • Implement texture read and prep for use
  • FIXED: they work I guess: E3M4 crushers
  • Doom2 M9 lift textures
  • upper of some textures are screwed
  • door in spawn area (behind) is drawn incorrectly
  • map 24 Doom 2, texture to right of open area is bad
  • map 1 SIGIL, texture in front is borked
  • e1m1 right lift upper texture not drawn
  • e1m9 corner lifts aren't cutting bottom of texture?
  • e3m4 crushers textures aren't culling correctly?
  • e3m4, player can't fit. The proper setup of line back/front sectors affects this and now SubSectorMinMax needs work.
  • animated textures (flattranslation, texturetranslation)
  • EV_DoLockedDoor
  • Skybox
  • FIXED: Increased limits. Large sigil levels have rendering issues
  • doom2 m8 LowerAndChange, not implemented yet
  • Spans borked in E4M3 after first teleport (look at pad)
  • render_bsp_node is way too grabby. It's pulling subsectors that arn't actually in view
  • head-bob causes textures to jitter
  • seg render topfrac doesn't seem quite right? Some texture render starts are offset up by one pixel?
  • Load textures
  • FIXED: some tme ago: Lump cache isn't actually being fully used, use it!

Game and doom-lib are now separate crates with these criteria: "game" controls input and ticcmd, rendering, and menu display "game" will also check state and show appropriate screens (like demo, intermission, menus) "doom-lib" is pure gamestate things like level control, map objects, thinkers etc.

Adjust the lines like this:

ev_build_stairs(line.clone(), StairKind::Turbo16, level);
line.special = 0;

Find a better way to do let level = unsafe { &mut *thing.level };