GithubHelp home page GithubHelp logo

laurelch / hexagon Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 1.0 19.11 MB

An HTML5 game on a hexagonal map implemented with Stage.js.

Home Page: https://laurelch.github.io/hexagon

HTML 8.39% JavaScript 87.19% CSS 4.42%
html-css-javascript html5 html5-game javascript javascript-game

hexagon's Introduction

Hexagon

Lv. 1 Demo Image

Goal

Implement a game involving one or more players in the future, where they move, collaborate, and fight enemies in a hexagonal grid.

Implementation

This project is implemented in HTML5, CSS, and JavaScript with Stage.js.

Gameplay

The player controls the character (represented as a circle) that starts from the center of the screen and will encounter random enemies.

Lv. 1

The player toggles the moving range and wins if they move to the hexagon cell where the enemy resides.

Future

Several forms of attack will be available for players to choose from. Different forms may have different ranges, distances, and damage.

References

Theories

Implementations


Timeline & To-do List

Versions

  • Lv. 1 - A player can move from one hexagon cell to another within a defined range
    • implementation time range 5/9/22 ~ 5/25/22, with ~28 hours
  • Lv. 2 - A player can move and attack enemies while moving in the hexagon grid
  • Lv. 3 - To be continued...

Elements

Lv. 1

  • Create a hexagon grid.
  • Create a basic shape for players and enemies (round shape).

Lv. 2

  • Create a basic shape for the environment and obstacles.
  • Create complex shapes for players and enemies.

Gameplay

Lv. 1

  • Move the player from one hexagon cell to another with a mouse click.
  • Move player with step-wise animation.
  • Show a range of possible moves with color.
  • Constrain player to move within the range.
  • Show different types of move/attack - Part 1.
    • 1. Move between adjacent cells, with a range of 360°, distance toggled by key.
  • Add enemies that appear randomly in the view and will disappear if the player moves to that cell.

Lv. 2

  • [Canceled] Add direction of player.
  • Move player with WASD.
  • Show different types of move/attack - Part 2.
    • 2. Attack fan-shaped area with a specified degree.
    • 3. Attack distant cells with specified rules.
  • Allow player to attack the enemies within attack range by mouse click.

UI/UX

Lv. 1

  • Add styled instructions.

Lv. 2

  • Add HP bar.
  • Add skill information.

Bugs

Lv. 1

  • Distance does not reflect the third coordinate.
  • While the player is moving, the user can still click any cells to interfere with the move.
  • The colored hexagon cells are on top of existing enemy cells. Temporary workaround: set alpha (transparency) = 0.2.

Lv. 2

  • Irregular shape is not rotated with respect to its center.

Utilities

hexagon's People

Contributors

laurelch avatar

Stargazers

 avatar Haozhe Su avatar

Watchers

 avatar

Forkers

a1vinsmith

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.