github ZQuestClassic/ZQuestClassic nightly-2023-11-03-2
Nightly 2023-11-03 (2)

pre-release12 months ago

The following are the changes since nightly-2023-11-03:

Refactors

  • unpack 4-bit tiles when quest is loaded ff01c741b
     

    This reduces CPU usage by ~3%.

    Previously, 4-bit tiles were only unpacked just before being drawn. Unpacking means converting into a format ready for drawing, which is somewhat slow to do in functions as hot as tile drawing. Now, when a qst is loaded all 4-bit tiles are unpacked in memory. When saving a qst the reverse happens. This change has no impact on the qst file format.

  • avoid copy when drawing tile without any transformation 973303a3c
     

    This reduces CPU usage by ~7%.

  • make get_qr faster by unpacking the bits ahead of time 990eb380b
     

    This reduces CPU usage by ~5.5%.

Player

  • remove accidental copy in run_gswitch_timers 9646be4b1

The following are the changes since 2.55-alpha-119:

Expand changelog

Features

  • Add 'Screen->Data[]', 'Screen->DataSize' script data array for every screen. b080de56c
     

    This data array can be edited in the 'Screen Data' dialog, and all changes made by scripts are saved to the save file.

  • Init Data dither pattern picker/previewer ef1e3e5f6
  • fade out the background behind dialog windows ba6344865
  • 3 new dithering styles 8b7aa8ed7
  • customizable 'ShoveOffset', add zfix round-direction handling 809119087
  • FFC 'Platform' flag for moving platforms (to pull the player along with) 3fb03f0b0
  • Crumbling Combos (crumbling floors) 5ac8fd1ee
  • Customizable sword tapping sounds (in Misc SFX and combo editor) b4eb8aa23
  • customizable flicker speed and color for enemies and player in init data 8a18af11e
  • allow conveyors on all layers + ffcs (QR) 4d9976b23

Player

  • added a setting to put a limit on 'uncapped' FPS so the game still runs at playable speeds 5f9a3d367

Editor

  • Pressing 'esc' while zoomed in on the minimap now unzooms (instead of trying to quit zq) 918cdafca
  • 'Insert SCC' button in the string editor now respects the caret position c706b3af3
  • made enemy editor InitD compatible with script metadata 8c0e4b37b

ZScript Standard Library (std.zh)

  • memcpy version that only takes 2 args (auto-determines size) 3bb11dda8

ZScript

  • script access for extended dmap titles and new dmap intro string IDs 21c168a1b
  • GetTilePixel(), SetTilePixel(), and Is8BitTile[] b9b290a14
  • 'Screen->GuyCount'/'mapdata->GuyCount' for read/write enemy respawns 340d55b9c

Web

