seagreen / depths Goto Github PK
View Code? Open in Web Editor NEWCasual strategy game in Elm.
Casual strategy game in Elm.
https://github.com/seagreen/fpg-depths/blob/master/src/Id.elm#L6
Here, you only use the State
constructor, but you are importing all of them. Being explicit in your exposing makes it more clear what is being used in the module.
CSS Bootstrap is so ugly it makes me cry.
Either
Or my preference
Happy to take ownership
Seems like the hex-grid fork is a bit behind the mainline. should we rebase?
You should be able to reflect on your decisions without respect to your opponent. -- @mitchellwrosen
(This is in the context of making it beginner friendly, so you don't lose if you don't tech up at the exact right time.)
Beginners, if they don't know what the opponent's doing, will always turtle. -- @mitchellwrosen
https://github.com/seagreen/fpg-depths/blob/master/src/Building.elm#L10
Using Maybe
can sometimes hide the domain meaning. Perhaps what you really have is something along the lines of
type BuildingCombatType
= NotCombat
| Combat { firepower : Int, sensors : Int }
(those names are bad, but perhaps better than using Maybe
)
Or even move this up a ways, so you have a type alias for building stats, one for combat stats, then each building is something like
type Building
= NonCombat BuildingData
| Combat BuildingData CombatStats
Just a thought.
Reduce the initial games choices to (1) attack, (2), defend, (3) expand. Currently we have "expand" broken up into two paths expand outward with colony subs and expand inward with a Factory
. This is really hard to balance and shouldn't be an initial option.
Cap the amount of buildings at each habitat, probably at 3 (not counting the PrefabHabitat
which will probably be removed).
Rework both units and buildings.
Add hull
to ships and give weapons two stats, one for chance of hitting and one for damage.
Allow having multiple weapons and sensors on the same ship.
Change stealth
to evasion
and have it rolled each time a ship is hit to try to dodge it (we might bring back stealth
later).
Show the location of all enemy habitats.
If you have a ship at an enemy habitat, show all buildings there.
As suggested by jonf on elmlang.slack.com.
It's possible we want to use a type alias for State
instead
Players who join after the first two should be treated as observers
This will wait until the mechanics of the game are perfected (#3).
The flow should now be:
subscribe
message.
{ "type": "subscribe", "topic": <room> }
payload
messages.
{ "type": "message", "topic": <room>, "payload": <payload> }
payload
messages whose topic exactly matches any previously subscribed string, without the type
tag. They look like:
{ "topic": <room>, "payload": <payload> }
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.