Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.forth > #50982 > unrolled thread

Creating a maze game

Started bySteve Graham <solitary.wanderer52@gmail.com>
First post2016-09-14 20:30 -0700
Last post2016-09-17 02:21 -0700
Articles 8 on this page of 48 — 17 participants

Back to article view | Back to comp.lang.forth


Contents

  Creating a maze game Steve Graham <solitary.wanderer52@gmail.com> - 2016-09-14 20:30 -0700
    Re: Creating a maze game lawrencedo99@gmail.com - 2016-09-14 21:41 -0700
      Re: Creating a maze game JUERGEN <epldfpga@aol.com> - 2016-09-16 10:45 -0700
        Re: Creating a maze game lawrencedo99@gmail.com - 2016-09-16 16:49 -0700
          Re: Creating a maze game JUERGEN <epldfpga@aol.com> - 2016-09-17 01:38 -0700
            Re: Creating a maze game lawrencedo99@gmail.com - 2016-09-17 02:08 -0700
              Re: Creating a maze game Julian Fondren <julian.fondren@gmail.com> - 2016-09-17 03:06 -0700
                Re: Creating a maze game JUERGEN <epldfpga@aol.com> - 2016-09-17 04:30 -0700
                  Re: Creating a maze game lawrencedo99@gmail.com - 2016-09-17 15:09 -0700
                    Re: Creating a maze game "HAA" <someone@microsoft.com> - 2016-09-18 14:19 +1000
                      Re: Creating a maze game lawrencedo99@gmail.com - 2016-09-18 00:18 -0700
                    Re: Creating a maze game JUERGEN <epldfpga@aol.com> - 2016-09-18 00:31 -0700
              Re: Creating a maze game JUERGEN <epldfpga@aol.com> - 2016-09-17 04:40 -0700
                Re: Creating a maze game JUERGEN <epldfpga@aol.com> - 2016-09-18 00:41 -0700
    Re: Creating a maze game Paul Rubin <no.email@nospam.invalid> - 2016-09-14 21:56 -0700
      Re: Creating a maze game lawrencedo99@gmail.com - 2016-09-14 22:15 -0700
        Re: Creating a maze game Melzzzzz <Melzzzzz@zzzzz.com> - 2016-09-15 05:22 +0000
        Re: Creating a maze game Paul Rubin <no.email@nospam.invalid> - 2016-09-14 22:30 -0700
          Re: Creating a maze game lawrencedo99@gmail.com - 2016-09-14 22:38 -0700
            Re: Creating a maze game Cecil Bayona <cbayona@cbayona.com> - 2016-09-15 00:43 -0500
            Re: Creating a maze game Paul Rubin <no.email@nospam.invalid> - 2016-09-14 22:59 -0700
              Re: Creating a maze game Melzzzzz <Melzzzzz@zzzzz.com> - 2016-09-15 06:06 +0000
    Re: Creating a maze game Rod Pemberton <NoHaveNotOne@zxdehrnyya.cam> - 2016-09-15 01:47 -0400
    Re: Creating a maze game anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-09-15 07:34 +0000
    Re: Creating a maze game Andreas Wagner <andreas.wagner@lowfatcomputing.org> - 2016-09-15 01:04 -0700
      Re: Creating a maze game albert@cherry.spenarnc.xs4all.nl (Albert van der Horst) - 2016-09-15 10:18 +0200
        Re: Creating a maze game Rod Pemberton <NoHaveNotOne@zxdehrnyya.cam> - 2016-09-15 17:48 -0400
      Re: Creating a maze game JUERGEN <epldfpga@aol.com> - 2016-09-16 10:50 -0700
    Re: Creating a maze game albert@cherry.spenarnc.xs4all.nl (Albert van der Horst) - 2016-09-15 10:27 +0200
    Re: Creating a maze game Mark Wills <markwills1970@gmail.com> - 2016-09-15 01:57 -0700
    Re: Creating a maze game Pablo Hugo Reda <pabloreda@gmail.com> - 2016-09-15 05:35 -0700
    Re: Creating a maze game Steve Graham <solitary.wanderer52@gmail.com> - 2016-09-15 10:22 -0700
    Re: Creating a maze game Julian Fondren <ayrnieu@gmail.com> - 2016-09-15 11:52 -0700
      Re: Creating a maze game hughaguilar96@gmail.com - 2016-09-15 20:24 -0700
        Re: Creating a maze game Julian Fondren <julian.fondren@gmail.com> - 2016-09-15 21:00 -0700
          Re: Creating a maze game hughaguilar96@gmail.com - 2016-09-16 20:16 -0700
      Re: Creating a maze game Julian Fondren <julian.fondren@gmail.com> - 2016-09-19 07:01 -0700
        Re: Creating a maze game hughaguilar96@gmail.com - 2016-09-20 15:15 -0700
        Re: Creating a maze game JUERGEN <epldfpga@aol.com> - 2016-09-21 02:05 -0700
          Re: Creating a maze game Julian Fondren <julian.fondren@gmail.com> - 2016-09-21 02:36 -0700
            Re: Creating a maze game Julian Fondren <julian.fondren@gmail.com> - 2016-09-21 07:34 -0700
              Re: Creating a maze game anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-09-21 14:55 +0000
                Re: Creating a maze game Julian Fondren <julian.fondren@gmail.com> - 2016-09-22 10:58 -0700
              Re: Creating a maze game Doug Hoffman <glidedog@gmail.com> - 2016-09-22 06:42 -0400
    Re: Creating a maze game JUERGEN <epldfpga@aol.com> - 2016-09-16 10:39 -0700
      Re: Creating a maze game hughaguilar96@gmail.com - 2016-09-16 19:44 -0700
    Creating a maze game Mark Wills <markwills1970@gmail.com> - 2016-09-17 00:16 -0700
      Re: Creating a maze game JUERGEN <epldfpga@aol.com> - 2016-09-17 02:21 -0700

