Git Product home page Git Product logo

tinyking's People

Contributors

chrismdp avatar dependabot[bot] avatar patchfx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

patchfx

tinyking's Issues

Moving around

Should we charge people energy for moving between different tiles? And animate them moving around?

  • Show character moving to location
  • Stand in a different place to the other characters on the tile
  • Don't go home after each action
  • Actions for sleep at home (distance limited) and camp outside (get cold if not summer)
  • Allow move to adjacent location
  • Allow actions only in same square
  • Try performing actions immediately, to see if that's clearer
  • Non instant jobs instead of an action count
  • Tween the move and show actions after you're done

Outdoor stockpiles

  • Create stockpile outside as well
  • add entity to hand, redraw actor
  • update actors to show held items
  • create small “handful of grain” entities when pull grain from a container (stockpiles are containers for now)
  • allowing walk_to with X/Y not just entityId
  • Make find "stockpile_open_slot" place through checking everything on the space
  • merge holder and stockpile components if possible.
  • make stockpile 'hold' the things that are in it.
  • finish the “get and put” HTN tasks and make eat work again.

Graphics

Currently thinking PA/RimWorld style, with top down buildings and side-on characters.

UI with action explanation

make it obvious everything that they can do, and what that’ll do to their stats (eg, their spouse will lose relationship level, they’ll get more tired, etc. with a little pop up next to the workable)

Finalise palette choice

I think I'm going with this for now - a simple pixel art palette (although we're likely to be going with PA style flat shaded art)

Palette

Remove xy from Renderable

Keep XY just in Spatial; rework all the lists of components grabbed for World (world can just be one thing now)

Unknown tiles

Start game with random seed, and knowing only the tiles 2 away from your starting position: which is the person closest to the center of the map. Remove all other characters from the 2 square radius.

  • game start is random seed
  • find player start position
  • clear neighbours before farm step
  • don’t make a family for player settlement
  • new game action, which sets up new player with playable component with list of known things, rest of components same as a family
  • track known tiles through a “discover tiles” action (which also takes a player)
  • rendering only shows known tiles (probably with all needed details in the selector)
  • center starting map on player settlement

Plough field real time

plough field action which sets tasks for ploughing individual triangles on a field - there are 19 on a hex and covering with overlapping squares show lines is a nice touch. Should make person tired to plough.

Basic React-based UI to allow re-seeding mapgen

  • Pixi -> React component
  • Create simple Component to set seed value
  • Recreate map on seed reset
  • Add Redux to manage state better
  • Preserve viewport through setting map dimensions as separate prop
  • Fix incorrect clamping on far zoom out - perhaps pointWidth values not being set correctly on viewport creation?

Try a real time version

  • trees should be individual entities that can be selected to cut down
  • tap on a tile to get action menu as part of info, and tap again to choose “chop tree” on a tree
  • finesse info box on mobile at top of screen to make this work.
  • write HTN system which includes planner for chop down tree
  • run action each frame to check whether finished (return null in that case)
  • build rep from sensors: jobs available and location info for those specific jobs would be a start. Each planner should keep their own world rep of relevant objects we slowly build up over time.
  • wire up actions to a job queue processed via high level HTN

Notes

  • give a person particular tools which means he can do a job? Or perhaps you set a major and minor profession, and he can only do those jobs? Or do we need labours like DF to prevent people not doing basic jobs? Perhaps we can go simpler?
  • I still want choices around spending time with certain people. Perhaps if you give people jobs a long way away they camp outside overnight, and then get sad about it if they don't see their family.

Build AI to test balance

Rather than try to construct balance via spreadsheets, how about teaching an AI to play the game and find loopholes, so I can balance it better?

Equality Check always returning new object

The addSelector isn't returning the same object because its computing a hash. Need to find a different way of doing it: types and components will have the same order, so I can get the component type from that without needing to pass it through the selector.

Double order

Ordering the same recruitment or cutting down order will cause problems. Perhaps we de-dup the list whenever we add an order? Or take job removes all orders that are identical?

Pathfinding

We are going to have to solve the pathfinding as some point. I'm thinking a navigational mesh which majors on the corners and edges of the tiles. Well trodden paths turn into dirt.

  • make hex grid six times smaller
  • generate really small map for speed (in advance of chunking)
  • manage wall tiling and add navigation exits to each hex grid based on tiles
  • back to bigger grid and building sized hexes
  • start all people on random free grass tile.
  • use below libs (?) to construct path using lazy/fast A*
  • set person destination mode on graph and tween between each step in path
  • recalc path if the occupancy of any node in path changes? Might be too slow.
  • navigate and tween via the sides
  • trees should be twice as slow
  • wear out paths from one side to another (fun extra)

Invite character to your kingdom

  • household head and controller trees, trace back upwards for supplies
  • a simple invite action for a household head to change the controller hierarchy
  • filter assignable for the UI interaction
  • ensure the UI mechanics for control are working
  • Recruit whole household, not just house head
  • Pool your supplies
  • Should recruitment be distance limited?

Build character customiser, with a pixi renderer in the window.

