I just got to a point in my 3rd iteration where I felt the need to think through some of the structures and designs. I could just repair or change some of the current code, but I also realized this is another way ChatGPT-4 can be extremely helpful. You can refactor whole application architectures and code in a fraction of the time it would normally take.
Now that I mostly know where I want this design to land, I’ve had a conversation with ChatGPT-4 about alternate data structures (yes @jbg I was paying attention) and a few other things. Then I created a brand new empty Visual Studio solution using the newer thoughts.
Solution - refly (older name I came up with the platform identity)
Console app (refly)
Graph Data Structure with non-IF interfaces and queries - (class library) (izyuk)
Conversation Service (class library)
Event Service using Observer pattern (class library)
Game Service manages turn loop (class library)
Grammar Service manages acceptable verb-based sentence structures (class library)
Parser Service tokenizes user input, implements Grammar and WorldModel services to validate input and returns a delegate to execute the action (class library)
World Model Service implements izyuk and provides the IF interfaces to the graph (class library)
Text Service is implemented by the Standard Library and game code to accept all input with context and compiles it based on author-based rules (class library)
All of this will be seamlessly tied together with a DI container so the author can write code and not worry about calling services.
I may add an Inventory Service and a Puzzle Service but those are still in R&D mode.
Yeah “service” in this context is just a way to separate concerns and leverage dependency injection to manage everything. I assume every service is a singleton. It’ll also help build robust unit tests.
I’m still pondering the puzzle service, but I think it’s likely a way to track goals and elements of goals.
When an author thinks, “I want the PC to visit these 3 locations, locate these 4 objects, use the objects in these 5 ways,” the puzzle service could make that easier.
This architecture also provides a pattern for future extensions.
Hi, I’m really interested in any project that takes a fresh look at IF engine design.
But in case I missed some context from your previous posts, is ChatGPT an integral part of your methodology for some reason?