Page 3 of 3 — ← Prev page 1 2 [3]


#51151

FromJulian Fondren <julian.fondren@gmail.com>
Date2016-09-21 07:34 -0700
Message-ID<04b6f830-3344-4b21-bd10-712b6e2e82c1@googlegroups.com>
In reply to#51146
On Wednesday, September 21, 2016 at 4:38:18 AM UTC-5, Julian Fondren wrote:
> On Wednesday, September 21, 2016 at 4:05:24 AM UTC-5, JUERGEN wrote:
> 
> >           ^
> > any comments?
> 
> It's incomplete.  That's just the 'interesting' code, which defines
> a little maze with a few events.  I can show the rest, for a runnable 
> example, in about five hours.  It works on VFX after you load 
> Anton's objects.fs
> 
> 
> -- Julian

Here you go:

  64 constant maze-width
  maze-width dup * constant /maze
  /maze buffer: mazeout
  
  : third ( a b c -- a b c a )  dup 2over drop nip ;
  : perform ( a -- )  @ dup if execute else drop then ;
  
  variable new-area
  : save-cursor ( -- )  .\" \e[s" ;
  : restore-cursor ( -- )  .\" \e[u" ;
  : type-top ( c-addr u n-top-height -- )
    save-cursor .\" \e[1;1H\e[1;" 1+ dup 0 .r ." r" -rot type
    new-area @ if save-cursor then
    .\" \e[" 0 .r ." r" restore-cursor
    new-area @ if new-area off  cr then ;
  : #lines ( c-addr u -- n )  0 -rot bounds ?do i c@ 10 = + loop negate ;
  
  \ c->n: map a..z,A..Z to index in that list
  \ f: c is actually one of these
  : event-char ( c -- n -1 | c 0 )
    dup 'a' 'z' 1+ within if 'a' - true exit then
    dup 'A' 'Z' 1+ within if 'A' - 26 + true exit then
    false ;
  
  : here-trailing ( n-limit -- )
    0 ?do
      here 1- c@ bl <> if unloop exit then
      -1 allot
    loop ;
  : here-trailing\n ( n-limit -- )
    0 ?do
      here 1- c@ 10 <> if unloop exit then
      -1 allot
    loop ;
  
  : draw[ ( -- )  postpone HERE postpone >R ; immediate
  : drawn ( -- c-addr u )
    postpone R@ postpone HERE postpone OVER postpone - ; immediate
  : ]draw ( -- )
    postpone DRAWN postpone -TRAILING postpone 2DUP postpone #LINES postpone TYPE-TOP
    postpone R> postpone HERE postpone - postpone ALLOT ; immediate
  
  object class
    char% maze-width * field maze-prepadding
    char% /maze * field maze
    char% maze-width * field maze-postpadding
    cell% field player
    cell% 26 2* * field events
    cell% field fire-events?
    selector draw
    selector step
    selector m-emit
  
    m: ( -- )
      this player off
      this maze-prepadding maze-width erase
      this maze /maze bl fill
      this maze-postpadding maze-width erase
      this events 62 cells erase
      this fire-events? off
      ;m overrides construct
    m: ( c -- )
      dup 'A' 'Z' within if drop bl then c, ;m overrides m-emit
    m: ( -- )
      draw[
        this maze mazeout /maze move
        [char] @ mazeout this player @ + c!
        mazeout /maze bounds do
          i maze-width bounds do i c@ this m-emit loop
          maze-width here-trailing 10 c,
        maze-width +loop
        maze-width here-trailing\n
      ]draw  this fire-events? @ if 
        this fire-events? off
        this maze this player @ + c@ event-char if
          this swap cells this events + perform
        else drop then
      then ;m overrides draw
    m: ( delta c -- )
      over this player @ + this maze + c@ = if
        2* this player +!
      else drop then  this fire-events? on ;m overrides step
  end-class area
  
  ( obj -- )
  : north  maze-width negate [char] | rot step ;
  : east   3                 [char] - rot step ;
  : south  maze-width        [char] | rot step ;
  : west   -3                [char] - rot step ;
  
  variable maze-at
  : maze: ( class "name" -- obj )
    dict-new dup constant dup maze maze-at ! ;
  : maze; ( obj -- )
    dup maze /maze bounds do
      i c@ [char] @ = if
        bl i c!
        i over maze - swap player !
        unloop exit
      then
    loop drop ( maze without player );
  
  : | ( "line" -- )
    0 parse -trailing maze-at @ swap move
    maze-width maze-at +! ;
  
  : event! ( obj xt c -- obj )
    event-char 0= abort" not an event char"
    cells third events + ! ;
  
  area maze: market
    | [s] - [ ] - [s]         {X} - { }
    |        |                       |
    | [@] - [ ] - [ ] - { } - {I} - { }
    variable has-evidence
  
    :noname ( obj -- )
      player @ 1 = if
        cr ." This shop mostly sells T-shirts emblazoned with Hillary's giant face."
      else
        cr ." This shop mostly sells T-shirts emblazoned with anti-Trump memes."
      then ; 's' event!
    :noname ( obj -- ) drop
      has-evidence @ if
        cr ." You feel a sudden urge to commit suicide -- immediately carried out by the assassin behind you."
        cr ." You're dead!  You probably should have done more to support Hillary!" abort
      else cr ." You shiver involuntarily." then ; 'X' event!
    :noname ( obj -- ) drop
      cr ." You see a sealed letter along the path, and pick it up."
      has-evidence on
      cr ." There is a note written on the back in a thick, unsteady marker:"
      cr .\"   \"Enclosed, evidence of Hillary's many crimes.  Do not credit me!  /Harambe\""
      cr
      cr ." How strange." ; 'I' event!
  maze;
  
  : play ( obj -- )
    begin
      dup draw
      key case
        [char] w of dup north endof
        [char] a of dup west endof
        [char] s of dup south endof
        [char] d of dup east endof
        [char] q of drop exit endof
      endcase
    again ;
  
  page  new-area on  market play

