Zetawar / zetawar

Zetawar is a turn based tactical strategy game implemented in 100% ClojureScript.
MIT License
169 stars 14 forks source link

Add support for simple tech tree #45

Open djwhitt opened 7 years ago

djwhitt commented 7 years ago

Simplest way I can think of to do this is to have technologies that you buy and units that require those technologies in order to build them.

djwhitt commented 7 years ago

cc @Conaws, suggestions welcome :smile:

Conaws commented 7 years ago

tree

Just finished implementing a super basic version of this -- gist here

https://gist.github.com/630c44cc44f1f5bd8613184374d36444

Basically, the minimal version just puts things into columns, then highlights pre-reqs and things it enables in different colors

But I got started on an SVG that draws lines between dependencies

On Fri, Jan 13, 2017 at 2:18 AM, David Whittington <notifications@github.com

wrote:

cc @Conaws https://github.com/Conaws, suggestions welcome 😄

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Zetawar/zetawar/issues/45#issuecomment-272278912, or mute the thread https://github.com/notifications/unsubscribe-auth/ACljr-iw6lQUU3Hm2K310emDxsp9O4M4ks5rRpGDgaJpZM4LiNqB .

-- Conor White-Sullivan 347-216-0173 @Conaw http://twitter.com/conaw

Good tests kill flawed theories, we remain alive to guess again. ~ Karl Popper

Conaws commented 7 years ago

My bad -- the gist above is just for visually laying out the tech-tree once you've got it.

For the core implementation of the tech-tree, I figure you'd just have a

ref to pre-reqs -- can't build tanks before cannons cost for tech -- simplest thing would be cash, since it's acquired each turn and it forces a tradeoff between research and building unitys

then each user would have to have the set of tech they'd bought you could store this as refs at the user level

user/acquire-tech

when you want to purchase something, your options are based on the units available via your acquired-tech

one option is New-Tech, whose cost is "???", which would generate a modal with the tech-tree

Another thought -- tech wouldn't just have to be new units, it could upgrade units as well -- so alpine-skis might allow your infantry units to move quickly over mountains

On Fri, Jan 13, 2017 at 5:04 AM, Conor White-Sullivan < cwhitesullivan@gmail.com> wrote:

[image: Inline image 1]

Just finished implementing a super basic version of this -- gist here

https://gist.github.com/630c44cc44f1f5bd8613184374d36444

Basically, the minimal version just puts things into columns, then highlights pre-reqs and things it enables in different colors

But I got started on an SVG that draws lines between dependencies

On Fri, Jan 13, 2017 at 2:18 AM, David Whittington < notifications@github.com> wrote:

cc @Conaws https://github.com/Conaws, suggestions welcome 😄

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Zetawar/zetawar/issues/45#issuecomment-272278912, or mute the thread https://github.com/notifications/unsubscribe-auth/ACljr-iw6lQUU3Hm2K310emDxsp9O4M4ks5rRpGDgaJpZM4LiNqB .

-- Conor White-Sullivan 347-216-0173 <(347)%20216-0173> @Conaw http://twitter.com/conaw

Good tests kill flawed theories, we remain alive to guess again. ~ Karl Popper

-- Conor White-Sullivan 347-216-0173 @Conaw http://twitter.com/conaw

Good tests kill flawed theories, we remain alive to guess again. ~ Karl Popper

Conaws commented 7 years ago

tree

djwhitt commented 7 years ago

Nice! I like the visualizations. Your implementation suggestions sound pretty similar to what I was thinking too. Being able to enhance existing units would require a little more work, but it's an interesting idea. The easiest way I can think of to implement it would be to add a unit-type-modifier entity that automatically gets applied to an associated unit-type if its pre-reqs are available.