Sharpee Progress

As mentioned before, I have been steadily designing and developing a C# 8/.NET Core based IF platform using GenAI (Claude 3.5 as of today).

In the last couple of weeks, this has solidified in many areas. The underlying graph data store is completed and fully tested. It works as designed.

All of the moving parts of a basic IF platform are in place, though now I am in the midst of unit testing and solidifying the parser. Something that is definitely challenging.

Everything compiles and is checked into the GitHub repository.

ChicagoDave/sharpee: Parser-Based Interactive Fiction Platform Built on .NET Core and C#, using LLMs to help with rabbit holes, coding, and design tasks. (github.com)

I don’t expect anyone to jump in and help, but this would be the time to pitch in if you were inclined.

There is a Cloak of Darkness story within the solution, so there is a target implementation. But getting the Grammar and Parser functioning properly are the primary goal.

4 Likes

It’s impressive how far you’ve come on this. I particularly like seeing the attention to unit testing.

I don’t know if you’re familiar with TADS, but one quality-of-life aspect is its prototype language features. A room in the adv3Lite Cloak of Darkness looks like this:

foyer: Room 'Foyer of the Opera House'
    /* This is the "desc" property.  Double-quoted strings are printed at evaluation time. */
    "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. "

    south = bar
    west = cloakRoom

    /* 
     *   We make the 'north' property point to a method, which means that when
     *   the player attempts to go this way, this method is executed instead; in
     *   this case it just displays an explanation of why the movement is not
     *   permitted.
     */
    north {
        "You've only just arrived, and besides, the weather outside
        seems to be getting worse. "; 
    }
;

This makes scaffolding up a map with items in each location fairly easy.

With Sharpee, it looks like you’re going the procedural route:

Room foyer = (Room)_worldModel.CreateRoom(
    LanguageManager.GetText(CloakOfDarknessKeys.Location_Foyer),
    LanguageManager.GetText(CloakOfDarknessKeys.Description_Foyer))
    .SetPropertyValue("IsDark", false);

I’m asking because I’ve kicked around an idea about making a JS-based parser system that could run in a browser, but I really wanted to keep TADS-style prototyping for ease of game development.

Have you considered adding support for some kind of scripting or data structure language that the game developer can use to scaffold up the map and objects’ initial state? Perhaps you still require they code in C# for implementing procedural responses to input.

(Apologies if you’ve already covered this in a past post.)

1 Like

A couple of points…

This is v.01, so it’s going to look like a mash of existing older platforms. Everything can change.

There is a massive difference in using a regular language like dotnet and C#. I don’t have substantial evidence yet, but I believe we’ve handcuffed our creativity by staying attached to VM-based platforms.

As for the scaffolding, I plan to rewrite most of the WorldModel interface to be fluent, which will be closer to TADS and Inform 6, but still C#.

Also using GenAI has probably overdone some things. Like the example above would not use the LanguageManager since it’s in the story class.

So there’s going to be a few passes (after the parser is fully tested) to clean up things like this.

1 Like