Requires a modern unix terminal.
Works under gforth 0.7.2 when BUFFER: is defined
Works under VFX with objects.

I build 'vfxo' and then include maze.fs into that:

  vfxo:
  	vfx include %lib%/x86/Ndp387.fth include %lib%/objects/struct.fs include %lib%/objects/objects.fs save $@ bye

You can get objects.fs from http://theforth.net/package/objects

Of the code, I'll just say that it has a few obvious bugs, and that
DRAW and TYPE-TOP are both obviously in the category of nails that are
sticking out from the wall.  TYPE-TOP can probably be improved pretty
drastically by a move to a single scrolling region, instead of the
current two.  I wrote it as if a scrolling region were necessary for
output in that part of the terminal, but come to think of it, that's
not the case.

'man console_codes' can explain those escape strings.

The mess of DRAW allows you to
1. keep state in an internal representation of the maze
2. easily 'look around' a spot in the maze - f.e., a position minus
maze-width is always the position immediately to the top.
3. modify a for-display version of the maze, f.e. to hide traps
4. additionally add extra output when the maze is actually displayed.
For example, if the { } rooms are supposed to be in a jungle, then a
JUNGLE subclass of AREA could modify M-EMIT to output ansi color codes
around those characters to make them green, without distorting the
version of the maze actually used for logic.

If you went on to output HTML or to use an OpenGL display, you could
keep features #1-#3, and just display things very differently.


-- Julian

[toc] | [prev] | [next] | [standalone]


#51153

