• xtrn/utopia/utopia.js

    From Rob Swindell (on Windows 11)@1:103/705 to Git commit to main/sbbs/master on Tue Jan 20 22:57:08 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/996c10d895fd35996a8874d8
    Added Files:
    xtrn/utopia/utopia.js
    Log Message:
    AI (Gemini) attempt at a clone of the Intellivision game "Utopia" for SBBS

    This version of the script (the AI called v10.1.16) was the result of several prompts/iterations and at a point where the bot really couldn't add any more features or functions (even though it kept suggesting great ones) without removing basic functionality or (re)introducing bugs. It got really frustrating after this point, basically going in circles with a very apologetic but confident programming robot. Still... impressive for a *free* AI chat bot. https://gemini.google.com/share/71b6228f0bf7

    I did js-beautify the code and removed the comment block at the top, but otherwise, it's exactly as Gemini made it. It's a playable game but has some issues I'll be addressing:
    - the cosmetics (e.g. graphic character choices) are pretty basic/ugly
    - it's very hard-coded for an 80x24 terminal (not a huge issue)
    - it only spawns a single fish
    - it saves the user-game data in the current directory instead of the "correct"
    path/filename (data/user/####.*)
    - the saved-game data (json) isn't versioned, so it really has to match the
    game version you run or weird behavior or errors will happen when you load a
    saved game from a different version
    - the game economics aren't really fleshed out
    - some of the (important?) elements of the original (e.g. hospitals) aren't
    included (https://history.blueskyrangers.com/instructions/utopia.html), but
    being single player instead of multi-player I do expect there to be some
    differences (e.g. PT boats being sinkable by pirates and being able to sink
    pirates, I think is a good one)

    There were a lot of good ideas that the AI suggested and even implemented before and after this version of the script and I'll try to merge those in while also addressing my own concerns/issues with the game.
    --- SBBSecho 3.35-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell (on Debian Linux)@1:103/705 to Git commit to main/sbbs/master on Wed Jan 21 03:32:24 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/8665d57b9ebd4a6cdf4dc829
    Modified Files:
    xtrn/utopia/utopia.js
    Log Message:
    Multi-fish patch

    Successfully merged in Gemini's patch for multiple fish

    I also changed some of the characters used to be a little better
    (e.g. $ for merchant, the Pt symbol for Pirate, lowercase alpha for fish)
    --- SBBSecho 3.35-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell (on Debian Linux)@1:103/705 to Git commit to main/sbbs/master on Wed Jan 21 18:16:36 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/11183ff911935e79e5a7edf8
    Modified Files:
    xtrn/utopia/utopia.js
    Log Message:
    Cosmetic and usability improvements

    - flash (blink) the fish and boats when they're caught/sunk for one turn
    - don't redraw the legend for every turn
    - add Ctrl-R key to force a redraw (for testing mainly)
    - add [L]og key to view all past messages
    - turns count up rather than down
    - some code cleanup
    - better error logging
    - no AI-generated code added in this commit
    --- SBBSecho 3.35-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell (on Debian Linux)@1:103/705 to Git commit to main/sbbs/master on Sat Jan 24 05:47:18 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/6a514d1a1c618cecc5c3460b
    Modified Files:
    xtrn/utopia/utopia.js
    Log Message:
    This is a good checkpoint - it's now a fun playable game that's not too easy

    Still messing with the economics and such (I think I'd like to have trawlers chase fish, but then tracking age/damage gets tricky).

    I still want to add mouse, sound, maybe graphics.

    And probably some more items like a more robust food item to buy/build, maybe
    a fort, hospital, etc.

    No docs or anything so if you're not familiar with the original Utopia or this genre of game, it might be really confusing and hard. So only the really
    really curious and experimental should try this right now. Oh, and spews a lot of (info-level) debug output to the terminal server log.
    --- SBBSecho 3.35-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell (on Debian Linux)@1:103/705 to Git commit to main/sbbs/master on Sat Jan 24 19:24:28 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/af39138ac64523a908259f37
    Modified Files:
    xtrn/utopia/utopia.js
    Log Message:
    Trawlers chase fish, PT Boats track damage/age

    Doesn't spew debug log messages now unless passed -debug option

    Don't start game until first land item built

    Save the game file in the correct location (data/user) and other little usability things (e.g. display number of current built items of each type).
    --- SBBSecho 3.35-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell (on Debian Linux)@1:103/705 to Git commit to main/sbbs/master on Sat Jan 24 22:12:06 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/32d243e9f8ba8778cef98958
    Modified Files:
    xtrn/utopia/utopia.js
    Log Message:
    Encapsulate the rules, not the game functions

    I anticipate I'll want to support tracking/iterating and providing multiple sets of rules that the user can choose from and sysops might want to provide their own. And high score lists should be specific to the set rules used to play the game. So the *rules* should have been encapsulated (and were not).

    However, the game functions were encapsulated via the Utopia object and
    we'll never have multiple instances of this Utopia object, so just get rid
    of that (and over 600 required uses of 'this.that' syntax).

    Whew! That's more like it. Yes, the script-global namespace is all polluted with variables and objects now, but this is better suited to my taste.
    --- SBBSecho 3.35-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell (on Debian Linux)@1:103/705 to Git commit to main/sbbs/master on Sun Jan 25 04:18:58 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/4fe495ec6ab9823fe55bebbb
    Modified Files:
    xtrn/utopia/utopia.js
    Log Message:
    Add buildable docks which are required for building boats

    ... and the merchat will now trade with a dock, not "Industry"

    You can extend the dock with a bridge, making a pier

    Can't build diagnoally to the dock/pier though, kind strict. (N,S,E, or W
    of the dock only) - I might make that more liberal to keep one or two boats from keeping one from building (though that does encourage bridge building).

    Other nice user niceties added, like showing the health of individual
    item the cursor is on.
    --- SBBSecho 3.35-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell (on Debian Linux)@1:103/705 to Git commit to main/sbbs/master on Sun Jan 25 15:23:58 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/0958ba1616c91d21bef48233
    Modified Files:
    xtrn/utopia/utopia.js
    Log Message:
    Time was being throttled by the inkey() timeout (of 500ms)

    Holding down <any> key would allow time to move at the (increased) rate,
    that was the clue.
    --- SBBSecho 3.35-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)