Posted 29 June 2017 - 06:28 AM

MegaZeux 2.90

Release Info

Credits

>>DOWNLOAD MEGAZEUX v2.90<<

New Features

Unbound Sprites

"Added unbound sprites. Sprites can be unbound from the grid by setting spr#_unbound to 1. Their coordinates will now refer to the sprite's location in pixels, not tiles. spr#_width, height, refx and refy still refer to chars; however, spr#_x, y, cx, cy, cwidth and cheight are all in pixels. Unbound sprites do not work with all renderers; currently, out of the renderers available on the PC platforms, the overlay2 renderer lacks this functionality." --Lancer-X



"Unbound sprites do not let char 32 or blank characters (when in ccheck 2) through like regular sprites do. Instead, set spr#_tcol to a color that will be transparent when the unbound sprite is drawn." --Lancer-X



"Unbound sprites can make use of additional hidden charsets. There are an additional 14 charsets beyond the default that can be modified through using load char set or char edit.



(e.g. load char set "@256charset.chr")



"A sprite can be set to refer to these later chars with the spr#_offset counter. The offset value is then added to each char in the sprite. You can use this to refer to higher char sets.



(e.g. set "spr0_offset" 256)



"Offset values can also be set to locations within a char set." --Lancer-X



(e.g. load char set "@256charset.chr") "A sprite can be set to refer to these later chars with the spr#_offset counter. The offset value is then added to each char in the sprite. You can use this to refer to higher char sets. (e.g. set "spr0_offset" 256) "Offset values can also be set to locations within a char set." --Lancer-X The load char set command's decimal offsets now accept up to four characters, e.g. load char set "@1000charset.chr".

SMZX Improvements

The UI will now use a protected palette and mode 0 (regular MZX) charset regardless of the current SMZX mode.



"The colors used by tiles of a given color # in SMZX mode 3 can now be rebound using the "smzx_idx#,#" counters. (e.g. set "smzx_idx7,0" 32) Now if you put down a c07 tile, all 00 pixels will refer to color 32 (as opposed to color 0 in SMZX mode 2 or color 7 in SMZX mode 1). These values are reset whenever the SMZX mode is changed. Once again, this is only available to renderers that support unbound sprites." --Lancer-X

Strings as Files

Strings can now be used in several places as "virtual" files of sorts. Operations with strings are much faster than operations with the filesystem. Unless otherwise noted, these features support string splicing:



Strings can now be loaded as palettes with the command LOAD PALETTE "$string".



Strings can now be loaded as character sets with the command LOAD CHAR SET "$string". This also supports offsetting, i.e. LOAD CHAR SET "@240$string".



Strings can now be loaded as robot source code with the command SET "$string" "LOAD_ROBOT".