Fromanton@mips.complang.tuwien.ac.at (Anton Ertl)
Date2016-09-21 14:55 +0000
Message-ID<2016Sep21.165551@mips.complang.tuwien.ac.at>
In reply to#51151
Julian Fondren <julian.fondren@gmail.com> writes:
[source code for maze game]

Cool, thanks.  That would be a nice program for theforth.net,
especially because it would exercise the "dependences" feature, maybe
as the first program.

- anton
-- 
M. Anton Ertl  http://www.complang.tuwien.ac.at/anton/home.html
comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html
     New standard: http://www.forth200x.org/forth200x.html
   EuroForth 2016: http://www.euroforth.org/ef16/

[toc] | [prev] | [next] | [standalone]


#51174

FromJulian Fondren <julian.fondren@gmail.com>
Date2016-09-22 10:58 -0700
Message-ID<eb85173c-3ed1-4773-9fac-1a06d88d6b00@googlegroups.com>
In reply to#51153
On Wednesday, September 21, 2016 at 10:02:42 AM UTC-5, Anton Ertl wrote:
> Julian Fondren <julian.fondren@gmail.com> writes:
> [source code for maze game]
> 
> Cool, thanks.  That would be a nice program for theforth.net,
> especially because it would exercise the "dependences" feature, maybe
> as the first program.

Alright.  I'll make more of a game out of and then publish it.

In the meantime, here it is running on a Pocket CHIP:

http://i.imgur.com/6Kiayec.jpg

[toc] | [prev] | [next] | [standalone]


#51169

FromDoug Hoffman <glidedog@gmail.com>
Date2016-09-22 06:42 -0400
Message-ID<57e3b597$0$341$14726298@news.sunsite.dk>
In reply to#51151
On 9/21/16 10:34 AM, Julian Fondren wrote:
>   object class
>     char% maze-width * field maze-prepadding
>     char% /maze * field maze
>     char% maze-width * field maze-postpadding
>     cell% field player
>     cell% 26 2* * field events
>     cell% field fire-events?
>     selector draw
>     selector step
>     selector m-emit
>
>     m: ( -- )
>       this player off
>       this maze-prepadding maze-width erase
>       this maze /maze bl fill
>       this maze-postpadding maze-width erase
>       this events 62 cells erase
>       this fire-events? off
>       ;m overrides construct
>     m: ( c -- )
>       dup 'A' 'Z' within if drop bl then c, ;m overrides m-emit
>     m: ( -- )
>       draw[
>         this maze mazeout /maze move
>         [char] @ mazeout this player @ + c!
>         mazeout /maze bounds do
>           i maze-width bounds do i c@ this m-emit loop
>           maze-width here-trailing 10 c,
>         maze-width +loop
>         maze-width here-trailing\n
>       ]draw  this fire-events? @ if
>         this fire-events? off
>         this maze this player @ + c@ event-char if
>           this swap cells this events + perform
>         else drop then
>       then ;m overrides draw
>     m: ( delta c -- )
>       over this player @ + this maze + c@ = if
>         2* this player +!
>       else drop then  this fire-events? on ;m overrides step
>   end-class area

\ using microFMS (see FLAG for download)
   create area <super object
     maze-width bytes maze-prepadding
     /maze bytes maze
     maze-width bytes maze-postpadding
     cell bytes player
     cell 26 2* * bytes events
     cell bytes fire-events?

    :m init:
       player off
       maze-prepadding maze-width erase
       maze /maze bl fill
       maze-postpadding maze-width erase
       events 62 cells erase
       fire-events? off ;m
    :m m-emit ( c -- )
       dup 'A' 'Z' within if drop bl then c, ;m
    :m draw draw[
         maze mazeout /maze move
         [char] @ mazeout player @ + c!
         mazeout /maze bounds do
           i maze-width bounds do i c@ self m-emit loop
           maze-width here-trailing 10 c,
         maze-width +loop
         maze-width here-trailing\n
             ]draw  fire-events? @ if
         fire-events? off
         maze player @ + c@ event-char if
           self swap cells events + perform
         else drop then
       then ;m
    :m step ( delta c -- )
       over player @ + maze + c@ = if
         2* player +!
       else drop then fire-events? on ;m
    :m maze ( -- a ) maze ;m
    :m player ( -- a ) player ;m
    :m events ( -- a ) events ;m
   ;class

Replace dict-new with >dict and everything else is the same.

pros:
   - much smaller obect extension
   - eliminates many this's
   - eliminates selector and overrides declarations

