lvcabral wrote:I saw that you're implementing a multi-room mode! That's cool, I want to have that in my computer as well!
You already can! Just build from the VCS
. The multi-room implementation is overall finished, I'm now making the in-game level editor work seamlessly with it.
lvcabral wrote:Looking forward to see how it will look like.
MININIM uses a quite generic multi-room implementation. Its resolution (number and layout of rooms displayed at once) can be any rectangle equal or greater than 1x1: 2x3, 10x1, 7x9, 10x10, etc... Thus they don't need to be square and there is no theoretical upper limit. They are also independent of the physical screen's resolution. It doesn't matter how many pixels your screen can display or your video card's textures can hold. Roughly, MININIM uses an array of real-size (320x200) bitmaps and applies software-based linear transformations for translation and stretch in the late rederization steps.
Furthermore the multi-room resolution can be changed while the game is running in any state, on-the-fly, without need to restart. The keys controlling this manual change are:
- [: -1 room in width and -1 room in height
]: +1 room in width and +1 room in height
CTRL+[: -1 room in width
CTRL+]: +1 room in width
ALT+[: -1 room in height
ALT+]: +1 room in height
The related command line option (for invocation time) is --multi-room=WxH
. The default multi-room resolution is 2x2.
MININIM uses smart algorithms for traversing the level room graph and providing the most convenient level visualization, maximizing the number of displayed rooms and centering the level within the visualization, in case the multi-room resolution gets bigger than the level. In MININIM all rooms have a defined link (there is no null link, like in the original game). Thus rooms at level borders are delimited by room 0 (that delimits itself in all directions, and is all walls). Therefore, for sufficiently high multi-room resolutions it's possible to see the entire level surrounded by walls ad infinitum.
MININIM can also fit the level automatically to the screen using one of two modes: STRETCH
. The former uses the minimum rectangular resolution that displays the whole level (often distorted), while the latter uses the minimum squared resolution that does the same (no distortion). The multi-room fit mode can be changed in-game by the M
key. The fit mode is applied at the start of each level or at mode change. It can also be configured from command line using the --multi-room-fit-mode=MODE
MININIM's multi-room implementation can renderize levels with arbitrary linking between rooms (broken links, recursive links, or any chaotic arrangement) properly. Even the fit mode algorithms work right with levels of infinite visualization size like a room linked to itself. It's very interesting to use it to see how levels look in their entirety, specially when there are non-regular links. To render the level room graph structure, which is impossible to properly represent at once on a flat surface, MININIM renders the level mapping according to the currently selected rooms perspective. The currently selected room is indicated by a red rectangle surrounding it. It can be changed using the keys:
- H: select room at left
J: select room at right
U: select room above
N: select room below
It the selection reaches the multi-room resolution boundaries, it scrolls the visualization accordingly (1 page, that is, 1 time the full resolution in the direction given) and selects the next room. The multi-room view can also be scrolled manually one room at a time.
- SHIFT+H: scroll multi-room view 1 room to left
SHIFT+J: scroll multi-room view 1 room to right
SHIFT+U: scroll multi-room view 1 room above
SHIFT+N: scroll multi-room view 1 room below
Or 1 page at a time
- ALT+H: scroll multi-room view 1 page to left
ALT+J: scroll multi-room view 1 page to right
ALT+U: scroll multi-room view 1 page above
ALT+N: scroll multi-room view 1 page below
The multi-room rendering allows for perfect space continuity at room boundaries. There is no blind-spot where a frame may disappear when transitioning from room to room or otherwise when placed between rooms. Not even at corners of a room linked to itself from all directions (the worst possible scenario, where a single world-point maps to four distinct points in the euclidean visualization).
MININIM graphical rendering algorithms have been heavily optimized for multi-room support. Several layers of caching and other optimization techniques are in-place so legacy levels can be played in full-view using low-end (somewhat old) hardware. In fact, the development version of MININIM now renders orders of magnitude faster than the releasead ones. I can play at 12x12 resolutions on this 7 years old Intel Atom-based netbook (my main development machine) with no delay, using more or less the same processing power needed to render just one room by previous versions of MININIM.
For some reason MININIM runs not so optimally in Windows (of course, I use GNU/Linux for developing MININIM). Thus I've implemented in the development version of MININIM support for any native video card's resolution, in contrast with the default (and previously sole available) desktop mode which uses the desktop resolution for fullscreen and runs windowed for lower resolutions. To print the display modes supported by your video-card use the command line option: --print-display-modes
. After choosing a mode, invoke MININIM with the command line option --display-mode=M
, where M is the index of the selected mode. The game will be started at the given native display resolution, that may be changed in-game by the D key binding. Native resolutions may speed-up the engine's renderization while providing a convenient full-screen mode.
lvcabral wrote:Some of your features, like the guard being aware of the kid regardless of the room is a perfect fit for this mode.
Indeed. However, in my opinion the most appealing feature to use with a multi-room implementation of such capability is the in-game level editor. The level editor integrates greatly with the multi-room support. Imagine the ability to view every corner of an entire level, change anything you want in there, get immediate visual feedback, test your modifications in-place (live and real time), with no fear of messing things up (by playing or editing) because of unlimited undo/redo capability, and no worries about any arbitrary limitation imposed by the original game (number, type or combination of tiles, or guards...), and much more...
MININIM offers a level modding environment like no other I know about.
All I've described in this post until this point is not planned
, but actually implemented and available right now
in the development version of MININIM.
lvcabral wrote:I decided to change back (automatically) to 1 room mode on Level 14, because it's a single layer and it blends better with the final scene.
For MININIM the multi-room resolution is an user setting and therefore must be honored by principle. So MININIM never changes the multi-room resolution automatically unless asked to, like with the multi-room fit mode. However, when Guile scripting gets implemented, there will be an API for programming the multi-room services offered by the engine (among many other APIs).
This post is only the tip of the iceberg, I can't really manage to describe all available MININIM features, and combinations thereof.