browser-rts.git
2 years agoadd chat commands main
xangelo [Tue, 7 Jun 2022 04:09:06 +0000 (00:09 -0400)]
add chat commands

- /online lists all online players
- /give [username] [amount] [resource] will modify the CITY object
  incrementing [resource] by [amount] for [username]. (admin)
- /assume [username] returns a link to login as the user (admin)

2 years agotrack online users without async calls
xangelo [Tue, 7 Jun 2022 04:08:46 +0000 (00:08 -0400)]
track online users without async calls

2 years agoRetrieve a socket by their token/account_id
xangelo [Tue, 7 Jun 2022 04:07:52 +0000 (00:07 -0400)]
Retrieve a socket by their token/account_id

2 years agoshow unread mail count in topbar
xangelo [Tue, 7 Jun 2022 03:11:24 +0000 (23:11 -0400)]
show unread mail count in topbar

The system tracks your unread mail and displays it to you on the menu
bar. Reading your unread mail will decrease this count to 0. At 0, the
badge next to the mail link disappears.

2 years agoMerge branch 'queue-sizes'
xangelo [Mon, 6 Jun 2022 20:31:01 +0000 (16:31 -0400)]
Merge branch 'queue-sizes'

2 years agoallow cancelling of training queues
xangelo [Mon, 6 Jun 2022 20:29:08 +0000 (16:29 -0400)]
allow cancelling of training queues

When cancelling a training queue you end up with a minimum of 20% loss
on resources (credits/food/alloy/energy), 0% loss of people. The 20%
loss is based on the percentage completion.. after 20% completion, you
get the inverse of resources back.

IE: 40% completion means you get 60% of your resources back.
IE: 99% completion means you get 1% of your resources back

2 years agoability to cancel construction and have a portion of the funds returned
xangelo [Mon, 6 Jun 2022 17:40:49 +0000 (13:40 -0400)]
ability to cancel construction and have a portion of the funds returned

2 years agodisplay the total number of queues availabe to the user
xangelo [Fri, 3 Jun 2022 19:40:37 +0000 (15:40 -0400)]
display the total number of queues availabe to the user

2 years agodisplay error when cant build something
xangelo [Thu, 2 Jun 2022 17:52:46 +0000 (13:52 -0400)]
display error when cant build something

2 years agodisplay error when cant build something
xangelo [Thu, 2 Jun 2022 17:52:46 +0000 (13:52 -0400)]
display error when cant build something

2 years agoadd auto-fading error notifications to the UI
xangelo [Thu, 2 Jun 2022 17:51:37 +0000 (13:51 -0400)]
add auto-fading error notifications to the UI

Any thrown errors get reported back to the UI and can be hoisted to the
notifications section. The `autofade` class can be applied to allow the
message to disappear on its own.

2 years agolimit construction/training queues to 2
xangelo [Thu, 2 Jun 2022 13:53:20 +0000 (09:53 -0400)]
limit construction/training queues to 2

By default a colony ship can only construct/train two things at a time.
This can be increased later via a skill tree.

2 years agobugfix: don't crash on invalid session
xangelo [Fri, 27 May 2022 17:44:56 +0000 (13:44 -0400)]
bugfix: don't crash on invalid session

2 years agobugfix: correct unit name / time remaining on training queues
xangelo [Fri, 27 May 2022 17:44:06 +0000 (13:44 -0400)]
bugfix: correct unit name / time remaining on training queues

2 years agobug: things were scheduling out to 2074
xangelo [Fri, 27 May 2022 14:48:03 +0000 (10:48 -0400)]
bug: things were scheduling out to 2074

Instead of passing a diff between now and the due date, we were passing
the due date to delay jobs. As a result it was scheduling it way further
that it should be.

2 years agoupdate homepage
xangelo [Fri, 27 May 2022 14:00:08 +0000 (10:00 -0400)]
update homepage

2 years agobugfix: training units overwrites their values
xangelo [Thu, 26 May 2022 17:34:39 +0000 (13:34 -0400)]
bugfix: training units overwrites their values

When training units it was writing all unit values to null resulting in
you being unable to train any units.

2 years agobugfix: costs displaying as red when you have the right amount
xangelo [Thu, 26 May 2022 17:34:10 +0000 (13:34 -0400)]
bugfix: costs displaying as red when you have the right amount

2 years agoswap tick from delayed job to repeatable
xangelo [Thu, 26 May 2022 17:21:05 +0000 (13:21 -0400)]
swap tick from delayed job to repeatable

2 years agobug: energy growth not accounted for in tick
xangelo [Thu, 26 May 2022 14:42:28 +0000 (10:42 -0400)]
bug: energy growth not accounted for in tick

2 years agoenergy upkeep is now 10% of build costs
xangelo [Thu, 26 May 2022 14:37:50 +0000 (10:37 -0400)]
energy upkeep is now 10% of build costs

2 years agohighlight if you have sufficient resources for construction/training
xangelo [Thu, 26 May 2022 14:08:32 +0000 (10:08 -0400)]
highlight if you have sufficient resources for construction/training

If you have enough resources the values returned are green.. if you
don't then they're red.

