Jump to content
neglectoru

Games written in forth?

Recommended Posts

I considered cross-posting this in the Programming group, but I think more people read this section.

 

Were there any Atari 8-bit games/applications that were written in the forth programming language? I vaguely remember there being discussion about this before. Normally, forth seems to get a bad rap, especially as a language for games. I'm curious how much of that was personal preference (REAL programmers write games in assembly!) or if there were good reasons why forth might not be used (too slow, large programs become unwieldy)

 

On the surface, forth looks like a good match for programming for the Atari, as it was for other early systems. Forth interpreters are much simpler than basic interpreters, the threaded code is reasonably fast, and forth programs work well in memory poor environments.

 

Are there any forth programmers out there?

Share this post


Link to post
Share on other sites

I considered cross-posting this in the Programming group, but I think more people read this section.

 

Were there any Atari 8-bit games/applications that were written in the forth programming language? I vaguely remember there being discussion about this before. Normally, forth seems to get a bad rap, especially as a language for games. I'm curious how much of that was personal preference (REAL programmers write games in assembly!) or if there were good reasons why forth might not be used (too slow, large programs become unwieldy)

 

On the surface, forth looks like a good match for programming for the Atari, as it was for other early systems. Forth interpreters are much simpler than basic interpreters, the threaded code is reasonably fast, and forth programs work well in memory poor environments.

 

Are there any forth programmers out there?

 

in the UK an 8 bit computer was released called the Jupiter Ace which used Forth as its language. While reading about this i looked into Forth for the Atari and picked up one from best computer from a company called Elcomp. It appears to be based on Figforth and has atari extensions and has some interesting demos.

 

Look inthe programming section and search on Forth..a guy called Carsten seems to do a lot with the language.

 

While forth is pretty specialized these days it is used on eveyr Apple Mac as the firmware is written in Forth. Apparently NASA uses Forth for many parts of the international space station. Also Carsten did say a recent home brew game was written in forth. Lastly..an Atari Corp programmer was quoted as saying one of his colleagues did not know assembler so tried to write a game in forth. problem was the language would take up had the cartridge space!!

Share this post


Link to post
Share on other sites

I can't remember much about the language, but I'll relate a Forth story if anyone cares. Back in Jr. High, I took a Forth class. Our computer room was comprised entirely of Apple ][+'s and E's. That's what we learned on, but... our teacher had a different computer at a special desk in the back of the lab. It was HIS desk and we were not allowed to touch his stuff. That computer was an Atari 800 with a disk drive! lol I had a 400 at the time and with it or another bulk deal (can't remember), I was in possession of an Assembly Language programming cart. I think this might have fit in the other side of the 800's (non normal) game slot. Because I wasn't interested in programming 6502 (or any machine or assembler besides TMS9900), I ended up selling it to him for $10 or $20 (again, memory fails)! lol Even back in the early 80's, I was a wheeler-dealer. lol

 

I do remember that there were programs commercially released in Forth, but games do not ring a bell.

Edited by save2600

Share this post


Link to post
Share on other sites

Were there any Atari 8-bit games/applications that were written in the forth programming language?

 

Are there any forth programmers out there?

 

 

There is a game called Omnitrend's Universe this was written in valforth. If you google it you should find quite about it.

 

and yes there are few Forth programmers here :)

Share this post


Link to post
Share on other sites

I don't know about 8-bit games, but several 7800 games were written in FORTH (Hat Trick, Choplifter, Karateka, and possibly GATO I believe). There was also an Atari pinball machine (4x4) which had its logic done in FORTH.

 

Tempest

Share this post


Link to post
Share on other sites

I considered cross-posting this in the Programming group, but I think more people read this section.

 

Were there any Atari 8-bit games/applications that were written in the forth programming language? I vaguely remember there being discussion about this before. Normally, forth seems to get a bad rap, especially as a language for games. I'm curious how much of that was personal preference (REAL programmers write games in assembly!) or if there were good reasons why forth might not be used (too slow, large programs become unwieldy)

 

On the surface, forth looks like a good match for programming for the Atari, as it was for other early systems. Forth interpreters are much simpler than basic interpreters, the threaded code is reasonably fast, and forth programs work well in memory poor environments.

 

Are there any forth programmers out there?

 

Maniac Miner was written in forth.

 

Not a memorable game IMO other than that tidbid.

 

-rcb

Share this post


Link to post
Share on other sites

[quote name=Sub(Function(:))' date='Tue Jan 5, 2010 8:13 AM' timestamp='1262679197' post='1912995]

Were there any Atari 8-bit games/applications that were written in the forth programming language?

 

Are there any forth programmers out there?

 

 

There is a game called Omnitrend's Universe this was written in valforth. If you google it you should find quite about it.

 

and yes there are few Forth programmers here icon_smile.gif

 

 

Universe was written in Forth?

 

I'd always figured it was written in BASIC.

 

 

Cool to know.icon_smile.gif

Share this post


Link to post
Share on other sites

I don't know about 8-bit games, but several 7800 games were written in FORTH (Hat Trick, Choplifter, Karateka, and possibly GATO I believe). There was also an Atari pinball machine (4x4) which had its logic done in FORTH.

 

Tempest

That explains why said games suck so much on the A7800. :lol:

 

All have poor controller response time..

Share this post


Link to post
Share on other sites

