1OpenTomb — TODO list for high-priority bugs / tasks 2--------------------------------------------------- 3 4### Table of contents ### 5 61. The main plan 72. Build configuration 83. Git/GitHub workflow 94. Code in main 105. Collision system 116. Character controller 127. Animation control 138. Camera control 149. Scripting 1510. Audio 16 17 181. The main plan 19---------------- 20First we need to implement TR1 gameplay, so TR1/2/3 functions tasks have higher priority over TR4/TR5 functions. The first objective is to make a simple, but stable and working version, then extend functionality to it step by step. 21 222. Build configuration 23---------------------- 24* Todo: 25 * Update internal image lib 26 * Reduce number of dependecies 27 * Make good autobuild system 28 293. Git/GitHub workflow 30--------------- 31* Commits to `master` may be: 32 * Merge with feature branch (branch that contains new feature, or big bug fixing) - feature branch must be avaliable on GitHub; after merging it must be deleted 33 * Little and clean bug fixes 34 * Documentation updates 35 * Build scripting updates (may be done in a feature branch, by author's choice) 36 * Independent resources updates 37 38* Creating feature branches and committing to them is free 39* Special merge requests, not for merging or with delayed time for merging must contain the `[NOT_FOR_MERGING]` prefix; such requests may be merged only after request's author writes comment `[CAN_BE_MERGED_NOW]` 40* 41* How to submit a feature branch to `master`: 42 1. Install GIT bash and launch the terminal (or use your own GUI) 43 2. Create a local feature branch by issuing: `git checkout -b feature_branch_name` (or make one in the repo with GitHub's web UI) 44 3. Commit the local branch with `git add -u`, `git commit` (if you use Vim, press 'i', enter message, press escape, then enter) 45 4. Merge the feature branch with the local master branch with `git merge master` and resolve any conflict (rebuild the project) 46 5. Commit the changes and push the local feature branch to the remote on GitHub with: `git push origin feature_branch_name` 47 6. Create a merge (pull) request with the GitHub web UI 48 7. After merging is accepted, delete the feature branch 49 50* _extern_ folder is not to be edited - it's a place for external libraries sources/headers 51* _src/core_ folder: only by TeslaRus, make request if you want to change something 52* Other folders: by merge requests to TeslaRus or, after code review (by merge request) by command (more details will be discussed); I will make some commits after merge request too (number of errors will be decreased significantly in case of review) 53 544. Code in main 55--------------- 56* Todo: 57 * `game.cpp`: many different logics in one place, needs to be refactored 58 * make some modules (not all!) interface more abstract (hide internal realisation, like `physics.h`/`physics_bullet.cpp`) 59 605. Engine 61------------------- 62* Current situation: 63 * Implemented entity spawning and safety deleting, projectiles, player switching... 64 65* Todo: 66 * Add activation callbacks for inventory items (no more `read-only` for inventory) 67 * Reduce globals using (shared between modules globals) 68 * Move out the console.c rendering code 69 * Make alt-room state savable in cases where there's a chain of 3 or more alt-rooms 70 716. Collision system 72------------------- 73* Current situation: 74 * Fixed back/front-facing polygons orientation for physics geometry, now the engine has a working _Filtered Ray Test_ (skips back-faced polygons) 75 * Collision margin is zero, otherwise normals in near edges become smooth and Lara slides down or stops in places she should not 76 * Refactored collision callbacks implementation that allow to register hit damage and any other collisions 77 78* Todo: 79 * Fix moving after landing on sloped surface: 80 * Find body parts that stop Lara 81 * Tune collision form, or disable collision checking for them 82 * Bind with 3 83 * Make rigid body parts shapes tunable by config 84 * For future optimazation, add switchable single ghost object for character 85 * Add _Long Ray Test_ (pierces rooms portals and builds room list for collisional checking) - needed for long range shooting and AI 86 * Re-implement Character_FixPosByFloorInfoUnderLegs(...) it has been deleted 87 * Check room tween butterfly normals 88 897. Character controller 90----------------------- 91* Todo: 92 * Base AI, path finding, boxes... 93 * Weapon control system needs to be refactored/fixed (2-handed weapon model switches in wrong frame) 94 * Add auto weapon hiding in water environment e.t.c. (simple task) 95 * Fix usage of weapons while crouching 96 978. Animation control 98-------------------- 99* Todo: 100 * Update documentation about `ss_animation` structure and functions 101 * Fix incorrect smoothing if there are _move_ or _rotate_ anim commands 102 * Fix dive-rolls: 103 * Roll is not commencing immediately while moving forward 104 * Rolls distance too great (e.g. falling off 1x1m ledges when on opposite edge) 105 * Fix forward and backward consecutive jump rolls (mid-air rolls) not concatenating correctly on keypress (TR2+) 106 * Fix swan dive not doable when jumping off of irregular (diamond shaped <>) slopes 107 * Fix edge climbing: 108 * Climbability distance threshold too high when jumping (i.e. reaching heights that shouldn't be reached) 109 * Reduce height correction when Lara lets go the hold on an edge (let go hold button) 110 1119. Camera control 112----------------- 113* Todo: 114 * Fix camera targeting to correct body part or OBB center (add special function to get targeting pos by target entity id) 115 * Implement camera flags and their function (e.g. "flyby", "once") 116 * Add special `camera_entity`, store it in world module, access by `entity_p World_GetCameraEntity();` - needed for heavy triggers 117 11810. Scripting 119------------ 120* Current situation: 121 * SEE TRIGGERS_tasks.md 122 * Scripts update EVERY game frame! Use the global engine frame time inside time depended scripts! 123* Todo: 124 * Add function like `lua_SaveTable(...)` that recursively print to file/buffer/clay tablets lua code with table content (i.e. `table_name = { red = 1; green = 0; blue = 0; name = "name"; is_u = true; in_tbl = { p1 = "inner"; val = 32.45 } }`) 125 * In all scripts that may change game state, data must be stored in special global table (that will be saved in save game) - needed for game save/load functions to correctly work 126 12711. Audio 128--------- 129* Current situation: 130 * Sound tracks playing was disabled 131 * AL build-in library works on Windows and MacOS, but under Linux native AL library are required 132* Todo: 133 * In `audio.cpp` implement class for sound track data manipulation (e.g. `result GetBufferData(track_id, buffer, size, offset, flag)`) 134 * Implement own audio routine thread (APIs like `Audio_Send(...)` allow that) 135 * Use something else instead of Vorbis (it can't read _OGG_ from memory, and uses default functions for files opening, so engine can't precache tracks in memory or use `SDL_rwops`) 136