Strings can now be loaded as MZMs with the command PUT "@$string" image_file pXX [#] [#]. String splicing MZMs is discouraged.



MZMs can now be saved into strings with the command COPY BLOCK [#] [#] [#] [#] "@$string" [#].

Saving/Loading Counters

Every counter and string in a game can be saved during gameplay with the SAVE_COUNTERS special counter.



The files created by SAVE_COUNTERS can be loaded during gameplay with the LOAD_COUNTERS special counter. Unlike LOAD_GAME, this does not change the game state in any way; this simply imports all of the counters from the file, overriding any existing values. This functionality can be used to create a sort of "save" that isn't bound to the current world version.

New Board Features

The new board setting "Reset board on entry" will cause a board to reset to its original state when entered during play. This feature is saved in the edtior config when "Set as defaults" is used.



The new board settings "Load charset on entry" and "Load palette on entry" will load a charset and palette when the board is entered during play, respectively. These features are saved in the edtior config when "Set as defaults" is used.

New Robot Features

The maximum size of the robot program has been increased to 2mb.



Robots now keep their ROBOT_IDs after reloading saves.



The new GOOP_WALK counter allows robots to move freely over goop.



The BUTTONS counter now supports: mouse wheel up (8), mouse wheel down (16), mouse wheel left (32), mouse wheel right (64), mouse button X1/back (128), and mouse button X2/forward (256).



The new ESCAPE_MENU counter disables the escape dialog, allowing games access to the escape key (KEY_PRESSED=27, KEY_CODE=1). This dialog can still be accessed by pressing the close window button, ALT+F4, etc.



The new EXIT_GAME function counter allows games to end the game state from Robotic and return to the titlescreen. This has no effect on the titlescreen.



Expression parsing performance has been improved.



The ternary operator is now implemented for expressions. The ternary operator is used as follows: ('a' ? 'b' : 'c'). If "a" isn't equal to zero, the expression between the ? and the : is evaluated. If "a" is equal to zero, the expression after the : is evaluated. The expression that isn't evaluated is completely ignored.



SAVE_WORLD has been permanently removed.

Joypad Features

POV hat support has been implemented. The config file option for POV hats is "joyNhat = U, D, L, R", where N, U, D, L, and R are numbers.



Additionally, MegaZeux will no longer crash when KEY_PRESSED the values for joypad config exceed 512. This should make writing joypad configuration utilities easier.

Standalone Mode

The "standalone_mode" config setting adds the following features to the MZXRun executable:

Disables the Load World dialog

Applies the following counters to the titlescreen as well as gameplay: HELP_MENU, F2_MENU, LOAD_MENU, ENTER_MENU, ESCAPE_MENU.

Allows EXIT_GAME to be used on the titlescreen

Allows a new counter called PLAY_GAME to be used on the titlescreen. When set, this will cause MegaZeux to enter the gameplay state.



When "standalone_mode" is set, the config setting "no_titlescreen" can be used to disable the titlescreen altogether. When MZXRun starts, the startup world will begin immediately in the game state. When EXIT_GAME or the exit game dialog is used, MZXRun will close.

The Robot Debugger

The robot debugger currently allows game developers to halt all gameplay when user-defined strings ("breakpoints") are matched in the Robotic source code being executed. This feature is somewhat experimental, and will be expanded in the future.



Press Alt+F11 during editing to open the breakpoints menu. From this menu, the robotic debugger can be activated and breakpoints can be defined.



When a breakpoint is reached, the robotic debugger window will appear, displaying the robot matched, its ROBOT_ID and position on the board, the line number that was matched, and the source code line that was matched. The following actions are available:

Continue (key: C or Escape) - the debugger window closes, and execution continues as normal.

Step (key: S) - the next command is executed and the debugger window stays open.

Halt (key: H) - the matched robot halts all execution (equivalent to an END command).

Halt all (key: Alt+H) - every robot on the board and the global robot halt all execution (equivalent to an END command).

Counters (key: F11) - the counter debugger is opened.

Breakpoints (key: Alt+F11) - the breakpoints menu is opened.

(key: PgUp) - move debugger to the top of the screen.

(key: PgDn) - move debugger to the bottom of the screen.



Breakpoints persist between testing and world loading. They are cleared only when the editor is closed.



The new COMMANDS_STOP counter will automatically enable and open the robot debugger during testing if a robot exceeds the number of commands the counter is set to. During regular gameplay, this counter will have no effect. The default value of COMMANDS_STOP is 2 million.

Editor Improvements

The minimal help bars for the editor and the Robotic editor are now enabled by default.



The minimal help bar for the editor now displays the current board's robot memory usage and board mod when appropriate, i.e. after loading a world, editing a robot, setting the mod, or changing the board.



Tab focusing the view is now disabled by default.



Editor defaults now properly persist after testing.



Seeking in the string section of the counter debugger now ignores the $.



The counter debugger will show command usage stats for robots. This can help with profiling and identifying runaway robots.



The counter debugger remembers its position when reopened, and contains many counters that were missing before.



MegaZeux assigns a special property to all types with a CHAR ID index below 128; when their CHAR ID value is set to 255, they will use their parameter to determine which character they will display instead of their CHAR ID. While this isn't new behavior, support for it has been improved; MegaZeux will display a message notifying you of this when it is set, and when the type is placed, it will show the character selection dialog unless it has some other dialog that will take precedence.



The Backspace key has been added. This acts like Delete, except it only removes the object on the top layer. If there is an object beneath the removed object, it is brought to the top.



Edited worlds now retain their world version until resaved. Before, they would lose their world version after testing.



The debug window (Alt+Y/F6) will now show the world version of the current world being played.



Export downver. world is available from the export menu (Alt+X). This will allow you to save a 2.90 world as a 2.84 world.



Setting board defaults now persists after testing a world; previously, they would be reset after testing until the world was manually reloaded.

Misc.

When using the GLSL renderer, you can select a scaling shader from the F2 dialog. Scaling shaders can have profound effects on certain games. It is no longer necessary to manually replace the shaders in the shaders folder unless you want to change the default. A fragment shader is required for your scaler to be available in the menu. If a matching vertex shader exists, it will also be loaded; if not, the default will be used. The available shaders as of this release are:



nearest.frag (default) — nearest neighbor scaling. When MegaZeux is scaled by integer values, it will look exactly like the software renderer, but with larger pixels.

crt.frag — adds a CRT-like vertical scanline effect.

emboss.frag — similar to nearest, but applies an emboss effect over everything onscreen. This can dramatically alter the way many games look, at best looking like a new SMZX mode, and at worst looking like an eyesore.

epx.frag — a 2x shader by GreaseMonkey implementing the EPX algorithm. This looks similar to hqscale, but with more rounding.

greyscale.frag — a greyscale shader based on semisoft.

hqscale.frag — an hq4x shader (replacing our old hqscale shader). This looks rounder than nearest and has smooth edges.

semisoft.frag — a smooth scaler by GreaseMonkey similar to nearest and simple. Works better than nearest at non-integer ratios, and looks better than simple.

sepia.frag — a sepia-toned linear shader.

simple.frag — linear scaling. Use if you want the game you're playing to look like it's on the other side of beer goggles.



On Linux and Mac OS X, the MegaZeux config file is now copied into the user's home directory as ".megazeux-config" if it doesn't already exist. This config file will be used instead of the global config file.



Lancer-X's ccv utility is now included with MegaZeux in the utils folder.

Hey, it's been a while! Didn't mean to keep everyone waiting. To make up for it as much as possible, we've prepared an extra special release of MegaZeux here for you. Yeah, you!I don't even know where to start with this release, as there's simply a lot to talk about. MZX's world formats and rendering architecture have gone through major overhauls, and a multitude of bugs have been fixed (60+). Particularly the MZX UI graphical glitch that occurred when an SMZX mode was enabled.Some notable new features are unbound sprites (MZX's new native pixel precision support), loading character sets/palettes/source code/MZMs from strings, saving MZMs to strings, a new Robotic debugger, the SAVE_COUNTERS and LOAD_COUNTERS function counters, options to help create standalone game releases, the ability to assign character sets/palettes to a board to load on entry, and resetting boards on entry. The size limit of Robotic bytecode has been increased to 2MB.Other important mentions: MegaZeux has been updated to use SDL 2.0 and libmodplug 0.8.9.0. The SAVE_WORLD function counter has been permanently removed. The downver utility has been temporarily discontinued, as adapting it to this release would have been a considerable amount of work. Instead, there is a new option in the Export menu in the editor to export a 2.84 world.Enjoy, and try not to get overwhelmed by all of the new stuff!Contributors:Lachesis - Developer, maintainerDr. Lancer-X - DeveloperTerryn - Help file, testingasiekierka - modplug update, xmp/openmpt support, NDS fixes, misc. port binariesajs - SDL 2.0 supportInsidious - PPC, armhf fixes, Ubuntu binariesSpectere - Darwin binariesiamgreaser - epx and semisoft shadersastral - crt shaderpgimeno - txt2hlp fixesAdditional testers:Old-SckoolNote: This version includes a major overhaul to the world format. I recommend backing up any projects you're actively working on before saving them in 2.90.Or, on Windows, you can press F7 on the title screen to run MegaZeux's built-in updater! Whoaa!!This is essentially an extended and organized explanation of the changelog, since this release has so much in it.