TODO: Difference between revisions

From xoreos Wiki
Jump to navigation Jump to search
(Add an item for CJK in the console font)
 
(101 intermediate revisions by 5 users not shown)
Line 1: Line 1:
== NWN menu ==
This is a long rambly list of things left to do in xoreos and xoreos-tools. Anybody is welcome to tackle any of these tasks, but please also read our [[Developer_Central|general contributor overview]], including our [[Code_Formatting_Conventions|Code Formatting Conventions]], [[Commit_Guidelines|Commit Guidelines]] and [https://github.com/xoreos/xoreos/blob/master/CODE_OF_CONDUCT.md Code of Conduct]. If you plan to do any of these tasks, please also [[Contact_us|contact us]] beforehand, so we can better coordinate multiple people interested in doing the same task, and discuss how to best solve the problem. Thanks. :)
* Basics are there, but needs fleshing out
* Supermanu is working on the character generator


== KotOR/KotOR2 menus ==
('''See also:''' the Kanban-like "Projects" boards on GitHub: https://github.com/orgs/xoreos/projects?type=classic)
* Basic structure is already there, just missing most of the specific widgets stuff
* Semi-hardcoded, with GFF files (hierachical data, similar to XML in spirit) describing the setup. The xoreos-tools repository has a tool for converting GFF files into XML for easy reading.


== KotOR/KotOR2 ingame gui ==
== Documentation ==
* Ties in with the menus, still missing


== Jade Empire menus ==
=== Developer information ===
* Apparently very similar to KotOR's menus
* Extend the developer information on the wiki
** Explain how to get the xoreos sources on various platforms
** Expand GNU/Linux compiling instructions to cover more distributions
** Expand Mac OS X compiling instructions
*** Xcode
*** Homebrew/MacPorts/Fink
*** CMake, Libraries
** [http://wiki.arx-libertatis.org/Developer_Information Arx Libertatis] has an extensive dev page
* Document file formats on the wiki?
** Or integrate info into XentaxWiki?
** Both?


== NWN2 menus ==
=== User information ===
* Implemented using XML
* More user information on the wiki
* Not standard-conform XML. Need custom XML parser; stock XML parsing libraries will just throw errors.
** How to download xoreos
** How to install the games on various platforms
** [http://wiki.arx-libertatis.org/Main_Page Arx Libertatis] does that pretty well
 
=== Modder information ===
* Link to relevant modding resources
* Maybe even some kind of Modder's Handbook
** A big overview of modding Aurora games in general
*** Differences and commonalities between games
** Linking/Grouping engine functions between games
 
== Website ==
 
=== Design ===
* Better website design?
** It still should be static in the end
*** No PHP or Rails
*** Very light on JavaScript
*** No Flash!
** Maybe a bit more unique, graphical
** For legal reasons, we shouldn't directly use art or designs from the original games
*** Something inspired by the art of the orginal games would fit
 
=== Octopress ===
* Move away from Octopress?
** Alternative should still produce static HTML somehow
** Octopress works rather well. It reads Markdown, which is a plus
* Octopress 3.0?
** Not finished yet, it seems
 
== Standalone(ish) fixes/improvements ==
 
=== Broken NWN2 XML ===
* Not standards-conforming XML. Need custom XML parser; stock XML parsing libraries will just throw errors.
** <nowiki><?xml version="1.0" encoding="NWN2UI"></nowiki>
** <nowiki><?xml version="1.0" encoding="NWN2UI"></nowiki>
** No single root element
** No single root element
Line 23: Line 61:
* Event functions
* Event functions
* Special values like PARENT_WIDTH
* Special values like PARENT_WIDTH
* [https://github.com/xoreos/xoreos-tools/pull/1 Altrite is working on a broken-XML fixer]


== NWN2 animations ==
=== CJK glyphs in the console ===
* NWN uses Granny for body animations and FaceFX for facial animations
* The "system font" we use for our debug console, DejaVu Sans Mono Bold, does not feature any CJK (Chinese, Japanese, Korean) glyphs
* Both of these need to be reverse-engineered
* Not strictly necessary, but nice to have for printing, say, Witcher area names in Asian languages
* We could maybe integrate CJK glyphs from the [http://fonts.jp/hanazono/ Hanazono fonts] or other suitable libre fonts
* We need to match the height with DejaVu Sans Mono Bold
* CJK glyphs tend to be more complex and therefore wider. They're usually rendered twice as wide as Latin glyphs
* Our console code needs to take that into account


== SpeedTree ==
=== Fuzzing ===
* Both NWN2 and The Witcher use SpeedTree for complex trees
* Set up fuzzing targets for everything for [https://llvm.org/docs/LibFuzzer.html libFuzzer]
** File readers, image decoders, etc.
* Can be integrated with [http://lcamtuf.coredump.cx/afl/ afl] (american fuzzy lop): https://github.com/llvm-mirror/compiler-rt/blob/master/lib/fuzzer/afl/afl_driver.cpp
* Integrate it with our build system somehow
** ./configure flag for building with fuzzing instrumentation?
** Needs to check that the compiler can do that
** make fuzzers then builds the targets?
* File formats previously manually fuzzed with afl:
** CBGT, CDPTH, DDS, NBFS, NCGR, NCLR, SBM, TGA, TPC, TXB
** 2DA, KEY/BIF, ERF, GFF3, GFF4, GDA, TLK, NSBTX, RIM, SMALL, SSF
* Continuous fuzzing via [https://github.com/google/oss-fuzz OSS-Fuzz] (currently only taking "important" projects)


== KotOR scripts ==
=== Script decompiler ===
* The script system in NWN is, for the most part, working already. Missing are most of the engine functions and there's still a bit of wonkyness with the timing. KotOR uses the exact same script format, only with a mostly different set of engine functions. So that can probably be mirrored verbatim
* It might be quite useful to have a NWScript decompiler in xoreos-tools
* We have a script disassembler, ncsdis
** Which already does code flow analysis
* Missing:
** Code generation
** Collapsing of instruction chains into single-line NWScript code
*** For example, "int var = foo * bar + quux" compiles to a long chain with multiple temporaries
** Proper handling of structs and vectors


== KotOR2 scripts ==
=== Script compiler ===
* Mostly like KotOR scripts, but has some extensions, like parameters to scripts that drive the dialog branch decisions
* An NWScript compiler might be useful as well
* ImperatorPrime is currently working on rewriting the script system
** A script assembler might be an easy first step


== KotOR/KotOR2 dialogs ==
=== File format writers ===
* The origanisation of the DLG files is very similar to the one in NWN. With some extensions, like camera setup
* GFF3Writer, GFF4Writer
* How the dialogs are displayed is however very different
** Both necessary to create save games compatible with the original games
* KotOR2 has some extensions, to pass the parameters to the aforementioned branch decision scripts. Also, can use several scripts and combine the results with AND and OR
** Also useful for a xml2gff tool
* DLG files can be converted into some crude XML with the gff2xml tool in the xoreos-tools repository
* xml2tlk
** TalkTable_GFF::write02() and ::write05()
** Needs GFF4Writer
* Archive (ERF, RIM, KEY/BIF) packers?


== KotOR/KotOR2 world objects ==
=== Config file ===
* Currently, KotOR/KotOR2 world objects (creatures, placeables, doors, ...) don't do anything when clicked on. This ties in a bit with the scripting system, which triggers when operating on the objects
* Should be more preserving of the layout
* Should be mostly similar to NWN
** Especially empty lines
* Again, ARE, GIT and object blueprint files can be converted to XML with gff2xml
** UTF-8 Byte-Order-Mark when using native Windows editors
** \r is currently always stripped. Maybe preserve that too
*** Autodetect when \r is already used, and add it to new config lines too
** This basically needs a complete rewrite of the config parser
*** Don't just look for comments, just throw everything after "foo=bar" into the "comment" variable, including whitespace
*** And all whitespace before "foo=bar" into a "prefix" variable
** Maybe even always add BOM and \r when writing a new config file on Windows?


== MDL supermodels and animations ==
=== GUI ===
* xoreos could use a global GUI to start games from
** https://github.com/ocornut/imgui?
* Should probably be similar to ScummVM's GUI, at least in effect
* Should read the config file, list all targets
** Press a "Play" button to play the game
** Press an "Edit" button to edit the entry
*** Dialog options to edit common settings
*** An additional free-form editor?
*** Game-specific options?
** A button to edit global settings ("xoreos" config domain)
** For the future, a way to immediately load a saved game?
** An "Add" button to add a game
*** File browser
**** Select directories for most game
**** Select file for Sonic Chronicles
*** View current saved games of a target?
* Probably implemented using OpenGL, just like, say, the console
* Theme-able/Skinable?
* Some potential stumbling blocks
** Displaying "uncommon" text in both game descriptions and file paths
*** "Decomposed" letters, i.e. base letter + combining glyphs
*** CJK
*** Arabic and other scripts where letters change depending on their place in the word
*** Right-to-left
** Shortening those strings when they don't fit in their fields is also potentially difficult
 
=== Localization ===
* Text in exceptions?
** At least the user-visible ones, like "Failed to detect game"
** Or maybe we should clean that up and split them into "program logic failure" and "user failure", with only the latter translated
* Strings for the engine loader progress bar
* Debug console string
* GUI (see above) strings
* [http://www.gnu.org/software/gettext/ GNU gettext] would be one solution
 
=== Unit tests ===
* More unit tests
 
=== Phaethon ===
* More readers
* Writers?
 
=== Model converters ===
* Document the model formats
* Convert between the binary model formats and their ASCII equivalents
* Convert between the binary model formats and ones that can be opened by modelling tools
** 3D Studio Max
** Blender
 
=== Full-fledged modding toolset ===
* Similar to the NWN, NWN2 or Witcher toolset, but portable and FLOSS
** Might also support other games?
* Out of scope for xoreos
** Still, such a thing would be welcome under the xoreos banner
* [http://sourceforge.net/projects/neveredit/ Neveredit] might still be worth a look
 
== Build system ==
 
=== CMake ===
* Current doesn't set the git version to "+unk" when git isn't found
* make doxygen?
 
=== Autotools ===
* Suppress the "fatal: not a git repository" when building gitstamp without a git directory
* Increased modularity
** Disabling engines
** Making library dependencies optional (and disabling certain features, then)
*** liblzma? Only needed for the iOS version of KotOR
*** libxml2? Only needed for the two Dragon Age games
** When something is disabled, skip it, if possible
*** Like the videos in KotOR Mac
** If skipping is not possible, error out
 
== Nitro ==
 
* The Nintendo DS (Nitro) specific file formats should probably be moved out of src/aurora/ and into src/nitro
* nitrofile, cdpth, nsbtx, smallfile
** nsbtx needs to be split into a class accessing the textures in src/nitro/ and an archive class on top in src/aurora/
** This means src/aurora/ accesses src/nitro/, so libnitro.la needs to come after libaurora.la in the linking order
* ndsrom as well?
* What about nftrfont and model_sonic in src/graphics/aurora/?
** src/graphics/nitro/?
** This would have src/graphics/nitro/ access src/graphics/aurora/, so graphics/libnitro.la needs to come before graphics/libaurora.la in the linking order
** That would be the other way round than for src/nitro/. Too confusing?
 
== Graphics ==
 
=== MDL supermodels and animations ===
* Mostly working in NWN thanks to jbowtie's work
* Mostly working in NWN thanks to jbowtie's work
* Might need some cleanup
* Might need some cleanup
* Animation scale is off in a lot of cases. Mostly visible in the talking and yawning animations in non-human characters
* Models should smoothly change between different animations
* Models should smoothly change between different animations
* The animation system probably needs to be a bit more complex, to allow for "overlaying" different animations onto each other. For example, for speaking while holding an object and keeping the head focused on the PC character.
* The animation system probably needs to be a bit more complex, to allow for "overlaying" different animations onto each other. For example, for speaking while holding an object and keeping the head focused on the PC character.
* Needs to be carried over to KotOR and the other games too
== PC model ==
* The PC models in KotOR/KotOR2 are not shown
* Instead of moving the camera, "walking" should move the player character
* Walkmaps are completely missing right now too


== Triggers ==
=== Lighting ===
* In NWN, KotOR/KotOR2 and the other games too, a trigger is a polygon in an area (defined by its corner points) than, when a creature moves into or out of it, triggers a script. This is one of the primary sources of engine scripts and still completely missing
 
== Lighting ==
* We don't yet have a proper light system
* We don't yet have a proper light system
* I started working on it: [http://drmccoy.de/eos/nwn/20110610T230251.png], but my approach is seriously lacking. You can see the edges of the tiles that make up on NWN area in many cases
* I started working on it: [https://drmccoy.de/xoreos/20150809T223407.png], but my approach is seriously lacking. You can see the edges of the tiles that make up on NWN area in many cases ([https://drmccoy.de/xoreos/20150809T223507.png], [https://drmccoy.de/xoreos/20150809T223548.png])
** See the [https://github.com/xoreos/xoreos/tree/light light branch] in the git repository
** Of course, the actual glLight* stuff won't be relevant anymore as soon as shaders are there
** Lighting in several (ASCII?) area tiles is broken
*** The door in Prelude.nwm's "m0q1a" area
*** A water tile in Chapter2.nwm's "map_m2q1a" area
*** A sloped snow tile in XP2_Chapter3.nwm's "thecityoflostsou"


== Materials ==
=== Materials ===
* NWN and more excessively KotOR/KotOR2 use material properties in combination of semi-transparent textures to create metallic textures. My OpenGL knowledge is quite basic, I generally fudge through everything :P. Research there would be needed
* Materials in The Witcher are closely tied to shaders
* Materials in The Witcher are closely tied to shaders


== OpenGL and Shaders ==
=== OpenGL and Shaders ===
* mirv_ is currently working on a graphics system overhaul, complete with shader support
* mirv_ is currently working on a graphics system overhaul, complete with shader support
* All Aurora games use shaders in some form
* All Aurora games use shaders in some form
Line 82: Line 234:
* We need shaders for tinting in NWN2 (objects and area geometry) and TexturePaint nodes in Witcher
* We need shaders for tinting in NWN2 (objects and area geometry) and TexturePaint nodes in Witcher


== Gamepad binding ==
=== SDL 1.2 ===
* Optionally link against SDL 1.2 instead of SDL 2
* Should ideally use a configure flag to select between the two
** Maybe a CMake flag as well, if possible
* Assigned to clone2727, so anybody interested in this should coordinate with him
 
== Videos ==
 
=== XMV/WMV ===
* Used in Xbox versions of KotOR/KotOR2
* Our WMV decoder (for XMV videos used in Xbox versions) is missing P-frames and J-frames
** Code exists in ffmpeg, but is connected to the MPEG-4 family mess
 
=== Actimagine VX ===
* Used in the Nintendo DS game Sonic Chronicles
* https://wiki.multimedia.cx/index.php?title=Actimagine_Video_Codec
 
=== Sorenson 3 ===
* One single video in the Mac port of KotOR2, the Aspyr logo, uses the Sorenson 3 codec
** ffmpeg has a decoder, but it's connected to the MPEG-4 family mess (SVQ3 is similar to H.264)
* ScummVM needs that too
** While xoreos is GPLv3+, ScummVM is GPLv2+
** Somebody implementing Sorenson 3 for xoreos should ideally give explicit permission to relicense it GPLv2+ for ScummVM
*** Of course, if the decoder is based on prior work by other people, it has to be compatible with both GPLv2+ and GPLv3+
 
=== Optimizations ===
* Optimize our simple BitStream interface
** See [https://fgiesen.wordpress.com/2016/01/02/end-of-buffer-checks-in-decompressors/ this blog post]
** Specifically, we don't do any peeking at all
** It still needs to handle different memory layouts, though
* Likewise, our Huffman class could probably be tuned a lot
* Pull in fft/rdft/dct/mdct optimizations from FFmpeg?
* I experimented with that in a private branch and it didn't do anything for Bink performance
 
== Sound ==
 
=== FMOD ===
* Dragon Age: Origins uses FMOD for sound and music
* I have experimental FSB (FMOD sound bank) support working in a private branch
* FEV (FMOD events) format is still unknown to us
** Apparently, groups of event lists with events
** Event is everything from "play sound", over "set volume" to "apply echo"
** Game areas specify the group to use for the area
** Scripts then probably tell FMOD to play event lists out of that group
 
=== Wwise ===
* Dragon Age 2 uses Wwise for sound and music
* Should be similar in concept to FMD
 
== Events ==
 
=== Gamepad binding ===
* The Xbox versions of KotOR and KotOR2 don't use a mouse. We have basic support for joysticks/gamepads, but no real bindings to the engine or ideas how to handle that in general
* The Xbox versions of KotOR and KotOR2 don't use a mouse. We have basic support for joysticks/gamepads, but no real bindings to the engine or ideas how to handle that in general
* We might want to handle the controller support the new KotOR2 Steam update brought
** override folder contains a gamepad.txt then
* Also hack in controller support for a non-Steam KotOR2? And for KotOR?
* Controller support in Jade Empire
* Controller support for Sonic? It is a Nintendo DS game after all
* Controller support for the non-console versions of the Dragon Age games?
== Network ==
* We need a network subsystem
** [https://www.libsdl.org/projects/SDL_net/ SDL_net]?
** [http://www.boost.org/doc/libs/release/libs/asio/ Boost.Asio]?
** More options here: http://stackoverflow.com/questions/118945/best-c-c-network-library
* Engines need to be split into client and server classes
** The original engines all still do that, even when not exposing anything to users
** NWN and NWN2 allow user multiplayer


== Sonic's DS formats ==
== Engines ==
* Sonic Chronicles: The Dark Brotherhood, a Nintento DS game, uses video and sound formats apparently native to the Nintendo DS. We have docs for the basic sound format, but more research there is needed
* Videos use the Actimagine VX codec
* Need to research non-EFIGS versions of Sonic, especially Asian language ones, for the encoding of TLK strings


== Witcher areas ==
=== Script system ===
* Object models are wrongly rotated.
* ImperatorPrime had started on a script system rewrite
** They provide four floats: X, Y, Z, W. Quaternions, I guess.
** Includes functions with real signatures
** NWN2 does the same, but there I managed to get the orientation correct
** Maybe switch to that, if it works
** Possibly related to our world rotation + OpenGL handedness?
* Rounds, object heartbeat scripts
* KotOR2 and NWN2 have some extensions
** It seems like they don't need any extensions to the low-level bytecode stuff
* Witcher uses Lua scripts together with NWScript
* Sonic has no scripts at all, it seems
* Currently a script in an infinite loop locks the game thread
** Timeout? Asynchronous script execution?


== NWN fonts and encoding ==
=== NWN ===
* We need support for the multi-page fonts for Asian languages
* Menus
* For NWN, languageID 0 is not necessarily "English", but "The language of the game install"
** Basics are there, but needs fleshing out
** Character generator is mostly working
* [[Pathfinding]], walkmesh
** "Moving" should move the PC, not the camera
** NPC walking
** Triggers, areas on the floor that calls scripts on enter/leave
* Models
** ASCII models need averaging of smooth group normals
* NWN objects need an inventory concept
** Player characters' might be different
*** Inventory tetris
*** Inventory item icons
* Multi-page asian fonts
* LanguageID 0 is not necessarily "English", but "The language of the game install"
** This is okay for languages with Latin characters
** This is okay for languages with Latin characters
** Messes up strings in community modules with Asian languages that stuff strings in to languageID 0
** Messes up strings in community modules with Asian languages that stuff strings in to languageID 0
** The original fails there too, though
** The original fails there too, though


== XMV/WMV ==
=== KotOR/KotOR2 ===
* Our WMV decoder (for XMV videos used in Xbox versions) is missing P-frames and J-frame
* Menus
** Most menu skeletons exist - much of the content is yet to be added.
** Add item descriptions in item slot equip screen (when you select an item and can press 'equip' button).
** Add sliders to applicable settings.
** Add journal/quest log content to Journal menu.
** Display all items owned in Items menu.
*** Including sort/filter buttons.
** Add updating for the loading bar in loading screens.
***[[File:Loadingbar_upd.png|none|thumb]]
** Button highlights (when you hover or select a button in a menu, the button should be highlighted appropriately).
***[[File:Btn_hl.png|none|thumb|KoTOR (left) xoreos (right)]]
 
* Containers
** Enable player to transfer items into containers.
 
* Class selection
** Smokey background effect
** Lighting on the character model
** Scaling when hovering over different classes
*** Not hovered:
****[[File:Class_hl_inactive.png|none|thumb|KoTOR (left) xoreos (right)]]
*** Hovered:
****[[File:Class_hl_active.png|none|thumb|KoTOR (left) xoreos (right)]]
 
* Dialogues
** DLG files, similar to NWN
** Some extensions, like camera setup
** Dialogues are displayed very different than NWN
** KotOR2 has script extensions
*** Passing parameters to scripts
*** Call several scripts, combine with AND/OR for branching
 
* Animations
** Mostly working now
** Animation transitions/interpolation to transition smoothly from one animation to another.
** Combat animations for abilities.
*** This includes feats like Power Attack/Blast, Flurry, etc.
*** Right now we only have default attack animations play.
** Combat defense and damage received animations.
*** Receiving attack and/or ability animations.
 
* GUI / HUD (non-menu)
** Display actions on intractable characters.
*** I.e. display attack actions you can use on enemies when you target one.
** Better align the hover/target circles to objects.
*** E.g. ensure the circles align to a character's head.
** Display action queue while in combat.
*** Actions in the queue should correctly be added to and removed from the queue when executed.
** Display damage/heal values as floating text above the receiver.
** Prevent hovering or targeting objects outside player field of view.
*** Including objects behind walls, too far, etc.
 
* NPCs
** Enable NPCs to engage in actions.
*** Includes combat, animations, etc.
 
* Movement
** Improve follow-target movement of characters.
*** Auto-calculate route to target.
**** This means party members should find a way to walk around things when they are stuck while trying to follow the leader.
 
* Camera
** Enable hold down right-click to pan camera.
** Prevent camera from seeing through walls when moving into them at an angle.
 
* Minigames
** Swoop racing
** Pazaak
** Hardcoded, mostly removed from usual game logic
 
=== Jade Empire ===
* Menus
** Main menu with options submenu is there
* Minigames
** Flyer, top-down shoot-em-up thing
** Hardcoded, mostly removed from usual game logic
* Player character
** Needs research
* Sound
** Uses an ASCII variant of the [http://wiki.multimedia.cx/index.php?title=XACT XACT formats]
*** Cues probably not as complex as FMOD/Wwise
*** Effects need extension of the Sound system, maybe
** Xbox version might use the binary format?
*** Sound banks could be handles as archives and indexed in the ResourceManager?
** [https://github.com/flibitijibibo/FACT FACT] is an implementation of XAudio, including XACT, zlib-licensed
 
=== NWN2 ===
* Menus
** Implemented using XML
** See [[#Broken NWN2 XML|Broken NWN2 XML]]
* Animations (Granny)
** [https://github.com/SkywingvL/nwn2dev-public nwn2-dev] contains some code working with Granny data
*** Call into the original Granny DLL to convert between binary and ASCII Granny data, though
** [https://github.com/berenm/xoreos-tools/tree/granny berenm started some Granny RE]
** Based on berenm's RE efforts, Arbos has written a tool to convert to/from MDB+GR2: https://github.com/Arbos/nwn2mdk
*** Probably a good starting point for integrating NWN2 animations into xoreos
* Facial animations (FaceFX)
* Trees (SpeedTree)
* Proper evaluation of creature model parts (equipped items)
* Player character
** Reading of PC files in creature
* Walkmeshes. CromFr wrote a specs document here: https://gist.github.com/CromFr/104bac52dc9191099d9d9e3dbd2c4975
 
=== Sonic Chronicles ===
* Allow using the contents from an extracted NDS file?
* Menus
** GUI files that are GFF
** Actions in a state machine in GDA files?
* Music/Sound
** Music is apparently similar to MIDI, or to a tracker format?
** Sounds and instruments for music are in a sound_data.sadl archive
* Animations
** Bone animations, best implemented with shaders, blocked by the graphics subsystem rewrite
* Player character(s)
** Needs research


== FMOD ==
=== The Witcher ===
* The two Dragon Age games use FMOD for sound and music
* Menus
* I have experimental FSB (FMOD sound bank) support working in a private branch
** Apparently build using Lua
* I have no clue yet how to properly add FSB into our ResourceManager, since FSB themselves can be in other resource files
** System/Scripts/ has gui*.luc files
* FEV (FMOD events) format is still completely unknown to us
* Animations
** Needs research
* Player character, Geralt
** Needs research


== CJK glyphs in the console ==
=== Dragon Age: Origins / Dragon Age 2 ===
* The "system font" we use for our debug console, DejaVu Sans Mono Bold, does not feature any CJK (Chinese, Japanese, Korean) glyphs
* Menus
* Not strictly necessary, but nice to have for printing, say, Witcher area names in Asian languages
** [https://en.wikipedia.org/wiki/Scaleform_GFx Scaleform GFx]
* We could maybe integrate CJK glyphs from the [http://fonts.jp/hanazono/ Hanazono fonts] or other suitable libre fonts
** [http://social.bioware.com/wiki/datoolset/index.php/UI_Tutorial_%28draft%29 UI Tutorial] on the Dragon Age toolset wiki
* We need to match the height with DejaVu Sans Mono Bold
** Flash-based!
* CJK glyphs tend to be more complex and therefore wider. They're usually rendered twice as wide as Latin glyphs
** A good starting point for a reimplementation might be [https://en.wikipedia.org/wiki/Gameswf Gameswf].
* Our console code needs to take that into account
** [https://en.wikipedia.org/wiki/Gnash Gnash], [https://en.wikipedia.org/wiki/Lightspark Lightspark], [https://en.wikipedia.org/wiki/Swfdec Swfdec]
** [http://www.nowrap.de/flasm.html Flasm] can disassemble/assemble ActionScript, [http://www.nowrap.de/flare.html Flare] can decompile it
** [https://wwwimages2.adobe.com/content/dam/acom/en/devnet/pdf/swf-file-format-spec.pdf swf-file-format-spec.pdf] is a great reference which covers mostly every aspect of the gfx files.
** [https://github.com/jindrapetrik/jpexs-decompiler jpexs-decompiler] can decompile and handles scaleform specific tags.
* Animations
** Bone animations, best implemented with shaders, blocked by the graphics subsystem rewrite

Latest revision as of 02:57, 25 February 2024

This is a long rambly list of things left to do in xoreos and xoreos-tools. Anybody is welcome to tackle any of these tasks, but please also read our general contributor overview, including our Code Formatting Conventions, Commit Guidelines and Code of Conduct. If you plan to do any of these tasks, please also contact us beforehand, so we can better coordinate multiple people interested in doing the same task, and discuss how to best solve the problem. Thanks. :)

(See also: the Kanban-like "Projects" boards on GitHub: https://github.com/orgs/xoreos/projects?type=classic)

Documentation

Developer information

  • Extend the developer information on the wiki
    • Explain how to get the xoreos sources on various platforms
    • Expand GNU/Linux compiling instructions to cover more distributions
    • Expand Mac OS X compiling instructions
      • Xcode
      • Homebrew/MacPorts/Fink
      • CMake, Libraries
    • Arx Libertatis has an extensive dev page
  • Document file formats on the wiki?
    • Or integrate info into XentaxWiki?
    • Both?

User information

  • More user information on the wiki
    • How to download xoreos
    • How to install the games on various platforms
    • Arx Libertatis does that pretty well

Modder information

  • Link to relevant modding resources
  • Maybe even some kind of Modder's Handbook
    • A big overview of modding Aurora games in general
      • Differences and commonalities between games
    • Linking/Grouping engine functions between games

Website

Design

  • Better website design?
    • It still should be static in the end
      • No PHP or Rails
      • Very light on JavaScript
      • No Flash!
    • Maybe a bit more unique, graphical
    • For legal reasons, we shouldn't directly use art or designs from the original games
      • Something inspired by the art of the orginal games would fit

Octopress

  • Move away from Octopress?
    • Alternative should still produce static HTML somehow
    • Octopress works rather well. It reads Markdown, which is a plus
  • Octopress 3.0?
    • Not finished yet, it seems

Standalone(ish) fixes/improvements

Broken NWN2 XML

  • Not standards-conforming XML. Need custom XML parser; stock XML parsing libraries will just throw errors.
    • <?xml version="1.0" encoding="NWN2UI">
    • No single root element
    • Attribute values not enclosed in quotes most of the time
    • Special characters in attribute values not properly escaped
    • Unmatched quotes on several occasions
  • Event functions
  • Special values like PARENT_WIDTH
  • Altrite is working on a broken-XML fixer

CJK glyphs in the console

  • The "system font" we use for our debug console, DejaVu Sans Mono Bold, does not feature any CJK (Chinese, Japanese, Korean) glyphs
  • Not strictly necessary, but nice to have for printing, say, Witcher area names in Asian languages
  • We could maybe integrate CJK glyphs from the Hanazono fonts or other suitable libre fonts
  • We need to match the height with DejaVu Sans Mono Bold
  • CJK glyphs tend to be more complex and therefore wider. They're usually rendered twice as wide as Latin glyphs
  • Our console code needs to take that into account

Fuzzing

  • Set up fuzzing targets for everything for libFuzzer
    • File readers, image decoders, etc.
  • Can be integrated with afl (american fuzzy lop): https://github.com/llvm-mirror/compiler-rt/blob/master/lib/fuzzer/afl/afl_driver.cpp
  • Integrate it with our build system somehow
    • ./configure flag for building with fuzzing instrumentation?
    • Needs to check that the compiler can do that
    • make fuzzers then builds the targets?
  • File formats previously manually fuzzed with afl:
    • CBGT, CDPTH, DDS, NBFS, NCGR, NCLR, SBM, TGA, TPC, TXB
    • 2DA, KEY/BIF, ERF, GFF3, GFF4, GDA, TLK, NSBTX, RIM, SMALL, SSF
  • Continuous fuzzing via OSS-Fuzz (currently only taking "important" projects)

Script decompiler

  • It might be quite useful to have a NWScript decompiler in xoreos-tools
  • We have a script disassembler, ncsdis
    • Which already does code flow analysis
  • Missing:
    • Code generation
    • Collapsing of instruction chains into single-line NWScript code
      • For example, "int var = foo * bar + quux" compiles to a long chain with multiple temporaries
    • Proper handling of structs and vectors

Script compiler

  • An NWScript compiler might be useful as well
    • A script assembler might be an easy first step

File format writers

  • GFF3Writer, GFF4Writer
    • Both necessary to create save games compatible with the original games
    • Also useful for a xml2gff tool
  • xml2tlk
    • TalkTable_GFF::write02() and ::write05()
    • Needs GFF4Writer
  • Archive (ERF, RIM, KEY/BIF) packers?

Config file

  • Should be more preserving of the layout
    • Especially empty lines
    • UTF-8 Byte-Order-Mark when using native Windows editors
    • \r is currently always stripped. Maybe preserve that too
      • Autodetect when \r is already used, and add it to new config lines too
    • This basically needs a complete rewrite of the config parser
      • Don't just look for comments, just throw everything after "foo=bar" into the "comment" variable, including whitespace
      • And all whitespace before "foo=bar" into a "prefix" variable
    • Maybe even always add BOM and \r when writing a new config file on Windows?

GUI

  • xoreos could use a global GUI to start games from
  • Should probably be similar to ScummVM's GUI, at least in effect
  • Should read the config file, list all targets
    • Press a "Play" button to play the game
    • Press an "Edit" button to edit the entry
      • Dialog options to edit common settings
      • An additional free-form editor?
      • Game-specific options?
    • A button to edit global settings ("xoreos" config domain)
    • For the future, a way to immediately load a saved game?
    • An "Add" button to add a game
      • File browser
        • Select directories for most game
        • Select file for Sonic Chronicles
      • View current saved games of a target?
  • Probably implemented using OpenGL, just like, say, the console
  • Theme-able/Skinable?
  • Some potential stumbling blocks
    • Displaying "uncommon" text in both game descriptions and file paths
      • "Decomposed" letters, i.e. base letter + combining glyphs
      • CJK
      • Arabic and other scripts where letters change depending on their place in the word
      • Right-to-left
    • Shortening those strings when they don't fit in their fields is also potentially difficult

Localization

  • Text in exceptions?
    • At least the user-visible ones, like "Failed to detect game"
    • Or maybe we should clean that up and split them into "program logic failure" and "user failure", with only the latter translated
  • Strings for the engine loader progress bar
  • Debug console string
  • GUI (see above) strings
  • GNU gettext would be one solution

Unit tests

  • More unit tests

Phaethon

  • More readers
  • Writers?

Model converters

  • Document the model formats
  • Convert between the binary model formats and their ASCII equivalents
  • Convert between the binary model formats and ones that can be opened by modelling tools
    • 3D Studio Max
    • Blender

Full-fledged modding toolset

  • Similar to the NWN, NWN2 or Witcher toolset, but portable and FLOSS
    • Might also support other games?
  • Out of scope for xoreos
    • Still, such a thing would be welcome under the xoreos banner
  • Neveredit might still be worth a look

Build system

CMake

  • Current doesn't set the git version to "+unk" when git isn't found
  • make doxygen?

Autotools

  • Suppress the "fatal: not a git repository" when building gitstamp without a git directory
  • Increased modularity
    • Disabling engines
    • Making library dependencies optional (and disabling certain features, then)
      • liblzma? Only needed for the iOS version of KotOR
      • libxml2? Only needed for the two Dragon Age games
    • When something is disabled, skip it, if possible
      • Like the videos in KotOR Mac
    • If skipping is not possible, error out

Nitro

  • The Nintendo DS (Nitro) specific file formats should probably be moved out of src/aurora/ and into src/nitro
  • nitrofile, cdpth, nsbtx, smallfile
    • nsbtx needs to be split into a class accessing the textures in src/nitro/ and an archive class on top in src/aurora/
    • This means src/aurora/ accesses src/nitro/, so libnitro.la needs to come after libaurora.la in the linking order
  • ndsrom as well?
  • What about nftrfont and model_sonic in src/graphics/aurora/?
    • src/graphics/nitro/?
    • This would have src/graphics/nitro/ access src/graphics/aurora/, so graphics/libnitro.la needs to come before graphics/libaurora.la in the linking order
    • That would be the other way round than for src/nitro/. Too confusing?

Graphics

MDL supermodels and animations

  • Mostly working in NWN thanks to jbowtie's work
  • Might need some cleanup
  • Models should smoothly change between different animations
  • The animation system probably needs to be a bit more complex, to allow for "overlaying" different animations onto each other. For example, for speaking while holding an object and keeping the head focused on the PC character.

Lighting

  • We don't yet have a proper light system
  • I started working on it: [1], but my approach is seriously lacking. You can see the edges of the tiles that make up on NWN area in many cases ([2], [3])
    • See the light branch in the git repository
    • Of course, the actual glLight* stuff won't be relevant anymore as soon as shaders are there
    • Lighting in several (ASCII?) area tiles is broken
      • The door in Prelude.nwm's "m0q1a" area
      • A water tile in Chapter2.nwm's "map_m2q1a" area
      • A sloped snow tile in XP2_Chapter3.nwm's "thecityoflostsou"

Materials

  • Materials in The Witcher are closely tied to shaders

OpenGL and Shaders

  • mirv_ is currently working on a graphics system overhaul, complete with shader support
  • All Aurora games use shaders in some form
  • NWN uses ARB shaders. We probably need to rewrite them from scratch
  • DirectX shaders might be automatically convertible with Cg?
  • Otherwise, look at what Wine does with the shaders, and use that as a basis?
  • All the games, even NWN, use some form of shaders. Still totally missing from xoreos, since we have no idea how to use them in general yet. Moreover, this was before GLSL, so they're in the old assembly-like language. We probably need to rewrite them from scratch
  • We need shaders for tinting in NWN2 (objects and area geometry) and TexturePaint nodes in Witcher

SDL 1.2

  • Optionally link against SDL 1.2 instead of SDL 2
  • Should ideally use a configure flag to select between the two
    • Maybe a CMake flag as well, if possible
  • Assigned to clone2727, so anybody interested in this should coordinate with him

Videos

XMV/WMV

  • Used in Xbox versions of KotOR/KotOR2
  • Our WMV decoder (for XMV videos used in Xbox versions) is missing P-frames and J-frames
    • Code exists in ffmpeg, but is connected to the MPEG-4 family mess

Actimagine VX

Sorenson 3

  • One single video in the Mac port of KotOR2, the Aspyr logo, uses the Sorenson 3 codec
    • ffmpeg has a decoder, but it's connected to the MPEG-4 family mess (SVQ3 is similar to H.264)
  • ScummVM needs that too
    • While xoreos is GPLv3+, ScummVM is GPLv2+
    • Somebody implementing Sorenson 3 for xoreos should ideally give explicit permission to relicense it GPLv2+ for ScummVM
      • Of course, if the decoder is based on prior work by other people, it has to be compatible with both GPLv2+ and GPLv3+

Optimizations

  • Optimize our simple BitStream interface
    • See this blog post
    • Specifically, we don't do any peeking at all
    • It still needs to handle different memory layouts, though
  • Likewise, our Huffman class could probably be tuned a lot
  • Pull in fft/rdft/dct/mdct optimizations from FFmpeg?
  • I experimented with that in a private branch and it didn't do anything for Bink performance

Sound

FMOD

  • Dragon Age: Origins uses FMOD for sound and music
  • I have experimental FSB (FMOD sound bank) support working in a private branch
  • FEV (FMOD events) format is still unknown to us
    • Apparently, groups of event lists with events
    • Event is everything from "play sound", over "set volume" to "apply echo"
    • Game areas specify the group to use for the area
    • Scripts then probably tell FMOD to play event lists out of that group

Wwise

  • Dragon Age 2 uses Wwise for sound and music
  • Should be similar in concept to FMD

Events

Gamepad binding

  • The Xbox versions of KotOR and KotOR2 don't use a mouse. We have basic support for joysticks/gamepads, but no real bindings to the engine or ideas how to handle that in general
  • We might want to handle the controller support the new KotOR2 Steam update brought
    • override folder contains a gamepad.txt then
  • Also hack in controller support for a non-Steam KotOR2? And for KotOR?
  • Controller support in Jade Empire
  • Controller support for Sonic? It is a Nintendo DS game after all
  • Controller support for the non-console versions of the Dragon Age games?

Network

Engines

Script system

  • ImperatorPrime had started on a script system rewrite
    • Includes functions with real signatures
    • Maybe switch to that, if it works
  • Rounds, object heartbeat scripts
  • KotOR2 and NWN2 have some extensions
    • It seems like they don't need any extensions to the low-level bytecode stuff
  • Witcher uses Lua scripts together with NWScript
  • Sonic has no scripts at all, it seems
  • Currently a script in an infinite loop locks the game thread
    • Timeout? Asynchronous script execution?

NWN

  • Menus
    • Basics are there, but needs fleshing out
    • Character generator is mostly working
  • Pathfinding, walkmesh
    • "Moving" should move the PC, not the camera
    • NPC walking
    • Triggers, areas on the floor that calls scripts on enter/leave
  • Models
    • ASCII models need averaging of smooth group normals
  • NWN objects need an inventory concept
    • Player characters' might be different
      • Inventory tetris
      • Inventory item icons
  • Multi-page asian fonts
  • LanguageID 0 is not necessarily "English", but "The language of the game install"
    • This is okay for languages with Latin characters
    • Messes up strings in community modules with Asian languages that stuff strings in to languageID 0
    • The original fails there too, though

KotOR/KotOR2

  • Menus
    • Most menu skeletons exist - much of the content is yet to be added.
    • Add item descriptions in item slot equip screen (when you select an item and can press 'equip' button).
    • Add sliders to applicable settings.
    • Add journal/quest log content to Journal menu.
    • Display all items owned in Items menu.
      • Including sort/filter buttons.
    • Add updating for the loading bar in loading screens.
      • Loadingbar upd.png
    • Button highlights (when you hover or select a button in a menu, the button should be highlighted appropriately).
      • KoTOR (left) xoreos (right)
  • Containers
    • Enable player to transfer items into containers.
  • Class selection
    • Smokey background effect
    • Lighting on the character model
    • Scaling when hovering over different classes
      • Not hovered:
        • KoTOR (left) xoreos (right)
      • Hovered:
        • KoTOR (left) xoreos (right)
  • Dialogues
    • DLG files, similar to NWN
    • Some extensions, like camera setup
    • Dialogues are displayed very different than NWN
    • KotOR2 has script extensions
      • Passing parameters to scripts
      • Call several scripts, combine with AND/OR for branching
  • Animations
    • Mostly working now
    • Animation transitions/interpolation to transition smoothly from one animation to another.
    • Combat animations for abilities.
      • This includes feats like Power Attack/Blast, Flurry, etc.
      • Right now we only have default attack animations play.
    • Combat defense and damage received animations.
      • Receiving attack and/or ability animations.
  • GUI / HUD (non-menu)
    • Display actions on intractable characters.
      • I.e. display attack actions you can use on enemies when you target one.
    • Better align the hover/target circles to objects.
      • E.g. ensure the circles align to a character's head.
    • Display action queue while in combat.
      • Actions in the queue should correctly be added to and removed from the queue when executed.
    • Display damage/heal values as floating text above the receiver.
    • Prevent hovering or targeting objects outside player field of view.
      • Including objects behind walls, too far, etc.
  • NPCs
    • Enable NPCs to engage in actions.
      • Includes combat, animations, etc.
  • Movement
    • Improve follow-target movement of characters.
      • Auto-calculate route to target.
        • This means party members should find a way to walk around things when they are stuck while trying to follow the leader.
  • Camera
    • Enable hold down right-click to pan camera.
    • Prevent camera from seeing through walls when moving into them at an angle.
  • Minigames
    • Swoop racing
    • Pazaak
    • Hardcoded, mostly removed from usual game logic

Jade Empire

  • Menus
    • Main menu with options submenu is there
  • Minigames
    • Flyer, top-down shoot-em-up thing
    • Hardcoded, mostly removed from usual game logic
  • Player character
    • Needs research
  • Sound
    • Uses an ASCII variant of the XACT formats
      • Cues probably not as complex as FMOD/Wwise
      • Effects need extension of the Sound system, maybe
    • Xbox version might use the binary format?
      • Sound banks could be handles as archives and indexed in the ResourceManager?
    • FACT is an implementation of XAudio, including XACT, zlib-licensed

NWN2

Sonic Chronicles

  • Allow using the contents from an extracted NDS file?
  • Menus
    • GUI files that are GFF
    • Actions in a state machine in GDA files?
  • Music/Sound
    • Music is apparently similar to MIDI, or to a tracker format?
    • Sounds and instruments for music are in a sound_data.sadl archive
  • Animations
    • Bone animations, best implemented with shaders, blocked by the graphics subsystem rewrite
  • Player character(s)
    • Needs research

The Witcher

  • Menus
    • Apparently build using Lua
    • System/Scripts/ has gui*.luc files
  • Animations
    • Needs research
  • Player character, Geralt
    • Needs research

Dragon Age: Origins / Dragon Age 2