Giter Site home page Giter Site logo

sweetheartsquad / agbic2021-short-rest Goto Github PK

View Code? Open in Web Editor NEW
1.0 7.0 0.0 22.89 MB

A party-based roguelike deckbuilder

Home Page: https://sweetheartsquad.itch.io/short-rest

JavaScript 5.24% Shell 0.08% TypeScript 85.98% GLSL 3.27% CSS 1.27% Lua 3.80% HTML 0.35%

agbic2021-short-rest's Introduction

Short Rest

frog cat apple onion

Scripts

npm i # setup
npm start # dev server
npm run build # make build
npm run optimize-images # optimize image assets (slow)

Release

  1. Bump the package version (npm version patch/minor/major)
  2. Push changes
  3. Go to release action
  4. Select "Run workflow", and confirm on main branch

The workflow will automatically create a build and upload it to itch.io.

Game files

These are all loaded dynamically at runtime, so you can take a single build and edit them + reload instead of using the dev server.

cards, obstacles, and levels are named .txt for annoying build reasons but are actually JS and indirectly evald by the game.

Mechanics

Advance order of operations

  • if there are no obstacles:
    1. moves to next area
    2. if there is an obstacle, and the obstacle has a start, trigger the start
  • if there is an obstacle:
    1. if the obstacle has health, deal damage to obstacle
      • if the obstacle died:
        1. queue death animation
        2. if the obstacle has an end, trigger the end
    2. if the obstacle has an interact, trigger the interact
    3. if the obstacle has damage, deal damage to front

Note that because of how interact, end, and the action queue work, if an obstacle dies during Advance the order will be:

damage > interact > death animation > end

To avoid triggering interact during the turn an obstacle dies, add if (!this.health) return; to the top of the function.

Other

  • All interaction is player-driven: enemies don't attack, they just react to the player's Advance.
  • end will also be triggered when an obstacle is killed through cards or as a result of another interact.
  • Armour: each point of armour blocks a single hit (regardless of damage)
  • Obstacles without starting health will never die as a result of damage: they need to be killed via killObstacle in their interact

agbic2021-short-rest's People

Contributors

seleb avatar thehetmanm avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

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.