Optimizations and boring stuff

Well. Easter finally happened, and I ended up spending most of my time doing something boring. At least, partly. But quite important, nevertheless.

I implemented a full “document”-structure in the TRSE editor. This includes

  • Having projects (with individual settings)
  • Having multiple documents open
  • Displaying labels of said documents
  • Project and global settings
  • Fixing annoying bugs in the editor GUI
  • New level editor data format
  • Optimizing image displaying routines (threads going haywire etc)
  • Remembering open files, recent projects etc

On the compiler side, the following stuff was added

  • Updating checks for errors from Dasm
  • Rewriting new cycle routines
  • The best part: optimizing conditionals. I realized that like, 80% of my conditionals were simple “if a>b then…” , so you really don’t need the full check with logical conditionals. In addition, I added a check on whether the main block had more than ~80 instructions (on average, 128 bytes), and if this was the case, just use regular bcc etc to jup to false conclusions. This basically decreased the code size of *all* tutorial with 15%, and increased both my speed & happiness by about 20%.

But in the end, I realized how much I hate writing GUI-stuff. Luckily, most of the required shenanigans are now implemented, and I just need to test for bugs (while actually developing the game)

SOO MANY FILES OPEN AT THE SAME TIME, IMAGES AND SOURCE

 

I’m constantly updating the tutorial game, and yay, it is getting *bigger*. However, after the recent optimizations, the code size was actually decreased by about 25%, while speed increased almost as much. Which is good. I guess.

I’m currently shifting focus from GUI and editor document updates to actually finishing the tutorial game, but as usual, I am hitting new bugs and stuff. Like, I realized that I don’t have enough memory to actually include an intro screen, which is about ~10kb. sucks, but what can you do. The levels currently occupy 16kb of memory, and I’m thinking about new ways to optimize the data storage. But that is for a later post. Now I need to fetch another beer.

Leave a Reply

Your email address will not be published. Required fields are marked *