Bug Fixes

  • wavy/cancel compat not being set 2f0fe8052
  • a couple small things related to script access of subscreens d120f2c3a
  • 'Newer Player Movement' corner-shove works better with off-grid solids 1695530d3
  • Init Data dialog sometimes being too tall ed36204f0
  • use cross platform clock for text edit proc e6bdfb99d
  • issue more vsync in old gui proc as needed to catch up 5add82df0
  • [mac] only check for .app to allow for app bundle to be renamed b393e5875
  • set size when making dlg layer to avoid crash 6d47e8136
  • minor dialog hiccups in some circumstances 02764be1b
  • crash on viewing 'Fairy' flag help texts 62bfe66d4
  • dialog windows in background popping out on tab-out e7dbfacdd
  • tooltips staying open over dialog windows fadfa27d2
  • use steady_clock instead of system_lock to measure replay duration d3e8e7fcc
  • [mac] handle CMD key press and allow CMD for all places CTRL is e45016fb2
  • a couple crashes/dialog oddities c577892d9
  • add proper versioning for init data deltas fdd6da3c1
  • Crumble type now uses 'Continuous' as a checkbox, fix wizard for Crumbling type 020466990
  • various issues with the default display size for windowed mode 20f6fa908
     

    Instead of using the monitor scale / DPI to multiply the size we set the window to, it now looks at the monitor resolution and uses the largest integer multiple of the base resolution (256x240 for zplayer, 456x342 for zeditor and zlauncher). This always takes into account the scaling of the OS (the monitor width/height changes when you modify that). If a window size is saved from a previous run, it will use that instead -- unless it won't fit, then it goes back to getting the largest resolution for the given monitor. More details:

    • Completely change how the initial display is sized for windowed mode.
      Instead of using the monitor DPI to scale up a base resolution,
      default to as large a resolution as possible while maintaining an
      integer scale. This particular commit retains the previous behavior
      for Windows, but the next one will move Windows to the new behavior
      (separate commits just in case a revert is necessary)
    • Set the desired window size for zeditor before creating the display,
      not after.
    • Use the base resolution in zplayer for the allegro 5 screen bitmap,
      instead of 2x the base resolution. Should improve rendering time a bit
    • More reliable behavior on mac. Previously would possibly cut off top
      part of screen and mess up mouse events if the initial display height
      was bigger than the available height
    • Set default for fullscreen option on Mac back to off. On newer M2
      Macs fullscreen display creation is bugged. Fine for Windowed -> then
      Maximize, and fine for older Macs, but for now just set the default
      to windowed mode to be safe
  • simplify display size for windows too a049b6ce6
  • set window title as early as possible to reduce flash of text d7312b9dc
  • mark render item transform dirty when changing parent f59d8b314
     

    This bug resulted in the tooltip / highlighter being offset when the window size changes.

  • bomb equippability not respecting cost counter customization c7ffbf652

Player

  • fixed passageway and item cellar fade-in when "New Dark Rooms" rule is on 4748d9a89
  • playtime not drawing unless scrolling ddd3f26a1
     

    I'm so mad at how dumb this was. Specifically, it doesn't draw if you have "subscreen over sprites" disabled unless you're scrolling.

  • 1-pixel gap in 'show walkability' cheat draw ee0eda1e2
  • 'Newer Player Movement' corner-shove being far too lenient d0e2908b1
  • fix manhandla step speed calculations 60e9d9f41
  • show previous changes in player data menu when used multiple times without unpausing 325834d44
  • restore quest progression and skip names 804484ddd
  • fix corner shove solidity 7c5c7c992
  • set size when making info layer to avoid crash 5163053b5
  • titlescreen hp offset when hp_per_heart != 16 31f3840e4
  • Lift 'Special Item' setting wrong state 7215fd92d
  • properly reset directory cache 8cacad3d5
  • subscreens with item-overridden level items not properly displaying 913003180

Editor

  • fixed crash when opening preview mode 23ad85cfb
  • made autocombos respect moving, adding, and removing combos f8d89f5ad
  • prevent crash when changing font 640378df8
  • prevent data loss when grabbing tile from old quests f8fdd7bb7
  • qrs having wrong category name in search menu 5391348e4
  • import maps was unhelpfully clearing everything 50c6377e1
     

    The map import tool was checking if the first screen's valid field was a special value denoting it was "cleared" by the user. It's unclear why valid holds this information, but presently it's not useful and breaks map imports randomly.

  • use cross platform clock for timing to fix combo editor animation 163f9a91f
  • use cross platform clock for zscript compile timing cde9a4688
  • format zc_args.txt correctly be4390661
  • preserve screen bitmap 3d674f868
  • prevent crash when rendering minimap during loading 4c7dfe677
  • fix crash with passive and overlay subscreen settings 1c9b81f57
  • 'Paste FFC' being slightly misaligned from the grid 8664554e2
  • clear tooltip before entering square-placement mode 972e6919a
  • test mode init data marking quest as "needs saving" extraneously 243088418
  • mark tooltip dirty if text changes 164f77d33
  • Fix palette desyncs (permanently?) b5a7ee226
     

    Should no longer need to ever manually 'rebuild transparency table'. As such, the default keybind for 'Reset Transparency' is now '(None)' instead of 'B'

  • do not freeze screen bitmap while in pal dialog 95fac7ac8
  • Tall Grass combo wizard dropset not setting flags properly 4732eb4b0

