Retro is a concatenative, stack based language with roots in Forth.

It is designed to be small, easily learned, and easily modified to meet specific needs, it has been developed and refined through continual use by a small community over the last decade.


This blog is written in Retro and has served as my primary means of posting things concerning Retro since 2010. The core code for Corpse is included in the Retro releases and can be freely studied and deployed.

The most recent posts are shown below. You can also view a list of all posts.

Post 141 of 215

2011-09-06

Random Bits of Code: Interactive Fiction

I've been dabbling with an interactive fiction framework. It's still far from useable, but a peek at some test code is shown below.

  room foyer
  room bar
  room cloakroom
  item cloak
  item hook
  item message


  ( ==[ foyer ]============================================== )
  "You are standing in a spacious hall, splendidly decorated
  in red and gold with glittering chandeliers overhead. the
  entrance from the street is to the north, and there are
  doorways south and west." describes foyer

  &bar southOf foyer
  &cloakroom westOf foyer


  ( ==[ cloakroom ]========================================== )
  "The walls of this small room were clearly once lined
  with hooks, though now only one remains. The exit is a
  door to the east." describes cloakroom

  &foyer eastOf cloakroom


  ( ==[ bar ]================================================ )
  "The bar, much rougher than you'd have guessed after the
  opulence of of the foyer to the north, is completely empty.
  There seems to be some sort of message scrawled in the sawdust
  on the floor." describes bar

  &foyer northOf bar
  &message in bar


  ( ==[ hook ]=============================================== )
  "It's just a small brass hook. You could probably hang a
  cloak on it." describes hook

View comments for this article