Tetraworld
A roguelike game set in a 4D world where there are 4 macroscopic dimensions of space.
(Not to be confused with 4D space-time, which is 3D space + 1D time. What we have here 4D space, or, if you like, 5D space-time: 4D space + 1D time. No, there is no time travel here, sorry.)
Download
Releases
No official releases available yet.
Developmental builds
- 2021-02-12a: [Linux 64-bit] [Windows 64-bit]
- 2021-01-16a: [Linux 64-bit] [Windows 64-bit]
- 2020-12-18a: [Linux 64-bit] [Windows 64-bit]
Disclaimer: these builds are pre-alpha, meaning it's just a technology preview, and may be unstable or have partially-implemented or unimplemented mechanics. Compatibility with existing saved games is not guaranteed. Play at your own risk. 😉
Source code
The full source code is available on
GitHub under the
General
Public License (GPLv2). Build instructions are in the
README.md
file.
News
- 2021-02-12:
- Added d back as a short-cut for dropping items. The drop action is still available from the inventory screen for easy learning.
- Added optional non-isometric screen layout. Access with ctrl-O in-game, or use the -m straight command-line option. Beginners may find this layout easier to understand than the default faux-isometric layout.
- Moved data files to dedicated directory for consistency.
- Various UI improvements.
- 2021-01-16:
- Reorganize/merge some levels to reduce the number of uninteresting levels. More drastic changes to come in the near future.
- Added spiral staircases.
- Some UI improvements.
- [Older news]
Starting up
Run the program from a terminal (cmd.exe on Windows). Run with -h for a list of command-line options.
- -H, --hiscore
- Displays the top 5 highest scores in the highscore board. An optional number may be supplied to override the number of scores displayed.
- -S, --smoothscroll
- Controls the timing delay when scrolling up/down or ana/kata, in msec. The
default is 80msec. If you find this too laggy, try a lower value, like
-S60 or -S40. Or turn it off altogether with
-S0, in which case up/down or ana/kata movement will not have
any intermediate frames, which will make the game respond faster but
may be harder for beginners to understand what's going
on.
Note that this value is treated on a best-efforts basis; if your terminal is slow, there is not much the game can do about it. On Windows, -S0 may be your best bet, since cmd.exe is dog-slow. - -m, --mapstyle
- Select the map layout style. Currently, there are two options:
- isometric
- The default Tetraworld faux-isometric layout.
- straight
- The new orthogonal layout, recommended for new beginners.
Basic instructions
Okay, just what am I looking at here?!
You're looking at an attempt to represent 4D space on a 2D screen. :-P
Each trapezoidal blob of characters is a faux-isometric 2D slice of your character's current 4D view. The central trapezoid is where your character is currently at, and the vertical column it's in is a 3D slice of the 4D view. All the columns taken together are the 3D slices that make up the 4D chunk of the world you're in.
The various characters have the following meanings:
- / #
- Walls that you cannot pass through.
- # ░
- Unrevealed area of the map you've not been to yet.
- , : ;
- These characters represent different types of floor. In this version, different types of floor do not yet have any difference in function.
- ~
- Water. In this version, you can freely swim through water, and will not be subject to gravity while in water.
- Blanks represent empty space that you will fall through.
- % %
- Sparse or dense 4D vegetation. The dense kind blocks line-of-sight.
- &
- Your player character.
- -
- Doorway that you can pass through.
- + -
- A locked/open door, respectively.
- =
- (Part of) ladders that you can climb.
- _
- Top of a ladder or a staircase step.
- \ |
- A lever in its off/on state, respectively.
- *
- A rock. In the current version, it's just random debris. Occasionally, you may find sharp rocks that might be useful for self-defense.
- $
- Collectible gold ores. In this version of the game, you're supposed to collect all the gold in the level and then find and activate the exit portal.
- [
- An item that might be useful.
- @
- The exit portal. Activate this after collecting all the gold in order to finish the level.
- ^
- A trap of some kind. Currently the game has two types of traps: hidden trapdoors, and falling rock traps.
- A B C
- Various native 4D creatures. In the current version of the game, they are all hostile.
Furthermore, in order to help you get your bearings in a 4D world, tiles that lie along the 8 cardinal directions in 4D from your current location are highlighted. This is particularly important when aligning yourself across display columns.
Navigating your environment
Gravity(!)
As if moving around in 4D space wasn't already hard enough, this game also
has gravity, of the 4D variety. That is to say, there is a designated
vertical direction, conveniently represented on screen vertically, along which
gravity acts. For your convenience, we call the direction in which gravity
pulls down
, and the opposite direction up
, and the on-screen map
is drawn such that they correspond with the familiar up
and down
directions on your screen.
Therefore, objects that are not supported from beneath in the down
direction will fall downwards under the action of 4D gravity, until it lands on
something solid. So moving up/down will only be effective if you're standing
on a ladder; otherwise, moving down will accomplish nothing (you cannot pass
through the floor), and moving up will make you jump up but you will
immediately fall down again, (no) thanks to 4D gravity.
Horizontal directions
Perpendicular to the vertical dimension of gravity are 3 other dimensions that constitute the horizontal directions: this being 4D space, there are 3 leftover dimensions after you exclude the vertical, so there are not 2, but 3 pairs of perpendicular horizontal directions. Accordingly, the floor surface has 3 dimensions (and has an area that's measured in cubic units—so we speak of cube footage in 4D rather than square footage!). Thus, the row of 2D trapezoidal isometric slices underneath your character, taken together, constitute a 3D slice where the floor is.
Which means there are three pairs of horizontal directions you can move in: in addition to left, right, forwards, and backwards, we have to add a new pair of directions: ana and kata. If we include up/down, that gives us 4 pairs of perpendicular directions to move it, which is why we need 8 movement keys!
Ledges
Besides climbing ladders and moving over a flat surface, you also have a special combo move: climbing a 1-tile-high ledge. If you're standing next to a wall tile, and the tile on top of that is not another wall, moving in the direction of the wall will initiate a 2-step combo move where you climb up the wall onto the space on top (ala Prince of Persia). Thus, it is possible to climb up to a doorway that isn't level with the floor, but 1 tile above it. This move can be useful for escaping certain scrapes if your pursuer is unable to climb ledges.
Such ledges can sometimes be easily overlooked, so be sure you don't miss them when exploring! To help with this, tile positions that could function as ledges from your current location are highlighted in blue along with the tiles along the cardinal axes. These highlights lie one row above where your character currently stands. If you see a floor tile or doorway highlighted this way, it means you're standing next to a ledge and can climb it by moving in the direction of the wall immediately below it. Which also means that if you see a floor or doorway tile that looks like it might line up with the blue highlights if you move a little, it's probably also a ledge, and it might be worthwhile to try to reach it, as it might lead somewhere interesting.
Map features
The current version of game only generates maps that consist of rectangular* rooms connected by doors, ladders, the occasional pits (watch out for holes in the floor!), and hidden trapdoors. There may be rooms partially or completely submerged in 4D water. There is also vegetation, the dense variety of which blocks line-of-sight.
(* Technically, hypercuboidal.)
In later versions, you may encounter other types of maps as well.
You may also occasionally encounter spiral staircases: a series of ledges that lead to or from an elevated doorway. Take note especially of staircases that wind in the ana/kata direction, which may appear disconnected. Actually they are not disconnected; they just happen to wind in a less-familiar direction! Banisters are currently not provided. 😁
There are also native 4D creatures that you're likely to run into. In this version of the game, they are always hostile, and should be avoided! You will know them when you see them: they move and chase after you!
In the latest version, you can drown in water. Your lungs can hold 8 units of air, which allows you to survive underwater for 8 turns before you start drowning. Air is replenished upon returning to the surface of the water. This means you can only dive down for 4 turns before you have to begin returning to the surface.
Currently, in the two levels that sport water, there is also basic diving gear that can be found somewhere on dry land. Once you find this item, you can equip it for a tank with an extra 30 units of air, allowing you to deep-dive for up to 19 turns before you need to start returning to the surface. The tank is also replenished upon returning to the surface. Be warned that this is still a very limited number of turns; you need to plan your dives very carefully so that you don't run out of air!
Controls
Currently, only keyboard controls are supported. Mouse support is planned, but currently not yet implemented.
- ?
- The most important key of all, this shows the in-game help screen that describes the various controls.
- h, i, j, k, l, m, n, o
- Movement keys. These keys were chosen to approximate the movement
direction they represent on-screen, at least on Qwerty layout keyboards
(Dvorak layout support will eventually be included). So:
- i, m
- move in the vertical direction (up/down);
- h, l
- move left/right across columns (ana/kata, or if you're used to Vi keys, you could also think of it as left/right, it's just one of the horizontal directions after all);
- j, k
- move left/right within a column (left/right, or if you're a Vi
person,
up
/down
: imagine the floor as a slice of the 3D universe layingflat
on a 4D surface such that what we 3D folk think of as up/down is now an extra pair of horizontal directions instead); - n, o
- move backwards/forwards within an isometric slice (think of it as being perpendicular to your computer screen, isometrically projected to be diagonal).
- H, I, J, K, L, M, N, O
- Keys for panning the current 4D viewport around without moving your player
character. These keys directly correspond with the movement keys, but
instead of moving the player character they pan the 4D viewpoint only.
Useful for looking around at your surroundings without spending your
turns (which may be fatal when enemies are around!).
Better yet, in this version of the game FOV is not implemented yet, so you can actually view the entire level this way (if you can wrap your head around the 4D layout :-P). To re-center the viewport on your player character again, press space. - (space)
- Recenter the 4D viewport on the player character. Useful after you've moved the viewport with H, I, J, K, L, M, N, O.
- (tab)
- Open the inventory screen, if you're carrying something. Equipping, unequipping, and dropping items, are done from within the inventory screen.
- p
- Pass a turn. Can be useful in tactical movement around enemies.
- ,
- Pick up an item from the current tile.
- ;
- Look at the objects on the current tile.
- (enter)
- Activate an object on the current tile. Currently only useful for the exit portal.
- q
- Save current game and quit. The game will automatically continue where you left off the next time you start the program. Warning: always exit the game with q if you want to keep your current character; if the game terminates for any other reason, you will permanently lose your character. Welcome to permadeath. :-D
- Q
- Delete current game and quit. Warning: once deleted, it is impossible to get your character back.
How to win
In the current version of the game, you have to find and collect all of the gold ores scattered around each level, then find the exit portal and activate it. Repeat for all levels. The last level is intended to be a placeholder for a longer-term map in the future where other interesting activities will take place. But for now, it's merely an extremely large level filled with lots of hazards. It's possible, albeit very hard, to win it through very careful play. Do you have what it takes to complete the gauntlet?
The challenge in each level is navigating the 4D geometry of the level and locating the gold, while avoiding the hazards. Fortunately, barring a bug in the map generator, the current version of the game always generates maps that are fully connected: you will always be able to reach all parts of the map from any part, even if you stumble into hidden pits and fall through. So you can rest assured that you will never get stuck without a way out, even if you do get totally lost in 4D space. ☺
Especially tricky are room exits located one tile above the floor, which can be accessed with the climb-ledge action (walk into the wall directly under them to initiate the climb action). Since they have no ladders generated for them, they are easy to miss. If you find yourself seemingly stuck in an area with no way out, try looking for these ledges along the walls: if present, they are located in the row immediately above the middle one in the display.
Menagerie
The current version of the game has two types of enemies that you may run into:
- A
- Tentacled conical creatures: very dangerous, can climb ladders and ledges and chase you. Also very tough; head-to-head combat is not advisable, as your 4D environment suit will hardly survive combat with one, and definitely not with two or more, of these creatures. However, their movement is predictable and they stop following you once out of sight. They also cannot swim, and will drown in water. Luring them into pools or previously-discovered traps is a good way of dealing with them.
- B
- Spiky water creatures: fast-moving and vicious. Limited to water only. Avoid close contact at all costs! They bite and pierce with their spikes and will quickly destroy your 4D environmental suit!
- C
- Shelled creatures: slow-moving, and cannot climb. Generally easy to avoid. Amphibious. Their hard shell protects them from falling objects, though if you wield something sharp you may be able to cut off their shell and use it for yourself! Be extremely careful of their claws, though; they cause double damage!
Be careful that what is adjacent in 4D may not be displayed adjacently on the screen, and these enemies are native to 4D space and facile with moving around in 4D. You should always double-check exactly which tiles are adjacent to an enemy before making a move!