Skip to content

Commit

Permalink
24.12
Browse files Browse the repository at this point in the history
[Engine]
* All '*.On*()' API functions that set an event will now accept 'nil' or 'none' to clear the event.
* Change message for when the CRC on compiled LUA code changed or never existed.
* Change numbered indicies in 'Input.MouseCodes' to literal indicies.
* Clear joystick state during LUA environment reset so the 'Input.OnJoy()' callback will poll again properly.
* Close duplicated 'stderr' handle on class destruction and still check to see if thread is running regardless of handle being invalid.
* Fix 'Input.SetCursor' and 'Input.SetCursorCentre' logic on the wrong thread.
* Fix buffer overrun in capturing stderr and also prevent string duplication.
* Fix missing 'Variable:Empty()' member function in wrong scope.
* Fix not invaliding the 'stderr' write fd so it might end up closing something unspecified, such as the sql database fd handle or other unspecified behaviour.
* Flush all code cache from the UDB if the LUA version changes and force recompile all the code as a result to prevent potential upgrade problems.
* Improve joystick detection, polling and fix potential initialisation issues. You also don't need to restart the engine to enable controllers now too.
* Only purge unchanged cvars if they are not marked as 'force save'.
* Only try to purge unchanged cvars from the UDB if they were initially loaded from it.
* Put OpenGL renderer, version and vendor in saved PNG metadata.
* Remove 'inp_joystick' cvar as not really needed anymore.
* Rename numeric keybinds.
* Send mouse move event to update cursor position when using 'Input.SetCursorPos()'.
* Update required Ubuntu version number in engine license file.

[Diggers]
* Add more sound indications to more screens.
* Adjust bounds for 'Haewould' on zone map.
* Automatically calculate zone select flag completion positions.
* Break apart input related code to new 'input.lua' module.
* Break out audio functions from main module into separate module.
* Break title credits screen away into tcredits module and move to new key input system.
* Can now leave map screen without selecting anything.
* Diggers and game objects can now be controlled with the keyboard and configurable in the bindings settings.
* Fix controller move script error.
* Fix for not restoring original scene properly when closing setup.
* Fix memory not updating frequently on title screen.
* Fix missed branding changes.
* Fix mouse not in centre of window properly at startup.
* Fix resource leaks. Critical issue for a system with limited resources.
* Fix script error opening TNT map.
* Fix script error when copying previous script error details.
* Fix script error when going home on the exact home pixel.
* Game now completely playable with just a keyboard. Press F2 to see the key bindings screen.
* Missing 'app.cfg' in repository.
* Optimise resource loading routines.
* Optimise some of the strings a bit more.
* Prevent multiple Diggers from entering the trade centre.
* Shorten some of the 'edited by' credits because they are too long for 4:3 mode.
* The mouse cursor position is now unmodified and translated properly to the stage at startup.
* Tidying up all modules.
* Update licence data blocks (see Assets).

[Assets]
* Update Diggers readme.
* Fix minimum MacOS version in engine licence file.
* Update API documentation.
  • Loading branch information