ZScript Standard Library (std.zh)

  • update ffrules.zh to include all new quest rules cc67be852

ZScript

  • 'subdata->TransClock' was not returning -1 properly when not transitioning 95edf1e5e
  • fix slowdown caused by draw commands during frozen message strings 48511cdd5
  • persist compiled jit functions when reloading the same quest 2bd7e877d
  • Game->CurrentItemID() being completely broken 9fc212abb
  • mark destructors of base classes as virtual 29c39e15a
  • do allegro 5 init before a4 init in parser 58e391f63

Web

  • remove unnecessary bitmap backup 9c309afab
     

    This pretty much doubles FPS across the board. huzzah

  • support both landscape orientations 8206a3008

Documentation

  • specify what OS versions we support 080b61e10

Build

Web

  • fix renamed script d79ef7d06
  • remove post-processing by python script f8b2af856
  • include function names in release build, separate dwarf for debug build fb44b2a78
  • integrate web build into cmake 7dbb75dee
  • fix missing zscript compiler caused by 7dbb75d bbdb9be63

Chores

  • fix many many typos of it's -> its a7e3cf4ec
  • remove outdated or unnecessary docs and ZScript headers 81b871ade

Refactors

  • memcpy the buffer in PACKFILE fread 8f547f8f5
     

    This saves ~500ms on my Mac when loading Yuurand.qst

  • speed up copy_tile / tilesize 01e13ec0a
  • use safe cstr reading functions b1a7b8d43
  • add bounded_vec container type 9edaa62a2
  • render a4->a5 bitmaps in first pass 8ef8665a7
  • reorder field initializer list to fix compiler warnings 8d64f8374
  • simplify render tree drawing b52d7eaea
     

    This adds prepare and render functions to the RenderTreeItem class. Also makes them virtual so that new classes can be made to represent a render item. The minimap drawing code was moved to this.

    Consolidates the logic for when a render item is dirty, and moves allegro 4 bitmap handling into a new derived class.

  • use a single bitmap for dialog tint 8a8ef4667
  • add bitmap_flags to rti 6af0dcc23
  • Init Data / Gamedata acb7c8481
     

    Change how Init Data is stored and saved to the quest file (and rearrange the dialog slightly) - Allow setting mcguffin level state for all levels in init data/cheats instead of just levels 1-8 - Init data health can be in HP instead of just in Hearts - Can set init values for script counters 26-100 (was missing before) - Change how data is stored and saved to the save file

  • cache zasm script size be7c81d3c
  • move zcsound source files to src/sound 09dfea4eb
  • remove zcmusicd.cpp 15628e6f3
  • move ffc set data / changer out of ffc.cpp and to src/zc 3a6d2d394
     

    This is the first step to moving ffc.cpp to zcbase.

  • cleanup combo position handling, optimize spotlight code 44cb8bb72
  • cache config read for use_linear_bitmaps 4c922be5e
  • remember previous screen clip for scrolling pane 7a8021809
  • avoid copying combo everywhere 0ecfa71f6
  • limit default window size to 3x the base resolution, and add a buffer so to always be less than the monitor size 2f6cf5a72
  • unpack 4-bit tiles when quest is loaded ff01c741b
     

    This reduces CPU usage by ~3%.

    Previously, 4-bit tiles were only unpacked just before being drawn. Unpacking means converting into a format ready for drawing, which is somewhat slow to do in functions as hot as tile drawing. Now, when a qst is loaded all 4-bit tiles are unpacked in memory. When saving a qst the reverse happens. This change has no impact on the qst file format.

  • avoid copy when drawing tile without any transformation 973303a3c
     

    This reduces CPU usage by ~7%.

  • make get_qr faster by unpacking the bits ahead of time 990eb380b
     

    This reduces CPU usage by ~5.5%.

