• 2048 Game

    From dxforth@21:1/5 to All on Fri Jun 30 00:34:42 2023
    \ 2048 Game
    \ Sliding squares game translated from XPL0 version.
    \ This version adds score display and winning message.
    \
    \ Assumes ANSI colour terminal and 200x cursor keys
    \ Tested on Gforth for Windows

    Use ESC to quit

    https://pastebin.com/4jJ0eec7

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From goblinrieur@gmail.com@21:1/5 to All on Thu Jun 29 11:56:21 2023
    Le jeudi 29 juin 2023 à 16:34:45 UTC+2, dxforth a écrit :
    \ 2048 Game
    \ Sliding squares game translated from XPL0 version.
    \ This version adds score display and winning message.
    \
    \ Assumes ANSI colour terminal and 200x cursor keys
    \ Tested on Gforth for Windows

    Use ESC to quit

    https://pastebin.com/4jJ0eec7
    you can inspire too from this one https://gitlab.com/goblinrieur/2048
    with colors & score file too

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From dxforth@21:1/5 to gobli...@gmail.com on Fri Jun 30 12:36:05 2023
    On 30/06/2023 4:56 am, gobli...@gmail.com wrote:
    Le jeudi 29 juin 2023 à 16:34:45 UTC+2, dxforth a écrit :
    \ 2048 Game
    \ Sliding squares game translated from XPL0 version.
    \ This version adds score display and winning message.
    \
    \ Assumes ANSI colour terminal and 200x cursor keys
    \ Tested on Gforth for Windows

    Use ESC to quit

    https://pastebin.com/4jJ0eec7
    you can inspire too from this one https://gitlab.com/goblinrieur/2048
    with colors & score file too

    Thanks for the link.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Richard Howe@21:1/5 to dxforth on Wed Jul 5 11:39:14 2023
    On Thursday, 29 June 2023 at 15:34:45 UTC+1, dxforth wrote:
    \ 2048 Game
    \ Sliding squares game translated from XPL0 version.
    \ This version adds score display and winning message.
    \
    \ Assumes ANSI colour terminal and 200x cursor keys
    \ Tested on Gforth for Windows

    Use ESC to quit

    https://pastebin.com/4jJ0eec7
    That's really cool, what license is it released under?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From dxforth@21:1/5 to Richard Howe on Thu Jul 6 09:33:19 2023
    On 6/07/2023 4:39 am, Richard Howe wrote:
    On Thursday, 29 June 2023 at 15:34:45 UTC+1, dxforth wrote:
    \ 2048 Game
    \ Sliding squares game translated from XPL0 version.
    \ This version adds score display and winning message.
    \
    \ Assumes ANSI colour terminal and 200x cursor keys
    \ Tested on Gforth for Windows

    Use ESC to quit

    https://pastebin.com/4jJ0eec7
    That's really cool, what license is it released under?

    Credit for the original XPL0 implementation goes to Loren Blaney who
    posted it on Rosetta Code. My Forth implementation is public domain.

    The random number generator I used was for 16-bits and is noticeably
    deficient at 64-bits. I suggest replacing it with:

    \ Random number generator
    1 cells 2 = [if] $3CBEC79D. [else]
    1 cells 4 = [if] $7FACC0F7A00541BD. [else]
    $96704A6BB5D2C4FB3AA645DF0540268D.
    [then] [then] 2constant MULT

    2variable Seed 1. seed 2!
    : Random ( -- u ) seed 2@ mult d* 1. d+ tuck seed 2! ;
    : Rand ( u -- 0..u-1 ) random um* nip ;

    Ideally the initial seed value should be randomized.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Jali Heinonen@21:1/5 to All on Sun Jul 9 23:59:13 2023
    torstai 29. kesäkuuta 2023 klo 17.34.45 UTC+3 dxforth kirjoitti:
    \ 2048 Game
    \ Sliding squares game translated from XPL0 version.
    \ This version adds score display and winning message.
    \
    \ Assumes ANSI colour terminal and 200x cursor keys
    \ Tested on Gforth for Windows

    Use ESC to quit

    https://pastebin.com/4jJ0eec7

    You got me writing a 2048 game for the 8th. I just got figured out how to do sliding animations. I still need to add movement directions for right, up and down but that can be done easily. Also need to fix text drawing inside the blocks to be centered.

    https://monosnap.com/file/uLRQgfSD2QIx7kKJC0kWyOCTZJxGFb

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From dxforth@21:1/5 to Jali Heinonen on Mon Jul 10 19:49:04 2023
    On 10/07/2023 4:59 pm, Jali Heinonen wrote:
    torstai 29. kesäkuuta 2023 klo 17.34.45 UTC+3 dxforth kirjoitti:
    \ 2048 Game
    \ Sliding squares game translated from XPL0 version.
    \ This version adds score display and winning message.
    \
    \ Assumes ANSI colour terminal and 200x cursor keys
    \ Tested on Gforth for Windows

    Use ESC to quit

    https://pastebin.com/4jJ0eec7

    You got me writing a 2048 game for the 8th. I just got figured out how to do sliding animations. I still need to add movement directions for right, up and down but that can be done easily. Also need to fix text drawing inside the blocks to be centered.

    https://monosnap.com/file/uLRQgfSD2QIx7kKJC0kWyOCTZJxGFb

    The graphics is a nice touch. Needs a mode in which the computer
    plays it. (Or perhaps not :)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Jali Heinonen@21:1/5 to All on Wed Jul 12 09:36:03 2023
    maanantai 10. heinäkuuta 2023 klo 12.49.07 UTC+3 dxforth kirjoitti:
    The graphics is a nice touch. Needs a mode in which the computer
    plays it. (Or perhaps not :)

    I was able to complete my game 2048 project. Thanks goes to Ron Aaron for making programming fun again and having the patience to answer my stupid questions.

    Here is how it looks: https://monosnap.com/file/91Czk5jUVkhqJwm31hr1zRhOxz6ahW

    Source code will be posted to 8th forums.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From dxforth@21:1/5 to Jali Heinonen on Thu Jul 13 11:03:05 2023
    On 13/07/2023 2:36 am, Jali Heinonen wrote:
    maanantai 10. heinäkuuta 2023 klo 12.49.07 UTC+3 dxforth kirjoitti:
    The graphics is a nice touch. Needs a mode in which the computer
    plays it. (Or perhaps not :)

    I was able to complete my game 2048 project. Thanks goes to Ron Aaron for making programming fun again and having the patience to answer my stupid questions.

    Here is how it looks: https://monosnap.com/file/91Czk5jUVkhqJwm31hr1zRhOxz6ahW

    Source code will be posted to 8th forums.

    Good work. I assume the final version will have a running score?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Ron AARON@21:1/5 to Jali Heinonen on Thu Jul 13 16:58:28 2023
    On 12/07/2023 19:36, Jali Heinonen wrote:
    maanantai 10. heinäkuuta 2023 klo 12.49.07 UTC+3 dxforth kirjoitti:
    The graphics is a nice touch. Needs a mode in which the computer
    plays it. (Or perhaps not :)

    I was able to complete my game 2048 project. Thanks goes to Ron Aaron for making programming fun again and having the patience to answer my stupid questions.

    Here is how it looks: https://monosnap.com/file/91Czk5jUVkhqJwm31hr1zRhOxz6ahW

    Source code will be posted to 8th forums.

    Looks really nice. And kind words, as always, appreciated.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)