Author Topic: Forth like machines for embedded scripting in demos  (Read 1664 times)

0 Members and 1 Guest are viewing this topic.

Offline Chalisque

  • ZX 81
  • *
  • Posts: 14
  • Karma: 0
    • View Profile
Most demos, by their nature, have a fixed design.  Most fascinating to me are those which fit in a small space.  What I am pondering is an interactive demo which is in some way programmable.  For this, there must be a programming system which by its nature needs to be small and powerful, and this points to Forth.  I am wondering if anybody else has been thinking along these lines?

Offline Canopy

  • Atari ST
  • ***
  • Posts: 208
  • Karma: 20
    • View Profile
often demo's and games have their own scripting using LUA


but other than that the other option is live shader programming?

a'la www.shadertoy.com
« Last Edit: April 18, 2013 by Canopy »

Offline hellfire

  • Sponsor
  • Pentium
  • *******
  • Posts: 1289
  • Karma: 466
    • View Profile
    • my stuff
I'm not getting the connection between "interactivity" and "forth" but I remember a 4k intro which was stored as forth-instructions (which are much smaller than the x86-cisc instruction-set) and translated to x86-opcodes at runtime with an own just-in-time compiler.
Unfortunately I don't remember its' name...
Challenge Trophies Won:

Offline Chalisque

  • ZX 81
  • *
  • Posts: 14
  • Karma: 0
    • View Profile
Thanks,  that's all i needed to know.  Someone else has thought of that trick.  There are good real world uses, but I was wondering whether someone had realised it could be used for demo purposes.  The interactivity thing with forth is that forth programs can write and compile their own forth programs with no help from outside their userspace.  They do this in a very small space.  The user can insert words into a running program to totally change how the program runs, and the words can change other things which change behaviours.  You could write a small 64k demo using a forth engine to visualise cryptographic hashes as pretty graphics (which I guess is what they do in Hollywood all the time).