GithubHelp home page GithubHelp logo

kylabendrik / kingdomsim Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 2.0 2.74 MB

Turn-based city builder game based in a medieval/fantasy setting

HTML 2.45% JavaScript 94.06% CSS 3.49%
city-builder game turn-based-strategy

kingdomsim's People

Contributors

kylabendrik avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

kingdomsim's Issues

Ability to place items

Select "house" or "farmland" from Build drop down, click on map, construction zone or farmland appears.
Note - houses can be built on top of trees, but trees present add points needed to build farm. Farmland has to be cleared first.

Gathering

We need something for all our lovely peeps assigned to "gathering" to do. Have the option to either:
Randomly chop down trees within a radius of their house (grows over time according to availability of resources and skill; default)
Assign specific trees to be chopped down. This would work like the building queue.

We would need to be able to add and remove trees, know where they are, etc.

Peeps Page

  • Make pages possible within the same HTML page
  • Make new default portrait for females.
  • Make clothes for the portraits (two different clothes for each gender, just to practice layers)
  • List Peeps with their skills, houses, assigned jobs, skills, age, gender, and spouse, as well as the appropriate default portrait for their gender.
  • Progress bars for each skill. Show skill level as integer, show progress to next level as bar.
  • Be able to reassign peeps to different jobs. Set assigned job as dropdown button.
  • Be able to reassign peeps to different houses.
  • Be able to marry eligible peeps to each other.

Graphic Updates - Mostly Map

  • Make the map background prettier. Change the grass texture to be a little different here and there.
  • Add Mountains around the edges of the map. (in future versions, you can construct mines on the mountains, for now, they will just be an end to the map.
  • Add red outline when you can't place items. (Farmland, specifically
  • Make the window a little bigger.
  • Make grass snowy in winter.

Building-specific Storage

  • Make builders pull from storage nearest work site.
  • Make gatherers drop wood in wood-specific storage first, then their home, then other homes.
  • Make farmers drop food in food-specific storage first, then their home, then other homes.

findMapCoordsByHouse

Please help with this! It's an array of arrays, so I'm not sure how to do a "find" method.

New Peeps

For now, let's add some random peeps coming in every once in a while, to encourage building more houses.

  • random peeps appear
  • peeps assigned to random houses with empty spots

Structures seem to be randomly disappearing from the "structures" list

Describe the bug
After building a few structures, such as farms or houses (I tried a few times with just farms and it still happened), The structure will randomly disappear from the list of structures. Not all of them, and not even the most recent one.

To Reproduce
Steps to reproduce the behavior:

  1. Build several structures.
  2. Proceed through months until things break. Often happens around April with farms.

Expected behavior
Ideally, these structures should be working. Most of them do, I'm not sure why some are breaking like this.

Desktop (please complete the following information):

Trees

Lets have trees grow slowly over time, increasing the amount of wood you get.

  • Make sapling texture
  • Make tree textures be growing in size
  • Grow saplings randomly near full grown trees in the spring. Saplings won't be gathered.
  • Takes one full year for a sapling to grow into a full tree
  • Bigger trees provide more wood.

Farming

  • Add Farmland to empty map spaces.
  • In April, click on Farmlands to change to seeded farmland.
  • Require 10 points per plot that month.
  • Grow Farmlands each month. Require at 5 points per field other months.
  • Have a queue much like the building queue to distribute points.
  • Increase XP for farmers.
  • In October, require 10 points per plot to harvest.
  • Beginning of November, show food in food resource.

Peeps

At some point, we will need to add "peeps" They will need (at absolute minimum)
Name: (random)
Job: (builder, farmer, gatherer)
House: (one of the houses available. For now, just randomly assigned)
Building Skill: (start at 0)
Farming Skill: (start at 0)
Gathering Skill: (start at 0)

They can be assigned to jobs and houses. Skills build over time. Points applied to jobs = skill + 10

Houses opening doors when hovered over

Little nice touch - It would be cool to have the door to the houses open when you hover over it. Also, show a dropdown of the peeps that live there. (later, we could click on the house to see more details, but not necessary now)

Peep age up

  • Peeps age up
  • Peep age is displayed
  • Peeps have month/year birthdates

Trees placed appropriately

Right now, the trees (which are 32x32 px) are being placed on a 64x64 px grid, leaving them rather funny looking. It would be nice to have them spaced correctly. Basically, the trees should be a 1x1 on the "grid" while houses and farmland should be 2x2.

Peeps can have a spouse and have children

  • Peeps can have a spouse
  • Spouse displayed somewhere
  • If two peeps are married, they can have a child.
  • They can only have one child per year. (some kind of countdown?)

Expand the Map

Make the map a little bit bigger, so we can scroll around.

Reorganize files - especially Map.js

Map.js is getting really, really long. surely there's a slightly better way to format this.

  • textures.js formatted
  • map.js formatted
  • date.js formatted

3D - generated Peep Portraits and Genetics

Using three.js, make the portraits automatically generated based on genetics.

  • Decide on genetic options
  • Model shape keys for those options
  • Add genetics to Peeps.
  • Find out how to export morph targets to three.js
  • Export model(s)
  • Make clothing overlays
  • Make hair overlays

Demographics - Food for Thought

These demographics are based primarily on Medieval Demographics Made Easy and Fuedalism

A square mile of settled land can support 180 people. This land includes roads, villages and towns, as well as crops and pastureland. Each acre of land would yield eight or nine bushels of grain. Farmers in fuedal manors often would cultivate only two-thirds of their land. The other third would lie fallow. One third would be winter crops and another would be summer crops. Farmers used wooden ploughs, sickles, and scythes. Two acres of land would take five men a whole day to reap and bind the harvest. In England, each peasant would hold about thirty acres of farmland.

Each sheep would yield two ounces or less of fleece.

Storage Building for Resources

Each house will add a tiny bit of storage for wood and food, but in order to really stock pile you need storage buildings.

  • Add resource caps based on # of houses available.
  • Food from farms will be discarded if there is no space.
  • Gatherers will stop gathering and just be idle.
  • Gatherers will start gathering again when there is space available.

Food will go in Barns

  • Make Barn texture
  • Add to build options
  • Add to functions for adding buildings.
  • Make barns add storage space for food.

Wood will go in Stockpiles

  • Make Stockpile texture
  • Add to build options
  • Add to functions for adding buildings
  • Make stockpiles add storage space for wood.

Re-organization of files

Everything is kind of a mess right now. The index.html page is huge, with a lot of CSS and JS in it, which probably have better spots to be. We need to re-organize this whole project so it's ready for more stuff to be added.

Set up installer/packaging system

There's a bunch of different Electron packaging systems out there. Let's figure out how to get it set up to quickly package for Mac, Windows, and Linux. Bonus points for having an installer, instead of having our player have to scroll past all the extraneous files to find the app.

Resource and Building Assignment

  • Be able to set priorities for houses in construction.
  • Be able to set trees to fell - place a little red "x" over the trees you want to be removed first. Those are removed before returning to the default "closest tree to house" queue.

Year layout bug

Describe the bug
The peeps/build menu gets bumped down when the years go into double digits.

To Reproduce
Steps to reproduce the behavior:
play to year 10

Expected behavior
The menu stays put no matter what year it is.

Screenshots

year layout bug

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Squishing Map

When you resize the window, the map gets squished instead of just hiding parts of it, or revealing blank space. This probably isn't ideal. Not sure how to fix.

Zoom-able Map

Make the map so you can zoom in an out. Higher-res textures will make it all look sharper.

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.