I don't know about 8-bit games, but several 7800 games were written in FORTH (Hat Trick, Choplifter, Karateka, and possibly GATO I believe). There was also an Atari pinball machine (4x4) which had its logic done in FORTH.

 

Tempest

 

Really? Any idea as to what compiler was used to make these 7800 games?

Share this post


Link to post
Share on other sites

I don't know about 8-bit games, but several 7800 games were written in FORTH (Hat Trick, Choplifter, Karateka, and possibly GATO I believe). There was also an Atari pinball machine (4x4) which had its logic done in FORTH.

 

Tempest

 

Really? Any idea as to what compiler was used to make these 7800 games?

No clue. All those games were done by the same programmer at iBid and I read somewhere long ago that he did them in FORTH (I can't recall where now, it might have been a conversation with another programmer).

 

Tempest

Share this post


Link to post
Share on other sites
Really? Any idea as to what compiler was used to make these 7800 games?

 

Just looked in the the Hat Trick source code zip file and it contains the most unhelpful text of "6502 FORTH for ROM".

  • Like 1

Share this post


Link to post
Share on other sites
Really? Any idea as to what compiler was used to make these 7800 games?

 

Just looked in the the Hat Trick source code zip file and it contains the most unhelpful text of "6502 FORTH for ROM".

 

Thanks for pointing me in this direction. I never looked at the source for this game before... :)

Share this post


Link to post
Share on other sites

I think the original 800 Dig Dug was done in Forth and it was horrible

Landon Dyer thought that DK Jr was originally started in FORTH but it was scrapped and redone.

 

Tempest

Share this post


Link to post
Share on other sites

I think the original 800 Dig Dug was done in Forth and it was horrible

Landon Dyer thought that DK Jr was originally started in FORTH but it was scrapped and redone.

 

Tempest

 

Tempest for the Atari 8-bit was written in forth, or the arcade version?

Share this post


Link to post
Share on other sites

I think the original 800 Dig Dug was done in Forth and it was horrible

Landon Dyer thought that DK Jr was originally started in FORTH but it was scrapped and redone.

 

Tempest

 

Tempest for the Atari 8-bit was written in forth, or the arcade version?

 

:? Tempest is his user name.

Share this post


Link to post
Share on other sites

I think Owen Rubin (Atari coin-op; developed Major Havoc) said at CGE 2004 that he did a couple of Atari 800 games in Forth. He didn't specify what they all were, but he did mention Yahtzee. I don't think they were all released.

 

Landon Dyer writes about Donkey Kong and Forth in a post on his blog (linked in another thread). At the bottom of the page is a comment from the lead developer of AtariLab, who states that AtariLab was developed in Forth.

Share this post


Link to post
Share on other sites

Forth is an interesting language but not really suited by default for games programming.

 

However there were some specific versions of Forth with graphics commands tacked on (White Lightning being the best), a bit like STOS on the ST if you like. These were quite good really, but still I never understood why anyone could learn Forth and not learn ASM, just as much gobbledeegook to me :)

Share this post


Link to post
Share on other sites

Hi,

 

I'm this "Carsten guy" who still programs in Forth (and you know what, I'm even making money (but not a complete living) from it).

 

I've written some games and applications in Forth, the development/testing system for the MicroUSB Cartridge and also the prototypes for the SIO2USB Shell were written in Forth.

 

The most complete game was Stroq ( http://www.atariage.com/forums/topic/82568-stroq-sourcecode/ and http://atariwiki.strotmann.de/xwiki/bin/view/APG/ForthStroqSource )

 

I'm also maintaining two Forth Systems, Volksforth for Atari 8bit, Commodore C64/C16/Plus4, Apple I+II, Atari ST, MS-DOS, CP/M, Amstrad CPC, Mensch Computer ...., and X-Forth for the Atari 8bit.

 

Forth is fun to work with, but you need to re-wire your brain a bit and forget almost all you have learned about programming before, else you get mad about it. But then it is rewarding and a complete new world of virtually unlimited possibilities (as Forth is ultimately extensible in all directions).

 

Forth Programs are quite compact, and a simple Forth kernel probably fits in 2K of RAM/ROM on an 6502.

 

Speed depends on the implementation of the Forth System. Indirect Threaded Forth as it is often seen on the 6502 is slower than machine language, but more compact (every subroutine call is 2 byte, whereas a 6502 machine language subroutine call is usually 3 byte).

 

However on other platforms there are native code Forth compiler whose speed is comparable to good C-Compiler.

 

In a 6502 Forth, you can always write performance critical parts in assembler, as most Forth systems have an build in 6502 assembler (and if not, it's trivial to add).

 

-- Carsten

Edited by cas
  • Like 1

Share this post


Link to post
Share on other sites

Forth is an interesting language but not really suited by default for games programming.

 

However there were some specific versions of Forth with graphics commands tacked on (White Lightning being the best), a bit like STOS on the ST if you like. These were quite good really, but still I never understood why anyone could learn Forth and not learn ASM, just as much gobbledeegook to me :)

 

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. :) 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-FRAME
 ( Do one game update cycle )
 READ-INPUT
 UPDATE-PLAYER
 UPDATE-ENEMIES
 DRAW-SCREEN
;

: MAIN-LOOP
 DO DO-ONE-FRAME LOOP
;

 

to the typical 6-character-assembler

 

L652   JSR JOYIN
      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.

  • Like 1

Share this post


Link to post
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.

Guest
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.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...