To do this properly requires us to choose an art style (see #4) and build a set of initial assets. To do that I need an artist, and I think I'd like to be further along before involving someone.

However, for now I can allow people to choose hair and skin colour I think, from our main palette.


  • Hair colour customiser
  • Skin colour customiser
  • Eye colour customiser
  • House trait fix

Livestock and fencing

  • change chop trees to slash and burn type action with "makeshift tools"
  • "build log fencing" a row of circles along one edge of a hex - exists along the edge of two hexes and is therefore in both spatial locations (somehow)
  • allow sheep to wander the map and be captured through and action. Fences prevent them wandering in that direction.
  • slaughter sheep action will beget a bit of raw meat that goes off that day

Basic framework

  • install webpack
  • install Pixi
  • hello world
  • deployment to s3 + cloud front

Tech unlock: scheduling

Standard routines for people who do the same thing each day: perhaps as a tech unlock. Maybe needs someone to work in the palace as a scheduler.

One problem I have is that I’m not sure the game is much fun unless you have the ability to schedule. Dragging a load of characters all over the world gets quite old, although it’ll be better when I make the hit boxes more generous.

Rooms and stockpiles

Each log cabin has two rooms, which can be used for sleeping (floor, max 4 people, until upgrades) OR stockpiles (max 6 items) at the moment (will eventually be labs, forges, etc).

  • Each room is its own entity within the building. Same spatial, not drawn (yet). Can attach components based on type chosen (like stockpile component, which replaces the supplies).
  • rooms are ownable by people later.
  • buildings (and all rooms) also have a realm id, which is the player entity that ultimately controls them. That’ll be the head of house for an AI controlled house. Replaces controller hierarchy.
  • replace find place to sleep with “find a non-owned sleep place in my realm that’s free.”

AI for uncontrolled characters

Starting point:

  • Should gather grain in summer and autumn
  • Adults without children should wander about
  • children should play near home

Implementation: do this as routines so that players can build their own in future

  • new Json rules file format - presented as a list of actions to choose or discard

Distributed job queue in people's world reps

Would be quite interesting if we tried having the job queue only in people's minds... or written down on a notice board...

Initially, the job queue goes directly in the world rep. No assigning, just remove it.

Later, we'll have a way of doing a job be having the player delegate the job by telling someone to do it rather than doing it themselves...

Even later, we'll have a noticeboard where jobs are posted and people can take them from the board, or perhaps a campfire each night where they talk about the different jobs to be done the following day...

Rules for timed events like disappearing traits over time

Finish code:

  • Got end turn rules displaying correctly
  • translation actor changes: split rules into different actors from the conditions payload (same for end turn) this will strip the first part of the translation key
  • Make each event target/component/action/value which limits the phrase generation and stops the key iteration before it gets into the value
  • Show assignments that fail conditions with failing condition translation phrase
  • Make turn rules actually have effect

Implement more gameplay effects:

  • crops grow and can be harvested
  • everyone eats food at the end of each season
  • fished / thinned / planted forests improve over time
  • grassland tiles left untouched will eventually grow forests (wildness factor)

Customising the game and choosing your character

I think I need to extend the new game process to include character choices:
people expect that kind of thing to greet them in a game like this, and it's a
first set of choices that people can take.

As part of this, I want to allow you to pick the type of neighbouring lands from the following list:

  • altitude (affects surround)
  • lawful/chaos
  • humidity high/medium/low (affects surround)
  • settlement none/sparse/heavy
  • good/evil?

The game will give you pointers as to what kinds of combinations of people
you'll get because of these.

I'll then remove the other people from the world, and instead have different events
cause by a combination of the neighbouring areas to cause people to come in
with certain stories.


  • Extend mapgen screen to be character creation, with skip button for new game.
  • Turn off click to select when main menu is there
  • Fix the fact that the overlaid pixi renderer isn't interactive. Perhaps a pointer-events issue?
  • Debug route for worldgen tooling
  • Update amplify redirects all to index.html / SPA
  • #78
  • Allow choosing sea, wilderness, forest, desert, mountains in your six neighbouring lands
  • Toggle a city on each neighbouring land (minimum 1 city)
  • Choose one city as your starting location.
  • Backstory which changes underneath the lands.
  • House: choose a defining feature that always stays the same (green eyes/blonde hair/face shape etc)

Conversations

  • try a simpler prototype of the sol trader conversation system, with broader topic areas but the same opinion mechanic.
  • every character has an opinion of you, with builds the loyalty of them to your kingdom. If it goes negative this starts subtracting from loyalty. If it gets to zero they leave.
  • conversation options build opinion if they match the topics presented. Options are available based on traits. Use the rules engine for the conversations.

Worker placement: proof of concept UX

  • Drag and drop people
  • fire events when people get placed into other entities
  • Show available activities in the gui on a “workable” component - fade in over top.

Basic actions rules engine

  • limit gui to a range that people can work
  • implement rules engine to emit actions that can be achieved based on workable entities (provide the full set of components to the engine, along with the full set of components to all entities in the same tile)

Recruiting characters again

  • shared queue for jobs list, brought through with state into primitive HTN actions
  • recruit character action adds them to your kingdom
  • fix issue with interrupted characters always waiting around (and then having their food stolen!)
    Double recruitment order still goes ahead - make sure it's cancelled somehow (will also affect other types of orders perhaps? Maybe we de-dup the list?)
  • Wait for should be cancelled immediately - shouldn't really be part of an ongoing plan. Shouldn't necessarily be re-planned constantly though - need some kind of trigger?

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.