cons:
   - had to define 3 instance variable access messages
     (may not be a con because instance variables are
       thought by many to best keep protected)

Essentially the same for full blown FMS.

-Doug

[toc] | [prev] | [next] | [standalone]


#51043

FromJUERGEN <epldfpga@aol.com>
Date2016-09-16 10:39 -0700
Message-ID<02d4788e-d428-4b3d-9000-8b178092317d@googlegroups.com>
In reply to#50982
On Thursday, September 15, 2016 at 4:30:47 AM UTC+1, Steve Graham wrote:
> I would like to create a game for some grandsons:  Something that would include typical maze elements (walls, barriers, traps, jumping platforms, etc) and would allow them to enter in "code" to create or modify some of the elements.
> 
> It would be hosted on a Windows 7+ platform (platform-agnostic would be better for me) and would be coded in Forth, a lisp-family language (CL, Scheme, Racket, Arc, Logo, etc), Unicon and/or JavaScript.  I have been learning CL and Scheme, know a bit of Arc and Logo and a bit more of Forth, Unicon and JavaScript.
> 
> While I have been a medical information systems programmer for most of my career, it has been focused on CRUD (create/retrieve/update/delete) applications and interfacing (HL7 and proprietary).  I have virtually no experience with GUI and audio applications.
> 
> Here are some questions that have occurred to me:
> 1.  Which languages would be best?
> 2.  Which toolkits would help?  OpenGL?
> 3.  Can this be done on a browser?
> 4.  How does one control scrolling in different directions?  Do you create the screen in memory and then instruct the system to scroll in the direction of the newly created portion?
> 5.  Could you interface with one of the available free game engines?
> 
> Obviously this would not have to be world-class.  Just something a 10 and 12 year old might like and perhaps from which they could learn how to do some elementary coding.
> 
> Regarding Forth, I would like the ability to put in code during the play of the game -- like eval() in other languages -- and assume that it is possible in Forth.
> 
> I would appreciate your input.
> 
> 
> Thanks, Steve

Steve, I will just give a Forth Introductory Lesson to 12 to 16 year olds next week, and Forth is the answer. Why?
Most natural language, start with a few atoms and then move to higher complexity. 
I nearly got my Presentation Kit ready. 3 Pages to do a small application in Forth. Try to do it in any other language ...
And we will find out if the interest is there - otherwise it might be the wrong target audience ...
The Maze comes into it, as they will be working on a Miromouse Contest Design.

[toc] | [prev] | [next] | [standalone]


#51052

Fromhughaguilar96@gmail.com
Date2016-09-16 19:44 -0700
Message-ID<331d311b-4a42-4da9-baa7-cafafe5c4941@googlegroups.com>
In reply to#51043
On Friday, September 16, 2016 at 10:39:26 AM UTC-7, JUERGEN wrote:
> On Thursday, September 15, 2016 at 4:30:47 AM UTC+1, Steve Graham wrote:
> > I would like to create a game for some grandsons:  Something that would include typical maze elements (walls, barriers, traps, jumping platforms, etc) and would allow them to enter in "code" to create or modify some of the elements.
> > 
> > It would be hosted on a Windows 7+ platform (platform-agnostic would be better for me) and would be coded in Forth, a lisp-family language (CL, Scheme, Racket, Arc, Logo, etc), Unicon and/or JavaScript.  I have been learning CL and Scheme, know a bit of Arc and Logo and a bit more of Forth, Unicon and JavaScript.
> > 
> > While I have been a medical information systems programmer for most of my career, it has been focused on CRUD (create/retrieve/update/delete) applications and interfacing (HL7 and proprietary).  I have virtually no experience with GUI and audio applications.
> > 
> > Here are some questions that have occurred to me:
> > 1.  Which languages would be best?
> > 2.  Which toolkits would help?  OpenGL?
> > 3.  Can this be done on a browser?
> > 4.  How does one control scrolling in different directions?  Do you create the screen in memory and then instruct the system to scroll in the direction of the newly created portion?
> > 5.  Could you interface with one of the available free game engines?
> > 
> > Obviously this would not have to be world-class.  Just something a 10 and 12 year old might like and perhaps from which they could learn how to do some elementary coding.
> > 
> > Regarding Forth, I would like the ability to put in code during the play of the game -- like eval() in other languages -- and assume that it is possible in Forth.
> > 
> > I would appreciate your input.
> > 
> > 
> > Thanks, Steve
> 
> Steve, I will just give a Forth Introductory Lesson to 12 to 16 year olds next week, and Forth is the answer. Why?
> Most natural language, start with a few atoms and then move to higher complexity. 
> I nearly got my Presentation Kit ready. 3 Pages to do a small application in Forth. Try to do it in any other language ...
> And we will find out if the interest is there - otherwise it might be the wrong target audience ...
> The Maze comes into it, as they will be working on a Miromouse Contest Design.