2 years agotake ore-refinery + mining_facility energy consumption in consideration
xangelo [Thu, 26 May 2022 13:51:48 +0000 (09:51 -0400)]
take ore-refinery + mining_facility energy consumption in consideration

2 years agoadd online user count + servertime
xangelo [Wed, 25 May 2022 20:14:22 +0000 (16:14 -0400)]
add online user count + servertime

2 years agodont allow empty chat messages
xangelo [Wed, 25 May 2022 20:03:05 +0000 (16:03 -0400)]
dont allow empty chat messages

2 years agoforce build/unit amounts to be > 0
xangelo [Wed, 25 May 2022 20:02:47 +0000 (16:02 -0400)]
force build/unit amounts to be > 0

2 years agorename
xangelo [Wed, 25 May 2022 19:46:28 +0000 (15:46 -0400)]
rename

2 years agoglobal chat via socket.io
xangelo [Wed, 25 May 2022 18:54:42 +0000 (14:54 -0400)]
global chat via socket.io

All users in game are now part of the global chat system allowing them
to talk to each other.

2 years agonaieve tick start on startup
xangelo [Wed, 25 May 2022 15:18:50 +0000 (11:18 -0400)]
naieve tick start on startup

2 years agofinal commit including final db schema
xangelo [Wed, 25 May 2022 15:17:03 +0000 (11:17 -0400)]
final commit including final db schema

Everything should work at this point and the game just needs
balancing...

2 years agonew buildings: mining! increase alloy + max alloy cap
xangelo [Wed, 25 May 2022 14:58:31 +0000 (10:58 -0400)]
new buildings: mining! increase alloy + max alloy cap

2 years agonew building: mining facilities to increase alloy per tick
xangelo [Wed, 25 May 2022 14:50:53 +0000 (10:50 -0400)]
new building: mining facilities to increase alloy per tick

2 years agonew building: energy accumulator for energy storage
xangelo [Wed, 25 May 2022 13:51:36 +0000 (09:51 -0400)]
new building: energy accumulator for energy storage

2 years agoadd solar_panels and calculate energy gen/use
xangelo [Wed, 25 May 2022 13:47:35 +0000 (09:47 -0400)]
add solar_panels and calculate energy gen/use

2 years agoAdd warehouses to cap food storage
xangelo [Wed, 25 May 2022 13:09:36 +0000 (09:09 -0400)]
Add warehouses to cap food storage

2 years agosp*trainer buildings now boost training time for those units
xangelo [Tue, 24 May 2022 18:03:02 +0000 (14:03 -0400)]
sp*trainer buildings now boost training time for those units

2 years agobarracks improve training time
xangelo [Tue, 24 May 2022 16:43:59 +0000 (12:43 -0400)]
barracks improve training time

2 years agonew building: homes
xangelo [Tue, 24 May 2022 15:30:29 +0000 (11:30 -0400)]
new building: homes

Homes give you 25 pop cap increase.

2 years agoResource fixes!
xangelo [Mon, 16 May 2022 18:48:31 +0000 (14:48 -0400)]
Resource fixes!

A large rework of resources and how they interact

Fixes:
- ignore db files
- transfer gold -> credits
- transfer ore -> alloys
- transfer bushels -> food
- transfer logs -> energy
- add symbols to topbar
- transer land -> space
- fix cost display
- Display rate of change for food/energy since they are consumed per
  tick

2 years agoUI update for map with sector selector
xangelo [Fri, 13 May 2022 04:44:33 +0000 (00:44 -0400)]
UI update for map with sector selector

Capitol Ships are now automatically placed into "sectors" (hard-coded for now)
that allow smaller map sizes, while still keeping density.

This included a large visual update to the map overview that includes
images for the different sectors, a proper overlaid grid, and per city
icons.

2 years agoUI updates and bug fixes
xangelo [Mon, 9 May 2022 15:29:05 +0000 (11:29 -0400)]
UI updates and bug fixes

Fixes:
- Resource requirements for construction/training not appearing until
  you click the build button (which then requires you hitting
  Build/Train twice)
- References to "tick-city"
- Resources are now visible and updated on every page
- Menu removed from sidebar to give content more room

2 years agoWIP: update to include sectors!
xangelo [Mon, 9 May 2022 15:29:05 +0000 (11:29 -0400)]
WIP: update to include sectors!

2 years agooverhaul using augmented-ui
xangelo [Mon, 9 May 2022 05:48:02 +0000 (01:48 -0400)]
overhaul using augmented-ui

This is a major overhau of the UI to something that fits the new theme
... SPACE!

overall the design is very simplistic with a fairly muted background to
allow for focus on the gameplay.

2 years agoremove test accounts
xangelo [Sat, 7 May 2022 03:25:34 +0000 (23:25 -0400)]
remove test accounts

2 years agoinitial commit
xangelo [Fri, 6 May 2022 19:55:50 +0000 (15:55 -0400)]
initial commit

This is a (mostly) functional version of the game. It includes:

- hourly tick for time tracking (1 tick = 1 ingame day)
- Construction (basic buildings)
- Unit Training
- Attacking
- Mail System (used for system notifications to a player)