Jump to content

Games written in forth?


Recommended Posts


Manic MIner was NOT written in forth. It was completely written in assembler to squeeze every bit of memory out of it.



we're probably talking about different games then. There is a game called "Maniac Miner" which is definitely written in Forth. It is pretty long (>300 sectors) and not really worth playing. Really lame gameplay, too. I wouldn't call "Forth" a high-level language, but this game shows the typical defects of an interpreted language on the 6502. Too long, and speedwise not competative.


As already mentioned by others, Omnitrends Universe is also in Forth (that's also why it is so huge). It's not particularly fast either, but in this case, it does not really matter.


I also remember a disk editor named "Sherlock" by "The 4th Works". Unfortunately written with a very old forth dialect which caused exactly that this utility did not work on the XL series (unlike claimed in the title...) because it jumped directly into the Os without using the vector table. While particularly useful, the utility drove me mad by first requiring an "OldOs" loader, so I finally ended up writing my own ("Holmes", you got it) in assembly.

Link to comment
Share on other sites

Hey guys,


If anyone wants to see, the source to Hat Trick (for the 7800) was posted to GITHUB. It is indeed a FIG Forth variant called (6502 Forth for ROM) for anyone who wants to have a look.


EDITED: the .SCR files are raw screen dumps, which seem to be in the fig-forth screen format, that is, a fixed 64 column block of 24 lines per screen, so interested readers will need to whip up a script or some code to treat the file as a set of fixed records.


Not too trivial for most anyone with coding chops...






p.s. actually, the unix tool fold does a good job here:



fold -w 64 -s HATRICK.SCR
Link to comment
Share on other sites

  • 1 year later...

6502 asm was my first assembly language, and I wrote lots of 6502 assembly myself, and spent countless hours trying to reverse engineer games by reading disassemblies.


What I find humorous is that when I saw the original source code for some of these games, they were no more coherent than the raw disassembly. icon_smile.gif I guess bad code is bad code, no matter what language it is written in.


One thing I like about forth is that you tend to use longer and more descriptive names. Every forth word is like an assembly subroutine, but typical assemblers had very short labels. I much prefer


  ( Do one game update cycle )

to the typical 6-character-assembler


       JSR UPDPL
       JSR UPDEN
       JSR DRAW
       JMP L652
or, more likely, some spaghetti of JMP and branch instructions.


As I said, you can write lousy code in any language, and especially when you're writing a game, and speed is critical, code tends to get more complicated. But, this is why, at least when I code, I tend to write more comments, not less, or at least have some design documentation or notes. I suspect good programmers did this, brilliant programmers didn't need to do this, and bad programmers left a legacy of junk.


I would speculate that the bad programs were bad not because they were written in forth, but because talented programmers had mastered assembly language already. Forth could certainly help you prototype ideas in code faster than in assembly, and probably in a more coherent manner than doing the same in BASIC.



Klątwa and Władcy Ciemności are both good examples in support of the argument that Forth can be used to create great games.

  • Like 1
Link to comment
Share on other sites

  • 6 years later...
On 9/1/2017 at 4:07 PM, davidcalgary29 said:

Klątwa and Władcy Ciemności are both good examples in support of the argument that Forth can be used to create great games.

I looked at a video of each, and both showed that Forth is capable of pulling off a graphical adventure game, with animation (though, it looked like both were running the same game engine). I noted, though, that only one thing was moving on the screen at a time.


I also checked out Maniac Miner, playing it on an emulator. I thought it played fine, compared to some other titles. There wasn't a whole lot going on. There's just you, and a couple baddies on each level, plus one or two "gems" on the screen at once, and some collision detection with the background, but I saw no sluggishness in the animation.

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...