Mhatxotic committed Dec 1, 2024
1 parent 2aea098 commit c0c4c75
Show file tree
Hide file tree
Showing 48 changed files with 7,317 additions and 5,501 deletions.
25 changes: 25 additions & 0 deletions diggers/app.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
app_author = Mhatxotic Design
app_cflags = 6
app_copyright = Copyright © Millennium Interactive, 1994. All Rights Reserved
app_description = A remake of the classic Amiga/DOS game for Windows
app_icon = app/icon.png
app_longname = Diggers
app_shortname = Diggers
app_version = R45
app_website = github.com/Mhatxotic/Engine
con_font = app/console.ttf
con_fontflags = 4
con_fontheight = 8
con_fontlspacing = 1
con_fonttexsize = 128
con_fontwidth = 8
err_minram = 67108864
err_minvram = 8388608
lua_gcpause = 0
lua_script = src/main.lua
lua_ticktimeout = 10
vid_orheight = 240
vid_orwidth = 320
vid_subpixround = 2
win_heightmin = 240
win_widthmin = 320
138 changes: 48 additions & 90 deletions diggers/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ You can always get the latest version of this project [here](https://github.com/
Running the Windows version should be trivial.

### Linux version…
The Linux version is linked against external packages that you need to install for the game to work. These packages can be installed with `sudo apt-get install libfreetype libglfw3 libncurses libogg libopenal libpng libsqlite3 libssl libtheora libvorbis libxrandr mesa-common zlib1g`.
The Linux version is linked against external packages that you need to install for the game to work. These packages can be installed with `sudo apt-get install libglfw3 libopenal1`.

### MacOS version…
The MacOS version is self-contained and only basic stdlibs are required to run which should already be included by default in any system. However, opening the disk image will require you to bypass Gatekeeper as I do not wish to sign it with personal information and have therefore used a self-signed certificate instead. To bypass Gatekeeper, simply run the `Terminal.app` and `chdir` to the directory where you downloaded the disk image with `chdir ~/Downloads` and then execute the following command to remove the quarantine flag from the disk image archive with `xattr -d com.apple.quarantine Diggers-R<x>-MacOS-Universal.dmg` where `<x>` is the version of this application. You should then be able to mount the disk image and run the game without any issue.
Expand All @@ -103,7 +103,7 @@ As the diggers wait nervously, the stranger heads toward the trading centre. for
Guide one of the four available races to raising 17,500 Zogs by mining valuable minerals across 34 zones in order to build their dream creation.

## [Setup](#setup)
Press `F1` at any time in the game to access the setup screen and `F2` to show the acknowledgements.
Press `F1` at any time in the game to access the setup screen, `F2` to configure the key binds or `F3` to show the acknowledgements.

### Configuration screen…
* **Monitor**
Expand Down Expand Up @@ -160,37 +160,13 @@ Press `F1` at any time in the game to access the setup screen and `F2` to show t
- Return to game without saving or applying any changes.
* **RESET**
- Resets all the settings to default and applys the default values.
* **BINDS**
- Show the configure binds screen.
* **ABOUT**
- Show the acknowledgements (readme.txt).

### About…
This screen shows the third party licenses for this game.

* **Basic control…**
- Move the cursor to the top of the screen with the mouse or joystick and hit the left button or button 1 to scroll the text up.
- Move the cursor to the bottom of the screen with the mouse or joystick and hit the left button or button 1 to scroll the text up.
- Press the right mouse button or button 2 to return to the configuration screen.

* **Advanced control…**
* `ESCAPE KEY`
- Return to the game WITHOUT saving or applying settings.
* `HOME KEY`
- Scroll the document to the top.
* `END KEY`
- Scroll the document to the end.
* `CURSOR UP KEY` or `MOUSE WHEEL UP`
- Scroll the document up one line.
* `CURSOR DOWN KEY` or `MOUSE WHEEL DOWN`
- Scroll the document down one line.
* `PAGE UP KEY` or `MOUSE WHEEL LEFT`
- Scroll the document up one page.
* `PAGE DOWN KEY` or `MOUSE WHEEL RIGHT`
- Scroll the document down one page.
- Show the acknowledgements.

## [Controls](#controls)
You mostly control the game with a mouse, but a joystick will basicly emulate the mouse too like the Amiga CD32 version of the game did. You can also use the keyboard to perform some basic tasks.

If you're using a high video resolution (i.e. 1080/1440/3128p, etc.) and the mouse appears slow, you may need to increase the sensitivity in your mouse control panel or on specific mice (such as a Logitech G-series), increase the DPI with the dedicated button.
You can control the game with just a mouse which is novice difficulty like the Amiga computer and DOS version. Add use of the keyboard with the mouse makes the game quite easy to play. Playing with a controller is hard as it will basically emulate the mouse like the Amiga CD32 version of the game did.

If you move the cursor and the cursor becomes anything but an arrow graphic, then than particular item on the screen is selectable, e.g.
* 4 small arrows pointing to the centre…
Expand All @@ -201,6 +177,8 @@ If you move the cursor and the cursor becomes anything but an arrow graphic, the
- Accept/Select/Perform action/Go here.
* Arrow cursor pointing up/down/left or right…
- Scroll.
* A ticking clock…
- Control is blocked.

### In-game hud…
The hud is explained as follows from left to right…
Expand Down Expand Up @@ -228,87 +206,65 @@ The hud is explained as follows from left to right…
- Page: Displays the book.

### Aliases…
These aliases are for the explanations below.
These aliases are for the explanations below. Note that keyboard defaults can
be seen by pressing the F2 key (by default) and will not be listed here.

| Alias | Meaning | Alias | Meaning |
| --- | --- | --- | --- |
| `MSE` | Refers to mouse | `JOY` | Refers to joystick |
| `LMB` | Left-Mouse Button | `RMB` | Right-Mouse Button |
| `MMB` | Middle-Mouse Button | `MBx` | Mouse Button `x` |
| `MWU` | Mouse Wheel up | `MWD` | Mouse Wheel Down |
| `KPx` | Keypad Button `x` | `JBx` | Joystick Button `x` |
| `JOY` | Joystick | `MSE` | Mouse |
| `KEY` | Keyboard | | |

### Anywhere in the game…
| `MMB` | Middle-Mouse Button | `MWU` | Mouse Wheel up |
| `MWD` | Mouse Wheel Down | `MBx` | Mouse Button `x` |
| `JBx` | Joystick Button `x` | | |

### Playstation controller aliases…
| `JB0` | *Square* Button | `JB1` | *Cross* Button |
| `JB2` | *Circle* Button | `JB3` | *Triangle* Button |
| `JB4` | *L1* Button | `JB5` | *R1* Button |
| `JB6` | *L2* Button | `JB7` | *R2* Button |
| `JB8` | *Select* Button | `JB9` | *Start* Button |
| `JB10` | *L3* Button | `JB11` | *R3* Button |

### Anywhere in the game (not configurable)…
* `Alt`+`F4` on Windows or `Cmd`+`Q` on a Mac…
- Instant quit. Any game progress is lost but engine settings and ALREADY SAVED game progress will be written to disk in a `.udb` file.
* `Alt`+`Enter`
- Switch between borderless or exclusive full-Screen and decorated window mode which will persist through app restarts.
* `World`+`F` (MacOS only)
* `World`+`F` on a Mac
- Switch between native full-screen and decorated window mode which may persist through app restarts using native functionality. Using the MacOS options disables the `Alt`+`Enter` logic and you have to exit native full-screen mode to be able to use that shortcut again.

### Anywhere in the game (but not during a fade transition…
* `F1` or `JB8`+`JB9`
* `JB8`
- Configure the game engine, video/audio settings, etc.
* `F2`
- Display the acknowledgements.
* `F11`
- Reset the window position and size.
* `F12`
- Take a screenshot (lossless .bmp where .exe file is).
* `JOY` or `MSE` axes…
- Move cursor on screen.
* `JB1` or `LMB`
- Select control under mouse cursor.

### Intro…
* `ESC`, `LMB` or `JB1`
### Intro or title credits
* `LMB` or `JB1`
- Skip cut-scene/intro.

### In-Level…
* `PAUSE` or `START`
- Pause and unpause the game.
* `ESCAPE` or `START`+`JB8`+`JB9`
- Forfeit the game only when paused (Game over).
* `1` or `KP1`
- Select first digger if alive.
* `2` or `KP2`
- Select second digger if alive.
* `3` or `KP3`
- Select third digger if alive.
* `4` or `KP4`
- Select fourth digger if alive.
* `5` or `KP5`
- Select fifth digger if alive.
* `Backspace`
- Stop selected digger.
* `START`
- Pause the game.
* `LMB` or `JB1`
- Action, Select or Cancel menu.
* `RMB` or `JB2`
- Open menu for selected digger.
* `RETURN`
- Grab item Digger maybe touching.
* `UP CURSOR`
- Jump (When digging left/right, press to dig diagonally up).
* `DOWN CURSOR`
- Dig down (When digging left/right, press to dig diag. down).
* `LEFT CURSOR`
- Move left (press again to run, press a third time to dig).
* `RIGHT CURSOR`
- Move right (press again to run, press a third time to dig).
* `MINUS KEY`, `JB8` or `MWD`
- In digger inventory menu = Select last held item.
- Anywhere else = Select last Digger.
* `EQUALS KEY`, `JB9` or `MWU`
- In digger inventory menu = Select next held item.
- Anywhere else = Select next Digger.
* `KP0`
- Teleport home/nearest telepole.

### In-Level (paused)…
* `JB3`+`JB4` or `MB3`+`MB4`
- Forfeit the game only when paused (Game over).

### Map Post-Mortem
* `JB3`, `JB4`, `MB3` or `MB4`
- Cycle between objects.

### In-shop/Race select screen…
* `MWU` or `MWD`
* `MWU`, `MWD`, `JB4` or `JB5`
- Scroll available options.
* `LMB`
* `JB1` or `LMB`
- Select item under cursor.

## [Advanced](#advanced)
Expand All @@ -327,16 +283,18 @@ If for some reason you're an advanced-user or admin and need to fine tune how th
You can change cvars by opening up the console with the `GRAVE` key (key under `ESCAPE` key). You will have to start the game with `con_disabled=0` in order for this to work. This key may not be available on most keyboards so you can change it by changing the `con_key1` or `con_key2` var. This is a GLFW specific key code. Once you're in the console, type `cmdlist` for the commands you can use or `cvarlist` for the settings you can change. In the release version of the game, the console is semi-permanantly disabled, you can re-enable the console by using `con_disabled=0` to re-enable it. CVars can obviously be overloaded onto the command-line, not just one setting.

## [F.A.Q.](#faq)
* **Q. My game controller (joystick) doesn't work?**
- Restart the game with your controller connected or set `inp_joystick` to `1` in the console. Note that enabling joystick polling may reduce performance.
* **Q. This does not 'look' like the original game.**
- Well I've had to make a few changes because I want the remake to support 16:9 widescreen and ive had to modify and adapt most of the old textures that were originally in 320x200 (16:10), which is not a 4:3 resolution. If you can help upgrade the textures, that would be awesome!
- A. Well I've had to make a few changes because I want the remake to support 16:9 widescreen and ive had to modify and adapt most of the old textures that were originally in 320x200 (16:10), which is not a 4:3 resolution. If you can help upgrade the textures, that would be awesome!
* **Q. I got an error, strange behaviour or found a bug.**
- You can start the game with the `log_file=...` (filename) parameter to give a pretty detailed log of what the app is doing so you can send me that along with as much info as possible such as the `.log` `.crt` `.dbg` and `.udb` files that the app generates. Neither of these files will contain any personal information, only technical information to help me squash the problem.
- A. You can start the game with the `log_file=...` (filename) parameter to give a pretty detailed log of what the app is doing so you can send me that along with as much info as possible such as the `.log` `.crt` `.dbg` and `.udb` files that the app generates. Neither of these files will contain any personal information, only technical information to help me squash the problem.
* **Q. I've picked the wrong game-engine settings and the game crashed/won't start.**
- Try specifying the parameter `sql_defaults=1` command-line option to reset all the engine settings to default. If this doesn't work you'll have to delete the `.udb` file or set `sql_defaults=2` and start again from scratch thus losing all your Diggers saved game data. All that said though, the game shouldn't really crash though so please send me any logs/crash dumps you may have.
- A. Try specifying the parameter `sql_defaults=1` command-line option to reset all the engine settings to default. If this doesn't work you'll have to delete the `.udb` file or set `sql_defaults=2` and start again from scratch thus losing all your Diggers saved game data. All that said though, the game shouldn't really crash though so please send me any logs/crash dumps you may have.
* **Q. Diggers crashed and then when I start Diggers on MacOS, nothing happens.**
- A. If Diggers terminates uncleanly, you need to run it again manually with the `app_clearmutex=1` parameter. Also restarting your Mac helps but this is way too overkill. This problem does not affect Windows or Linux versions.
* **Q. Why does the game run faster than the Amiga version?**
- A fixed polling frequency of 60hz is used for the game logic and I originally enjoyed playing this game on a 486 DX2/66 with the original MS-DOS version that ran at refresh frequency of 70hz (in 320x200 mode X) which is quite speedy compared to the slow gameplay of the Amiga version and I always preferred the fast logic of the MS-DOS version.
- A. A fixed polling frequency of 60hz is used for the game logic and I originally enjoyed playing this game on a 486 DX2/66 with the original MS-DOS version that ran at refresh frequency of 70hz (in 320x200 mode X) which is quite speedy compared to the slow gameplay of the Amiga version and I always preferred the fast logic of the MS-DOS version.
* **Q. Can I speed run or T.A.S. this game?**
- A. This game is overkill on RNG but you can set the seed that makes the `math.random()` function predictable on the command-line with the `lua_randomseed=value` so hopefully you can use that to your advantage.

## [Credits](#credits)
### Diggers for Amiga, CD32 and DOS…
Expand Down
Loading

0 comments on commit c0c4c75

Please sign in to comment.