sbepstein / spoons

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Spoons Source

This is the in-development source code for a game called Would You Like To Buy A Spoon? (WYLT-BAS). This project is in active development and I intend to release it on Steam when it is complete. However, I plan to keep the source code open, accessible, and free.

spoons

Overview

WYLT-BAS is a game about the future of work and human creativity in the dawn of the AI age. In the game, the player assumes the role of a sales-person for a fake company, Meta-American, and must take on the job of selling spoons in a door to door virtual world. The inhabitants of the virtual houses are powered by OpenAI's text-davinci-003 model. The houses themselves are generated via Scenario's image generator (trained on a limited model of my own design). The game's architecture is built on Beamable.

Getting Started

This project is in active development, so the following section for Getting Started may fall out of date quickly. This section is for anyone who wants to learn about how Beamable, OpenAI, and ScenarioGG can all be sitched together. Feel free to fork this repository and do whatever you will with it. With that minor disclaimer out of the way, there are some prerequisites.

You will need...

  1. an API key for OpenAI.
  2. an API key for Scenario. (At the time of this writing, the API is in early access, and you will need to request a spot in line to get a key.)
  3. a trained model in Scenario from which to acquire house images.
  4. a Beamable organization and admin sign in credential.

The general structure of the repository has 2 main projects, the Unity game, and a standalone Microservice. Traditionally in Beamable, Microservices are bound to the Unity game's .NET development environment. However, there is a new experimental feature that allows Microservices to be developed freely outside of Unity. This documentation explains the basics, but it is still in heavy development by the Beamable team.

/
    /Spoons # this is the Microservice code
        /services
            /Spoons # this is where the server code is
            /SpoonsCommon # this is where shared code between Unity and the server live
    /SpoonsUnity # this is the Unity game folder

You'll need to use the Beamable credentials to sign into the Beamable plugin in Unity once you've forked the repo.

Then, you'll need to enter the OpenAI API key and the Scenario API key into Beamable realm config. Realm config is controlled in the Beamable portal in the Operate/Config section.

  • You need a namespace called game
    • put the OpenAI key under the game namespace in a property called openapi
    • put the Scenario key under the game namespace in a property called scenariogg You can go to the Config class to see how the values are read from realm config.

Finally, (and this is likely to change quickly), you need to change the modelId in the ScenarioGG (Scenario used to be called ScenarioGG) class to point to a trained model available in your Scenario account.

Once all of these steps have been taken, you are ready to start running the program!

  1. Start the standalone Microservice!
  2. Run the Assets/Spoons/Scenes/GameScene.unity in the Unity project.

Credits

The CRT effect used in the game is available as a standalone effect on Github, and will be available on the Unity Asset Store after it finishes going through review.

About


Languages

Language:C# 92.6%Language:ShaderLab 4.8%Language:GLSL 1.1%Language:Objective-C 0.7%Language:HLSL 0.7%Language:Objective-C++ 0.1%Language:Dockerfile 0.0%