Giter Club home page Giter Club logo

space-game's Introduction

-*- mode: org; -*-

This is a playground for me to try different tech.

Basic approach: tons of javascript speaking JSON to a server. Server only speaks JSON, and HTML pages are few. (screw links)

UI

tabs

Dashboard

cargo

money over time

Systems

travel to other systems

travel time

for nearby systems

news
markets
travel time

Planets (n)

buy/sell cargo

news

Ships (n)

buy/sell ships

buy/sell equipment for a ship

pending orders

status bar on top

money

time (turn #)

design choices

planet economies/markets

Each planet produces and consumes goods at a certain rate, and has a supply.

Each turn affects the supplies at each planet.

market price is determined by 3 variables:

  • consumption rate
  • production rate
  • supply

First, we calculate the usage rate as production - consumption From there, we have two formulas:

  • if the usage is 0, price = 10 * (production / supply)
  • else price = 10 * (usage / supply)

This is probably still flawed.

consumptionproductionsupplyshould berate
5510around zero
1051000negative
10510high
51010positive
5101000very negative

Every turn there is a random chance of the rates changing, too keep a dynamic environment.

long-lived browser window

server speaks mostly JSON

playable by a bot

order resolution

Orders are issued by players, then processed by the server. There are 2 types of orders:

  • trade orders
  • movement orders

The orders are gathered from all players, sorted by type (trade or movement), then executed randomly. It is possible for an order to fail, say if two players tried to buy the same good and there wasn’t enough for both. In this case, the first randomly selected order is followed, and the rest ignored.

After trade orders are completed, movement orders are executed.

If any of a player’s trade orders fail, then they can perform other actions.

slow evolution of game and world

tech to try out

JQuery

canvas

Hunchentoot

Elephant

adw-charting

vecto

dynamic animated gifs

cl-unification

work log / todo

UI for buying/selling

use jquery UI slider bar

find ways to represent orders in json

{order:”orderName” options:{opts}}

break up htmlfun into a separate file

figure out jquery goodness to add orders to the pending orders tab

add a global namespace for custom code, call functions on there to add orders.

  • add to appropriate list on orders tab
  • update count in tab title

update README, get basic orders

get jquery installed, basic ajaxy crap started

get hunchentoot running

plan out how the economies should work, get some basic trading functions done.

get elephant installed for persistence

create basic models (player, planet, system, game, trade good, trade good price)

setup github account, initial readme, got local setup ready to start lisping

space-game's People

Contributors

ryepup avatar

Stargazers

 avatar  avatar

Watchers

 avatar

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.