C64 BASIC Dungeon Crawler: Fog of War, and Making it Run Faster


The C64 BASIC dungeon crawler tutorial series comes to a close this week, and the new parts are ones I have been looking forward to.

Part 13 adds fog of war, so the dungeon is dark until you explore it. That made the game slower, so part 14 is all about speed. I timed every C64 BASIC optimisation trick I could think of, a lot of them made hardly any difference, but the ones that did add up. Walking now answers a keypress in about a fifth of a second instead of over half a second, still in plain C64 BASIC.

The finished game runs in the online IDE, so you can play it in your browser right now:

Play the dungeon in your browser

Coming soon, the same listing goes through a BASIC compiler. Spoiler, it gets a lot faster.

Worth a Watch, the weekly retro computing newsletter, is now on issue 06

I don't send it out unless you sign up for it because it is separate from my regular content. Patreons get extended and additional content, but the newsletter itself is free!

Worth a Watch weekly retro computing news
Worth-a-watch weekly retro computing news
Get past issues and sign up here

Happy coding!

-- Chris

Here are the latest articles from the blog


C64 BASIC Dungeon Crawler: More BASIC Optimisations (Part 14)

C64 BASIC Dungeon Crawler: More BASIC Optimisations (Part 14)

In previous C64 BASIC optimisations we found hacks to shave processor cycles, can we squeeze more performance out of the dungeon crawler?

Read more


C64 BASIC Dungeon Crawler: Fog of War and the Need for Speed (Part 13)

C64 BASIC Dungeon Crawler: Fog of War and the Need for Speed (Part 13)

Revealing the dungeon step by step … without making the whole game slow to a … crawl!

Read more


Buying 4:3 Monitors in the 21c: CCTV Monitor for Retro Computers?

Buying 4:3 Monitors in the 21c: CCTV Monitor for Retro Computers?

Testing a Thinlerain 9.7″ 4:3 CCTV monitor with VGA, composite and HDMI for fifty quid, bought to stop my Pentium III XP machine looking wrong

Read more


C64 BASIC Dungeon Crawler: Rats, Shields and Fireball Magic

C64 BASIC Dungeon Crawler: Rats, Shields and Fireball Magic

In part 12 we increase the difficulty as the game progresses, we infest the dungeon with rats, and make the magic pickups actually worth having!

Read more


C64 Ultimate - 16 Colours on Every Hires Pixel (and Atari ST Pictures)

C64 Ultimate - 16 Colours on Every Hires Pixel (and Atari ST Pictures)

It turns out, the Commodore 64 Ultimate has some surprising graphical abilities, you just need to know the tricks!

Read more


C64 BASIC Dungeon Crawler: Stairs, Levels and Levelling Up (Part 11)

C64 BASIC Dungeon Crawler: Stairs, Levels and Levelling Up (Part 11)

Adding new levels and a feeling of progress to our C64 BASIC Dungeon game

Read more


Write Once, Run Anywhere: Java for Retro Computers?

Write Once, Run Anywhere: Java for Retro Computers?

Java was meant to be "write once, run anywhere". How does that hold up for retro programming?

Read more


C64 BASIC Dungeon Crawler: Generating a Walkable Map

C64 BASIC Dungeon Crawler: Generating a Walkable Map

Fixing the dungeon so it is always navigable! (While keeping it in C64 BASIC)

Read more

Retro Game Coders - Learn to code retro games, restore and upgrade retro computers

Retro Game Coders is your home for learning retro game development, and the love of retro computers and games consoles.

Read more from Retro Game Coders - Learn to code retro games, restore and upgrade retro computers

Big news this week, Legends of Netharia: GrimHaven, the game I have been contributing pixel-art for, has just been released for ZX Spectrum 128K! Thanks JB for having me along for the journey :) As well as mulling over working on another game with Johnny, I also have a Christmas game in the works. Look out for behind the scenes on that soon! This was partly the inspiration behind the experiment to get Atari ST graphics working on the C64U. This is only possible because work on the C64 BASIC...

Worth a Watch, the weekly retro computing newsletter, is now on issue 06, and the people who are opted-in seem to like it! I don't send it out unless you sign up for it because it is separate from my regular content. Patreons get extended and additional content, but the newsletter itself is free! Worth-a-watch weekly retro computing news Get past issues and sign up here Latest from the blog is below, including C64 BASIC Dungeon Crawler: Stairs, Levels and Levelling Up (Part 11). Happy coding!...

In this issue: MiSTer, Commodore 64, Amiga, PC, Amstrad CPC, Arcade, C64, Analogue Pocket, Android, Atari 8-bit Read it now During our visit to The National Museum of Computing we very briefly checked out the Cray hardware, thought it was fun to see, then moved on. I wish now after watching RetroBytes documentary that I had really taken time to soak it in. Fortunately I grabbed an annual pass, so I need to get back down there! AI slop versus helpful digital buddy debate is raging again, this...