Coder Social home page Coder Social logo

monofuel / badmars Goto Github PK

View Code? Open in Web Editor NEW
4.0 4.0 1.0 12.25 MB

html5 multiplayer rts game

Home Page: https://japura.net/badmars

License: Other

Makefile 0.52% Shell 1.18% JavaScript 2.27% Go 8.66% CSS 0.51% HTML 0.46% TypeScript 86.24% Dockerfile 0.15%

badmars's People

Contributors

monofuel avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

badmars's Issues

only send updates around players

  • refactor how the client handles location
  • tell the server where the camera is looking
  • server should remember where the player has been when they log back in
  • server should only send unit movements for chunks the player has loaded.

Server Typescript or go

Switch from es6 / flow / babel to typescript for the nodejs portion of the server, or possibly to golang for more of the backend.

fix combat and combat animations

haven't tested this in a while

might be neat to have an automated test for, but also might be too much work for now (we'd need a way to spawn tanks within range of each other during the test)

fix service architecture

when refactoring the database interface and setting up the simple standalone mode for debugging, i broke a ton of the services and networking stuff.

  • need to update rethinkdb database code for the new database interface db/index.ts
  • should probably get rid of the 'map' service because it was silly and weird.

THREE.js - Shadows

Adding shadows (at least for the terrain and buildings) could be really nice

Building Lights

Decrease ambient lighting and add lights to buildings to better highlight visible parts of the map.

  • Add lights to buildings
    • Optional shadows
  • decrease ambient lighting
  • Change the moon to be a static light at night, instead of a moving light.

OAuth integration

I already use Oauth on japura.net and on ffxivmc, we should use Oauth for login on badmars.

Push user changes to players

If the user data changes, we should push it to the user so that they can know the latest colors of all users.

Material-UI

I used Material-UI for the main japura.net website and for ffxivmc, i like it and should change to it from react-bootstrap

Fuel Usage

fuel usage should be turned on for units eventually. atm it's disabled to make things simple to test.

UI - Factory Queue is broken

Factory queue is processed on the backend now, but needs to be updated for the UI.

Might also need some new fixes on the backend for unit delta changes.

Fuel Usage countdown

a countdown for how long the unit has to live with the current fuel usage would be nice.

Fix file watching for new dev layout

Previously, badmars used babel-watch to watch for changes. Because i want to get typescript into the mix, the project is transpiled with babel into ./bin/server/nodejs. The problem with babel --watch is that it does a full rebuild, and then watches for file changes, however I want it to only watch for changes since the project should already be built.

I started a script buildWatch.sh that can be ran in a container via make dockerWatch which should watch for file changes, but it's having some issues (multiple events are fired, specifying -e modify doesn't seem to generate events, %w%f doesn't seem to ever specify filename, i'm probably doing stupid mistakes)

The end flow that i want a make target to build all the containers (docker-compose build) and build the project (dockerBuild) and then another make target to run the server with server code hot reloading.

Watch for new maps in the database

the database class in server/db/db.js keeps track of all the tables. When a new map is added, it should load them. currently they're only loaded on startup.

Singletons everywhere oh god

the DB, util and logging components are used almost everywhere as singletons, and this has led to a lot of mess and circular dependencies issues. This should be refactored, and there are a few possible solutions.

  • initialize them once and pass them down (dependency injection)
  • initialize them once as globals and use them everywhere (globals suck)

better color/flag system

Atm players can set a color when they first login, a proper flag / color system would be cool.

better spawning system

The current spawning system is very slow and buggy. It turns out that spawning is actually very hard! It needs to have no race conditions and be able to reliably spawn players quickly. This probably should be separated into another service

  • Spawn flag on the user document. if a user is being spawned, atomically set a flag so only one service can spawn that player.

  • Find a spawn location

    • Should find it quickly
    • could be pre-calculated. Could spend free time finding spawn locations, storing them and picking them off to spawn users.
    • spawn locations should be spread out from other users
    • spawn locations should have a lot of open space
  • spawning could possibly modify the map to flatten terrain

  • Once a spawn is found, actually place the user in that area

websocket - protobufs

Should switch to protobufs for websocket IO for efficiency and typing consistency.

Winston logging

Switch to winston for logging and profiling

  • remove util logger stuff
  • make andrelytics winston transport

THREE.js - World Grid

currently, a moving sun and tweaking the normals on the mesh are used to convey the 'tiled' look. It might be nice to look into a better way to do this.

Maybe only show a grid while building (eg: starcraft) or add a light grid texture to the terrain.

Fuel Usage is broken

It looks like units that use fuel are being put to sleep in some cases, this should not happen.

(in hindsight, 'sleep' was probably an awful premature optimization and should be removed)

3D Models - Internal Faces

Internal faces on models (like the factory smoke stacks) should be filled in with a black 'internal' material that does not reflect.

Better UI

The current UI is really hacky, it needs to look pretty. The first step probably is to get some nice UI mockups done.

UI features required:

  • chat input and chat history
  • menu for options
    • performance settings for how much of the map to load
    • about page with copyright and github links.
  • Selected unit information
    • HP
    • storage
  • buttons for selected unit
    • if no unit is selected then building placement menu

Music

The game lacks music

Trade Routes

Ability to define trade routes that transports can run along

transportation towers that can be chained together to form a route.

RethinkDB table race condition

Currently when starting up, multiple services might create a table at the same time and break rethinkdb. There should probably be a separate service responsible for setting up the rethinkdb tables (probably in go)

Currently the only solution is to go into the UI and delete the bad tables.

Better artwork

Programmer artwork is awful, units need to look nicer.

factory buttons are messed up

Material-UI secondary buttons are set to a bad color.

  • secondary button color should be better
  • A better way to signify that the build bar has switched to 'factory' could be nice

sync client settings with server

currently the server keeps track of the last 60 chunks a user has viewed ( #29) The client should send some config info to the server to be more intelligent about this.

Unit Components

being worked on in the way too big PR #1

  • break apart state on units into components
  • allow loading and unloading of components from the unit stats on the fly
  • ability to change, add and remove unit types on the fly

fog of war

  • implemented visuals
  • should not show enemy units that move into fog
  • should keep track of buildings that have been seen
  • server should not send data for hidden units
  • units that can attack should be limited by vision

Andrelytics Profiling

Currently there is a custom profiling system on the dashboard, it would be nice if this used andrelytics instead.

unit icons

small colored sprites to optionally show over units would be nice to make it easier to see different units and friend or foe at a glance.

fix resource transferring

broke resource transferring again.

  • fix this (both backend and frontend)
  • add it to the go test in tests/

Unit Stats Editor

add an editor to change unit stats on the fly

  • UI for editing stats
  • have stat changes update units
  • stats are on a per-planet basis
  • if no stats are saved, use defaults from units.json

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.