Git Product home page Git Product logo

tradecraft's People

Contributors

infinitiesloop avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

tradecraft's Issues

VT100 style client-side terminal

This should be fun. The game is text based but I ultimately want it to be a browser game. If it's ever mobile, it'd just be a dumb client to the API.

So I'm going to need a great way of rendering colorized text to the browser. It will need to support extended ascii characters, but unicode should cover that, I think. It may need some light VT100 control command support too, but I'm not sure about that yet (for example, the ability to clear the screen buffer, move the cursor to a specific location, etc). Just getting colorized extended ascii characters would be a huge start.

Graph persistence

The GameState utilizes a map of game object by their ID, and a labeled directed graph for storing labeled associated between those game objects. This will be the basis for the state of the game in general. For now it's strictly in memory, but we'll need a way to persist it to disk, so I need to come up with a way to serialize it.

I am open to any suggestions, but as I don't expect the game state to get totally huge, I'm thinking JSON for simplicity and to make debugging easier, at least for now.

Add logging

Modules should use slf, main should use log4j 2

Make 'sbt run' work, or provide a run script

If you run sbt package right now, each module gets its jar dropped into its target directory. But then there's no easy way to run the server from the command line, because the class path has to include all of those things. Same reason sbt run doesn't work. It works when running from IntelliJ though, I guess it includes everything on the class path for you.

This is related to how mod loading will work -- currently mods are loaded by just finding all instances of Mod that are on the class path, so mods are 'enabled' by adding the mod's directory to the class path, disabled by not including it. I suppose that's good enough for now, but might want to make that more dynamic and not require utilizing the class path in the future. Not sure!

Separate build sbt

Right now there is one build sbt for all the modules. Would rather each have its own. Not super fluent with sbt so have put it off.

Create a form system

We need a form system that makes it easy for a controller to prompt for multiple questions and get multiple answers, then all at once do something with the result.

But more importantly, that form should be extendable by other mods, so that mods can do things that hook into the form and add stuff to it. For example, the 'ship' mod could extend the player spawning form in order to ask the user to name their starter ship, and to participate in the spawning process to generate the ship. Ideally the view provided by the controller can have a way of defining the form, or even multiple forms.

Integrate a view engine

Game objects and actions on them are going to be dealt with via a simple MVC pattern. For the 'V' part I plan to integrate a simple view/templating engine of some kind. I haven't evaluated any yet. It should be/do/have:

  1. Be easy to integrate without odd dependencies, especially not any HTTP or Web stuff. It should be a pure view engine.
  2. It does not need to support streaming input or output. Might be better if didn't for simplicity. Just render a view to a string please.
  3. The game is text based, so a templating engine that looks and feels good to use alongside ascii would be best.
  4. The ability to reference other views, so the game and mods can provide reusable snippets

Not sure what else. Obviously the ability to swap what view engine is being used, or to have multiple available, would be good.

Mods should provide ftl templates

There's a lightweight mod system in place. I'd like for defined mods to have their ftl templates automatically registered with the template engine. In server.scala we have a hard coded list. Just need to figure out how to enumerate all the resources for each mod, and register them by their relative paths. Will need to also add some kind of method for mods to register templates manually so that they don't have to come from resources if they dont want to (and when mod loading is async it means they could do things like download templates from somewhere else).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.