Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ryepup/space-game
a playground for me to try out different tech in the context of a traditional 4x space game
https://github.com/ryepup/space-game
Last synced: about 1 month ago
JSON representation
a playground for me to try out different tech in the context of a traditional 4x space game
- Host: GitHub
- URL: https://github.com/ryepup/space-game
- Owner: ryepup
- Created: 2009-03-10T23:50:28.000Z (almost 16 years ago)
- Default Branch: master
- Last Pushed: 2009-03-28T14:51:58.000Z (almost 16 years ago)
- Last Synced: 2024-04-08T17:10:43.873Z (9 months ago)
- Language: JavaScript
- Homepage:
- Size: 168 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README
Awesome Lists containing this project
README
-*- mode: org; -*-
#+STARTUP: logdone
#+EMAIL: [email protected]
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
* supplyFirst, 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.| consumption | production | supply | should be | rate |
| 5 | 5 | 10 | around zero | |
| 10 | 5 | 1000 | negative | |
| 10 | 5 | 10 | high | |
| 5 | 10 | 10 | positive | |
| 5 | 10 | 1000 | very 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 ordersThe 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
CLOCK: [2009-03-23 Mon 19:40]--[2009-03-23 Mon 22:04] => 1:24
CLOCK: [2009-03-23 Mon 18:31]--[2009-03-23 Mon 18:39] => 0:08
** get jquery installed, basic ajaxy crap started
CLOCK: [2009-03-21 Sat 14:22]--[2009-03-21 Sat 17:30] => 3:08
** get hunchentoot running
CLOCK: [2009-03-20 Fri 20:10]--[2009-03-20 Fri 20:24] => 0:14
** plan out how the economies should work, get some basic trading functions done.
CLOCK: [2009-03-15 Sun 00:26]--[2009-03-15 Sun 01:23] => 0:57
CLOCK: [2009-03-14 Sat 20:33]--[2009-03-14 Sat 20:46] => 0:13
** get elephant installed for persistence
CLOCK: [2009-03-14 Sat 16:00]--[2009-03-14 Sat 18:45] => 2:45
** create basic models (player, planet, system, game, trade good, trade good price)
CLOCK: [2009-03-14 Sat 19:15]--[2009-03-14 Sat 20:33] => 1:18
** DONE setup github account, initial readme, got local setup ready to start lisping
CLOSED: [2009-03-12 Thu 10:51]