Player

  • do far less work in platform_fallthrough 8861f51f1
  • do less work in run_gswitch_timers 78af21af8
  • avoid costly script object dealloc when destroying dummy item c22e9d68f
  • use more accurate but slower tile drawing when drawing on edge of bitmap c1601e941
  • respect bitmap clip in tile drawing functions, remove usage of temp_buf in screen draw a42586c11
  • totally remove temp_buf in screen draw, and masked_blit 93f25b690
     

    This refactor reduces CPU usage by roughly 6%.

    This results in some unavoidable minor graphical changes for quests with the QR "Subscreen Appears Above Sprites" disabled. Specifically, sprites (such as jumping enemies, weapons, etc) continue to draw over the subscreen background as before, but now also draw over the individual subscreen UI elements. In most cases this looks better, and better follows what the QR text says will happen.

    https://hoten.cc/tmp/compare-report-screen-draw-refactor/

  • cache result of item_tile_mod, which saves 17% of CPU time b3c942902
  • remove accidental copy in run_gswitch_timers 9646be4b1

Editor

  • only draw tooltip bitmap when in use ef146dede
  • remove rests and use smarter fps throttle 3ca0a1208
     

    Use the same smart FPS throttle that the player uses in the editor too.

    This doubled the FPS in the Web version.

  • draw minimap to smaller bitmap df2602f85
     

    Also add a callback to RenderTreeItem, which allows the main drawing code to directly render the minimap as needed.

  • only rerender minimap when dirty 66d882141
  • draw tooltips to smaller bitmap 50f1344a3
  • move minimap drawing to render_minimap.cpp 042728610
  • remove dialogs for deprecated modules and quest templates 0ebbc8450
  • move tooltip rendering to render_tooltip.cpp 911019c55
  • bah humbug! 21ecb9203
  • remove pointless time code d0549a3ed

ZScript

  • replace script debug_id with composite id (type, index) 8e6c48a21
     

    The previous hack of using a global variable incremented in the constructor had strange behavior, and would result in different ids given when reloading a quest.

  • use .contains instead of .find in jit.cpp 02dbb040c

Web

  • prevent script trace unless debugger is enabled cf3ce065b
  • stop excluding some slow-to-build dialogs in debug builds 452efb90a

Tests

  • re-enable classic_1st.qst resave test 9065169e6
  • expand resave test to include ss_jenny.qst a92664884
  • run replay tests concurrently 762ac2db5
  • add playground_ffc_changers.zplay c5f02cfb1
  • pass correct value for frame arg, which was breaking --update 2cf6ae4c6
  • recover from failure when downloading a release 6545e847d
  • add --concurrency flag to run_replay_tests.py, and set to 1 in headful mode df4644a4e
  • set retries flag when getting baseline replays locally 27f017136
  • remove diff from replay test run result 8ef2c1575

Editor

CI

  • trigger web.zquestclassic.com deploy on release c17ef05ea
  • use clang 17.0.2 for linux 1d3ebb548
  • add failing test results to tar for faster upload 78cf78184
  • reduce amount of data uploaded when replays fail f589ada7e

Misc.

Player

  • set cont. heart beep default to off 9919433e6
  • change ending credits from Zelda Classic to ZQuest Classic 31c7829ca

Editor

  • add -uncompress-qst CLI command 696657428
  • make checkerboard bg in the tile editor align with the tile grid 2b681111a

ZScript

  • Add compile error when trying to store temporary literals e6296db90
  • never compile scripts larger than 20,000 ZASM instructions 5986e6021
  • print jit_log stuff to allegro log instead of stdout 3e720b62d
  • highly priortize only frame-1 global scripts for JIT compiler e8f60b40e

Web

  • make quest url a bit friendlier 8aa27f494
  • use gzip instead of allegro PACKFILE compression dee67d885
     

    gzip compresses better than allegro PACKFILEs:

    And it's a bit faster to load a qst in the Web version when it doesn't have to decompress it. For Yuurand.qst, loading time (including downloading) from 17.4s to 14.5s

  • better indicate download progress for compressed assets 3fb07895d
  • support default open URL for tilesets b1e6584dd

Don't miss a new ZQuestClassic release

NewReleases is sending notifications on new releases.