Skip to content

Commit

Permalink
24.11.27
Browse files Browse the repository at this point in the history
[Engine]
* Fix missing Variable:Empty() member function in wrong scope.

[Diggers]
* Clean-up key binds logic and vanity.
* Added non-volatile storage for key binds.
* L1 and R1 on a controller now simulates a mouse wheel up and down.
* L2 and R2 on a controller now simulates a mouse wheel left and right.
* Can now leave map screen without selecting anything.
* Can now press escape to leave map screen without selecting anything.
* L1, L2, mouse wheel and keys can now scroll between available zones on zone map.
* More miscellaneous readability optimisations.

[Assets]
* Update Diggers readme document.
* Update API documentation.
  • Loading branch information
Mhatxotic committed Nov 28, 2024
1 parent d6d79cc commit 9770fbe
Show file tree
Hide file tree
Showing 27 changed files with 963 additions and 744 deletions.
124 changes: 39 additions & 85 deletions diggers/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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,8 +283,6 @@ 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!
* **Q. I got an error, strange behaviour or found a bug.**
Expand Down
38 changes: 20 additions & 18 deletions diggers/src/bank.lua
Original file line number Diff line number Diff line change
Expand Up @@ -242,23 +242,25 @@ local function InitBank(aActiveObject)
-- Load bank texture
LoadResources("Bank", aAssets, OnLoaded);
end
-- Exports and imports ----------------------------------------------------- --
return { A = { InitBank = InitBank }, F = function(GetAPI)
-- Imports --------------------------------------------------------------- --
-- Scripts have been loaded ------------------------------------------------ --
local function OnReady(GetAPI)
-- Grab imports
Fade, GameProc, GetGameTicks, HaveZogsToWin, InitLobby, IsButtonPressed,
IsMouseInBounds, IsMouseNotInBounds, IsScrollingDown, IsScrollingUp,
LoadResources, PlayMusic, PlayStaticSound, RenderInterface, RenderShadow,
SellSpecifiedItems, SetBottomRightTip, SetCallbacks, SetCursor,
aCursorIdData, aGemsAvailable, aObjectActions, aObjectData,
aObjectDirections, aObjectJobs, aObjectTypes, aSfxData, fontSpeech, texSpr
= -- --------------------------------------------------------------------- --
GetAPI("Fade", "GameProc", "GetGameTicks", "HaveZogsToWin", "InitLobby",
"IsButtonPressed", "IsMouseInBounds", "IsMouseNotInBounds",
"IsScrollingDown", "IsScrollingUp", "LoadResources", "PlayMusic",
"PlayStaticSound", "RenderInterface", "RenderShadow", "SellSpecifiedItems",
"SetBottomRightTip", "SetCallbacks", "SetCursor", "aCursorIdData",
"aGemsAvailable", "aObjectActions", "aObjectData", "aObjectDirections",
"aObjectJobs", "aObjectTypes", "aSfxData", "fontSpeech", "texSpr");
-- ----------------------------------------------------------------------- --
end };
IsMouseInBounds, IsMouseNotInBounds, IsScrollingDown, IsScrollingUp,
LoadResources, PlayMusic, PlayStaticSound, RenderInterface, RenderShadow,
SellSpecifiedItems, SetBottomRightTip, SetCallbacks, SetCursor,
aCursorIdData, aGemsAvailable, aObjectActions, aObjectData,
aObjectDirections, aObjectJobs, aObjectTypes, aSfxData, fontSpeech,
texSpr =
GetAPI("Fade", "GameProc", "GetGameTicks", "HaveZogsToWin", "InitLobby",
"IsButtonPressed", "IsMouseInBounds", "IsMouseNotInBounds",
"IsScrollingDown", "IsScrollingUp", "LoadResources", "PlayMusic",
"PlayStaticSound", "RenderInterface", "RenderShadow",
"SellSpecifiedItems", "SetBottomRightTip", "SetCallbacks", "SetCursor",
"aCursorIdData", "aGemsAvailable", "aObjectActions", "aObjectData",
"aObjectDirections", "aObjectJobs", "aObjectTypes", "aSfxData",
"fontSpeech", "texSpr");
end
-- Exports and imports ----------------------------------------------------- --
return { A = { InitBank = InitBank }, F = OnReady };
-- End-of-File ============================================================= --
32 changes: 16 additions & 16 deletions diggers/src/book.lua
Original file line number Diff line number Diff line change
Expand Up @@ -280,21 +280,21 @@ local function InitBook(bFromInGame)
-- Load the resources
LoadResources("The Book", aAssets, OnLoadResources);
end
-- Scripts have been loaded ------------------------------------------------ --
local function OnReady(GetAPI)
-- Grab imports
Fade, GameProc, InitCon, InitContinueGame, IsButtonPressed, IsButtonReleased,
IsMouseInBounds, IsMouseNotInBounds, IsScrollingDown,IsScrollingUp,
LoadResources, PlayMusic, PlayStaticSound, RenderInterface, RenderShadow,
SetBottomRightTip, SetBottomRightTipAndShadow, SetCallbacks, SetCursor,
aCursorIdData, aSfxData =
GetAPI("Fade", "GameProc", "InitCon", "InitContinueGame",
"IsButtonPressed", "IsButtonReleased", "IsMouseInBounds",
"IsMouseNotInBounds", "IsScrollingDown", "IsScrollingUp",
"LoadResources", "PlayMusic", "PlayStaticSound", "RenderInterface",
"RenderShadow", "SetBottomRightTip", "SetBottomRightTipAndShadow",
"SetCallbacks", "SetCursor", "aCursorIdData", "aSfxData");
end
-- Exports and imports ----------------------------------------------------- --
return { A = { InitBook = InitBook }, F = function(GetAPI)
-- Imports --------------------------------------------------------------- --
LoadResources, SetCallbacks, SetCursor, IsMouseInBounds, PlayStaticSound,
Fade, IsMouseNotInBounds, aCursorIdData, aSfxData, InitCon, PlayMusic,
IsButtonPressed, IsButtonReleased, IsScrollingDown, IsScrollingUp,
SetBottomRightTip, SetBottomRightTipAndShadow, RenderInterface,
InitContinueGame, RenderShadow, GameProc
= -- --------------------------------------------------------------------- --
GetAPI("LoadResources", "SetCallbacks", "SetCursor", "IsMouseInBounds",
"PlayStaticSound", "Fade", "IsMouseNotInBounds", "aCursorIdData",
"aSfxData", "InitCon", "PlayMusic", "IsButtonPressed", "IsButtonReleased",
"IsScrollingDown", "IsScrollingUp", "SetBottomRightTip",
"SetBottomRightTipAndShadow", "RenderInterface", "InitContinueGame",
"RenderShadow", "GameProc");
-- ----------------------------------------------------------------------- --
end };
return { A = { InitBook = InitBook }, F = OnReady };
-- End-of-File ============================================================= --
28 changes: 14 additions & 14 deletions diggers/src/cntrl.lua
Original file line number Diff line number Diff line change
Expand Up @@ -223,19 +223,19 @@ local function InitCon()
-- Load resources
LoadResources("Controller", aAssets, OnLoaded);
end
-- Exports and imports ----------------------------------------------------- --
return { A = { InitCon = InitCon }, F = function(GetAPI)
-- Imports --------------------------------------------------------------- --
-- Scripts have been loaded ------------------------------------------------ --
local function OnReady(GetAPI)
-- Grab imports
Fade, InitBook, InitFile, InitLobby, InitMap, InitRace, IsButtonReleased,
IsMouseInBounds, IsMouseNotInBounds, LoadResources, PlayStaticSound,
RenderShadow, SetBottomRightTipAndShadow, SetCallbacks, SetCursor,
aCursorIdData, aGlobalData, aSfxData, fontSpeech
= -- --------------------------------------------------------------------- --
GetAPI("Fade", "InitBook", "InitFile", "InitLobby", "InitMap", "InitRace",
"IsButtonReleased", "IsMouseInBounds", "IsMouseNotInBounds",
"LoadResources", "PlayStaticSound", "RenderShadow",
"SetBottomRightTipAndShadow", "SetCallbacks", "SetCursor", "aCursorIdData",
"aGlobalData", "aSfxData", "fontSpeech");
-- ----------------------------------------------------------------------- --
end };
IsMouseInBounds, IsMouseNotInBounds, LoadResources, PlayStaticSound,
RenderShadow, SetBottomRightTipAndShadow, SetCallbacks, SetCursor,
aCursorIdData, aGlobalData, aSfxData, fontSpeech =
GetAPI("Fade", "InitBook", "InitFile", "InitLobby", "InitMap",
"InitRace", "IsButtonReleased", "IsMouseInBounds",
"IsMouseNotInBounds", "LoadResources", "PlayStaticSound",
"RenderShadow", "SetBottomRightTipAndShadow", "SetCallbacks",
"SetCursor", "aCursorIdData", "aGlobalData", "aSfxData", "fontSpeech");
end
-- Exports and imports ----------------------------------------------------- --
return { A = { InitCon = InitCon }, F = OnReady };
-- End-of-File ============================================================= --
36 changes: 18 additions & 18 deletions diggers/src/debug.lua
Original file line number Diff line number Diff line change
Expand Up @@ -438,23 +438,23 @@ local function InitDebugPlay(iId)
-- Play sound effects
SetPlaySounds(true);
end
-- Exports and imports ----------------------------------------------------- --
return { A = { InitDebugPlay = InitDebugPlay }, F = function(GetAPI)
-- Imports --------------------------------------------------------------- --
-- Scripts have been loaded ------------------------------------------------ --
local function OnReady(GetAPI)
-- Grab imports
BCBlit, Fade, GameProc, GetActiveObject, GetActivePlayer, GetGameTicks,
GetLevelInfo, GetMouseX, GetMouseY, GetOpponentPlayer, GetViewportData,
HaveZogsToWin, LoadLevel, ProcInput, RegisterFBUCallback, RenderObjects,
RenderShroud, RenderTerrain, SelectObject, SetCallbacks, SetPlaySounds,
UpdateShroud, aLevelsData, aObjects, aPlayers, fontLarge, fontLittle,
fontTiny, texSpr
= -- --------------------------------------------------------------------- --
GetAPI("BCBlit", "Fade", "GameProc", "GetActiveObject", "GetActivePlayer",
"GetGameTicks", "GetLevelInfo", "GetMouseX", "GetMouseY",
"GetOpponentPlayer", "GetViewportData", "HaveZogsToWin", "LoadLevel",
"ProcInput", "RegisterFBUCallback", "RenderObjects", "RenderShroud",
"RenderTerrain", "SelectObject", "SetCallbacks", "SetPlaySounds",
"UpdateShroud", "aLevelsData", "aObjects", "aPlayers", "fontLarge",
"fontLittle", "fontTiny", "texSpr");
-- ----------------------------------------------------------------------- --
end };
GetLevelInfo, GetMouseX, GetMouseY, GetOpponentPlayer, GetViewportData,
HaveZogsToWin, LoadLevel, ProcInput, RegisterFBUCallback, RenderObjects,
RenderShroud, RenderTerrain, SelectObject, SetCallbacks, SetPlaySounds,
UpdateShroud, aLevelsData, aObjects, aPlayers, fontLarge, fontLittle,
fontTiny, texSpr =
GetAPI("BCBlit", "Fade", "GameProc", "GetActiveObject",
"GetActivePlayer", "GetGameTicks", "GetLevelInfo", "GetMouseX",
"GetMouseY", "GetOpponentPlayer", "GetViewportData", "HaveZogsToWin",
"LoadLevel", "ProcInput", "RegisterFBUCallback", "RenderObjects",
"RenderShroud", "RenderTerrain", "SelectObject", "SetCallbacks",
"SetPlaySounds", "UpdateShroud", "aLevelsData", "aObjects", "aPlayers",
"fontLarge", "fontLittle", "fontTiny", "texSpr");
end
-- Exports and imports ----------------------------------------------------- --
return { F = OnReady, A = { InitDebugPlay = InitDebugPlay } };
-- End-of-File ============================================================= --
Loading

0 comments on commit 9770fbe

Please sign in to comment.