New Level Art

I decided to start this week by doing some optimisation around the dynamic IRQ manager. I'll start looking at enemy and sprite placement code in the next week or two as I need the most efficient render loop I can get before that begins.

IRQ Manager

So the point of the IRQ manager is to allow me to create multiple IRQ interrupt routines that will automatically be sorted and triggered at the correct time. This is an important part of the game engine as we have the following things all happening on interrupts:

  • Game/HUD split
  • Bottom row scroll glitch hiding via invalid graphics mode
  • Triggering of scrolling code (doesn't actually run from the interrupt but its set off from there)
  • Sprite Multiplexing
  • Timeline Effect
  • Dialog splits
  • Possible background/MC color splits later on in development

Because the timeline effect travels up the screen it can appear in any location on screen and so has to be sorted to fit in between the sprite multiplexer splits. For the most part I have this working but made a few adjustments to make it more efficient.

Firstly the sprite multiplexer was adjusted to draw the first six sprites in the first split and then a separate split for each additional sprite after that. Originally every sprite had its own split because it was just very simple to implement in the existing manager, however this is terribly inefficient as there's no need to do a split until you start "reusing sprites" and something I just overlooked when I first added the sprites to the manager. Not only is this more efficient but it also reduces the number of interrupts  to sort by 5 which is always going to be a benefit.

Secondly by default interrupts would just queue up one after another with no regard to how close they were together which caused multiple issues with some being skipped in certain scenarios. Now instead the manager will decide if the next interrupt is close enough to (or behind!) the current raster line and if so just immediately fire it. This only exception here is for timing critical interrupts which will  only immediately fire if they are running late (the screen splits and bottom row hiding fall into this category).

Finally any sprite interrupt that falls outside the bottom of the visible map screen is discarded as it will not need to be seen and would only cause more raster time to be taken up in an already busy area of the raster cycles.

More Level Artwork

With the size I'm hoping to get this game to, I'm going to need A LOT of artwork. That means I'm going to have to create  lots of tile sets each with an overall theme and then create the PETSCII versions of each. It's going to be a ton of work! So this week I've been reading lots of tutorials about pixel art and got myself some reading material to help out. I cannot recommend Pedro's pixel art tutorials enough , they are simply brilliant and absolutely loaded with useful tips for just about everything you'll ever need to do. Check them out at the link below.

I've found in the past my approach to art has often been rushed and non iterative. By looking at the process as something gradual and with the level of detail given to it that I would give to code, I've found I'm able to create pretty neat graphics. As I've created the tiles for the second world I've noted some things that have helped me:

  • Avoid flat ceilings/walls - I've found that a flat ceiling tends to look boring and actually unnatural. So I created some variations of those tiles and use them to break up the straight edges. The result is much more pleasing.
  • Break up repeating patterns - The repeated 4x4 tile that makes up a lot of the solid walls looked really repetitive and not natural so I created several versions of it with slightly different color tiles and positions. Including some tiles hanging off for even more variety. Using these wherever your eye is drawn to repeating patterns creates a much nicer feel to large blocks of tiles. I did the same with the background pattern by creating a few versions with missing patches.
  • Use simple shadows to define depth - By adding a different tile type for the floor and giving it a strong shadow underneath, it really gives the feeling of depth and makes it obvious these are ground tiles By blocking out areas of the background under the ceiling or against right side walls it creates a similar effect that makes the background seem further back than the wall tiles.

There's still a  lot of work needs doing to complete this world set but I'm happy with the results so far. I will continue to work on it this week until I run out of character set room and then begin the tricky task of making it work in PETSCII.

Leave a comment

Log in with to leave a comment.