Release v1.3.421


Changes since v1.3.393:

  • Engine: speed up font loading by about 20%, and add loading screen info.
  • Level: also add an EscapeButton pic to Hello World.
  • Menu: when quality was adjusted, save settings instantly.

Files

Windows (64-Bit) 32 MB
Version v1.3.421 Apr 03, 2023
Windows (32-Bit) 32 MB
Version v1.3.421 Apr 03, 2023
Linux (64-Bit AppImage) 32 MB
Version v1.3.421 Apr 03, 2023
Linux (64-Bit) 33 MB
Version v1.3.421 Apr 03, 2023
macOS (Intel and Apple M1) 38 MB
Version v1.3.421 Apr 03, 2023
Android (APK) 89 MB
Version v1.3.421 Apr 03, 2023

Get AAAAXY

Comments

Log in with itch.io to leave a comment.

WOW!! What have you done to optimize loading at 20 percents? Was it a hard process of searching the new logic, alghoritmes, or just re write some stupid part of code for better?

(4 edits)

It was rather boring to be honest.

The font outline effect is done by turning one font into two: one as is (just with wider spacing), and another one where all glyphs are replaced by an expanded form of the same (where every pixel is active when previously any neighbor was active). I then draw the outline first and the regular glyph on top. (Sadly, fonts in Go cannot be colored, or else I could combine both into one render call - an option I still have open, but it seems like I do not need it for framerate)

Previously I had implemented this by returning an Image object where the At() function queried At() for all neighbor pixels.

The new implementation rather computes entire glyphs at once, and queries every source pixel exactly once by performing the operation separably (first horizontal, then vertical “blur”).

The main winning from this was a reduced virtual call overhead (as At() is an interface method). Calling it only once per pixel, and doing all further work on byte array realm, rather than nine times meant less indirection.

The main cost of it was more code.

Note that I had previously already eliminated almost all ingame font rendering and did it at load time into pregenerated images - this avoids complex font rendering operations at render time that previously caused fps drops or lags on low-end systems, which was unnecessary as almost all text in this game is static.