An engine recreation of Ultima Underworld and Ultima Underworld 2 in the Godot Engine.
This project supercedes the Unity-based project and reboots the code base to act more like the Underworld games originally worked.
This project is largely based on the previous reverse engineering work undertaken by various groups and individuals over the years. Without their efforts this project would not be possible please see the appendix below for the credits I have been able to attribute. If I have failed to give proper credit please let me know and I will happily correct this document.
This is currently pre-alpha. No support is provided for it and usage is at your own risk. Please don't download this version and expect it to be usable in anyway.
Requires game files for either UW1 or UW2. GOG versions need to be extracted using a zip extracter from the game.gog file
- Map loading
- Animated doors and sprites
- Looping NPC animations
- Partial Conversations
- Barter logic (partial)
- Lighting effects
- Basic inventory management including runebag
- Picking up and dropping of items (without checking pickup rules)
- Usable switches
- Reading signs
- Game strings
- Palette cycling and shading
- Save file loading
- Player stats display
- HP and Mana Displays
- Compass status message
- 3D Models
- Food consumption
- Spell casting (partial) and vanilla decoding of object enchantment values into actual spell effects. Some spells implemented.
- Usable wands, scrolls and potions.
- Small window cutscenes
- Game variables and quest variables (partial support, not all scenarios may work)
- Level transitions
- Partial options menu. In game loading of saves
- Fishing
- Combat attack charge buildup and combat accuracy calcuations for player
- In game advancement and player status changes over time (hunger, fatigue, mana regeneration)
- Skillpoints and character advancement logic
- Automap navigation and updating
- Read-only automap notes.
- Player collision and regular movement
- Object physics
- NPC AI, movement and pathfinding
- Sound and music
- Combat
- Sleeping
- Plot events
- Cutscenes
- Many traps and triggers
- Transparencies
- Saving
- Character creation
- and much more!
No exe builds yet. This is just a glorified map viewer at this point that you will need to build in Godot yourself.
See https://godotengine.org/ for engine runtime downloads.
- Clone the repository
- Install the Godot engine dev https://godotengine.org/ and run it.
- Save a file called
uwsettings.json
in the Godot Folder. See below for format of the file - Open the Project scene file
Underworld.tscn
in Godot. - Run. It might work
This project is developed using VSCode using the C# Tools for Godot extensions.
Enter optional paths for each game. Select the folder with the .exe file.
If using the gog versions extract the file game.gog
using a tool like 7-zip and point to that folder.
To select maps to load.
- Choose the game mode by editing the gametoload param in the file
uwsettings.json
. This file should be located in the same path as Godot or a built exe.- UW1 or UW2 are the valid values.
- Enter the level number. Values start at 0.
- Other values
- Light level- Shading in a range 0-7. Value is ignored
- levarkfolder - Change from
DATA
toSAVE1
toSAVE4
to load savegames. - Shader - Default shader used. Value is ignored
{
"pathuw1": "C:\\Games\\UW1\\game\\UW",
"pathuw2": "C:\\Games\\UW2IDA\\UW2",
"gametoload": "UW2",
"level": 0,
"lightlevel" : 7,
"levarkfolder" : "DATA",
"shader" : "UWSHADER"
}
Camera is only in fly mode currently.
WSAD for movement. T to toggle mouse look
Use shift and scroll to change speed.
See [https://github.com/hankmorgan/UWReverseEngineering] for my dissassemblies and notes on UW1/UW2
The information in this document is gathered from a number of sources most notably the vernable uw-formats.txt. Sections of this document if not taken directly from UW-Formats.txt are heavily based on the work that has gone into that document by a number of contributors and groups over the years. Every effort is being made to list this contributions here. To avoid missing anyone I am quoting verbatim the credit section of each copy of uw-formats.txt I can referencing.
Unfortunately some information sources have been lost to me over time. If I have missed a reference or not given due credit for research or code examples then please let me know and I will happily correct the record.
Unknown authors Internal Formats on the Ultima Codex
Mitch Aigner FAQs for UW1 abd UW2
The following credits are taken verbatim from the files shared by named projects.
The "me" mentioned in the credits is not the author of this guide.
My thanks go out to Jim Cameron that started the original "uw-specs.txt" file and subsequently found out more unknown data structures and discussed about file formats with me. Many thanks, Jim!
Additional information came from
Alistair Brown (basic object format, via the Underworld II editor available at
https://bearcity.pwp.blueyonder.co.uk/)
Ulf Wohlers (Objects and 3D models).
Fabian Pache (about map details and 3d models, UW2
conversations
UW2
player save https://uw2rev.sourceforge.net).
Further infos about weapon animation and miscellaneous bits about uw were contributed by Telemachos from peroxide.dk.
I also like to thank Telemachos who pointed me to the TSSHP's file formats file at the start of all of this.
This file is probably: Copyright (c) 2008,2009 Julien Langer Copyright (c) 2002,2008,2009 Fabian Pache Copyright (c) 2000,2001,2002,2003 Jim Cameron Copyright (c) 2002,2003,2004 Michael Fink Copyright (c) 2004 Kasper Fauerby
My thanks go out to Jim Cameron that started the original "uw-specs.txt" file and subsequently found out more unknown data structures and discussed about file formats with me. Many thanks, Jim!
Additional information came from Alistair Brown (basic object format, via
the Underworld II editor available at
https://bearcity.pwp.blueyonder.co.uk/), Ulf Wohlers (Objects and 3D
models) and Fabian Pache (about map details and 3d models, UW2
related,
https://uw2rev.sourceforge.net).
Further infos about weapon animation and miscellaneous bits about uw were contributed by Telemachos from peroxide.dk.
I also like to thank Telemachos who pointed me to the TSSHP's file formats file at the start of all of this.
This file is probably: Copyright (c) 2000,2001,2002,2003 Jim Cameron Copyright (c) 2002,2003,2004 Michael Fink Copyright (c) 2004 Kasper Fauerby
KarlClinckspoor on cmb.dat
Information on cutscene animation commands from khedoros at https://github.com/khedoros/uw-engine/blob/master/csparse.cpp