I agree with Juergen on this one. I originally got interested in Forth (at age 18) because it was understandable. With only a few exceptions (such as IF and S" etc.), each word does one thing, without regard to context --- by comparison, in C etc., words such as * mean different things depending upon context. In Forth the smallest understandable element is the word, and there are a finite number of words --- by comparison, in C etc. the smallest understandable element is the statement, and there are an infinite number of statements. Kids in the 10-12 age range should appreciate this as much as I did at 18 --- actually adults should appreciate it too --- anybody who thinks logically should appreciate this.

I'm not clear on what kind of maze the OP was thinking of. I remember reading an article back in the 1980s (I think this was in Compute! magazine) about a guy who wrote a program in TRS-BASIC to generate a maze. This was one of those mazes that kids puzzle out in which you start at an entrance and find a path to the "treasure" at the center, and there is only one path. The guy's program would generate these mazes randomly. He did a recursive search to ensure that there was only one valid path. He noticed when solving it in his head that he would put his finger on the screen at the forks in the path so he could backtrack if he went down the wrong fork, so his screen had a lot of fingerprints on it. Then he wrote a recursive search that effectively did the same thing.

Later on, the guy upgraded his program so that it would bend the mazes. They started out as a rectangle, but his program would bend the whole thing into a circle. It could also bend it into a spiral, in which case it was possible to open up some doors in what had previously been an outer wall but which was now the wall between the edges of the spiral. He also ported the whole thing over to Z80 assembly-language because TRS-BASIC was too slow at generating the twisted maze from the original rectangular maze --- also, the recursive search takes some time in a large maze --- also, line-number BASIC lacks functions, so Z80 assembly-language actually simplified the program.

I think that 10-12 year olds would enjoy a program such as this. They could generate mazes and then print them out on paper so they could hand them out to their friends to solve with a pencil. Whether they could understand a program such as this, is another matter. I think they could understand the concept of a recursive search, because they have already done this mentally when solving the mazes in the puzzle books with a pencil. I doubt that they could understand the math involved in bending the rectangle into a circle --- I myself would have difficulty in understanding the math involved in bending the rectangle into a spiral (I could figure it out though).

It is educational for kids to generate puzzles --- solving puzzles is also okay, but not as educational --- playing games is not educational at all.

BTW: I would write the program to generate PostScript code, because the goal is to print the mazes out to be solved with pencil-and-paper --- I wouldn't waste time generating a screen image --- besides that, I already know PostScript (at a novice level), but I haven't learned SVG yet.

[toc] | [prev] | [next] | [standalone]


#51063

FromMark Wills <markwills1970@gmail.com>
Date2016-09-17 00:16 -0700
Message-ID<c07ff623-2384-4a68-bf44-49d7504d5ff2@googlegroups.com>
In reply to#50982
It's not a maze game, but here's an example of a simple arcade game written in Forth in 2015 for the 1981 Texas Instruments TI-99/4A.

It's a port of Jetpac, initially written for the ZX Spectrum.

https://youtu.be/HZZ2pu5BrF4

[toc] | [prev] | [next] | [standalone]


#51070

FromJUERGEN <epldfpga@aol.com>
Date2016-09-17 02:21 -0700
Message-ID<53e096f4-e606-4c19-9df8-6aecfc84fbc8@googlegroups.com>
In reply to#51063
On Saturday, September 17, 2016 at 8:16:31 AM UTC+1, Mark Wills wrote:
> It's not a maze game, but here's an example of a simple arcade game written in Forth in 2015 for the 1981 Texas Instruments TI-99/4A.
> 
> It's a port of Jetpac, initially written for the ZX Spectrum.
> 
> https://youtu.be/HZZ2pu5BrF4

Games: 
how many words and lines does it need to write an ASCII PONG? 
No graphics, just PAGE and CR  -   8 x 8 or 16 x 16 field
- not for speed - just for teaching/learning. 
- A - Z left up down, / - ' right side up and down.  
There can be a second version for speed if people want to show how fast and compact the code for Forth could be...

[toc] | [prev] | [standalone]


Page 3 of 3 — ← Prev page 1 2 [3]

Back to top | Article view | comp.lang.forth


csiph-web