Giter Club home page Giter Club logo

legendofmountainsea's Introduction

LegendOfMountainSea icon

Platform npm PRs

Maintainability Test Coverage Build Status Build status

4X sandbox game with legend of Mountain and Sea Classics

To experience hundreds of Chinese ancient legends, start with Hou Yi houyi to shoot down nine suns

Installing

Install LOMS Development CLI

$ npm install loms-cli -g

Fork repository, create your branch from master and run CLI command-line inside project folder

$ cd LegendOfMountainSea/
$ loms init
  • Windows might get node-gyp rebuild error, open Powershell as admin and run
$ npm i -g --prodution --vs2015 --add-python-to-path windows-build-tools

Getting started

Run game on web browser without NW.js Client

$ loms run-dev

Run game on Windows or macOS with NW.js Client

$ loms run-client

Run game's unit tests

$ loms test

Requirement

Node.js version 12.0.0 or higher

Contributing

LegendOfMountainSea welcomes all contributions from anyone willing to work in good faith both with other contributors and with the community.

No contribution is too small and all contributions are valued. Contributing to LegendOfMountainSea

License

GPL-2.0

legendofmountainsea's People

Contributors

dependabot[bot] avatar greenkeeper[bot] avatar markx avatar rrandom avatar siubaak avatar zweib avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

legendofmountainsea's Issues

A pointer icon is showing on top of the mouse icon

Version

0.0.1

Steps to reproduce

Move mouse on the New Game button when game is starting.

What is expected?

Mouse component should work normally.

What is actually happening?

A pointer icon is also showing on top of the mouse icon.

Terrain class implementation

  • Terrain should be the children of stage

All other character and pattern should be the children of terrain

  • Terrain should render as hexagon side by side

  • A star navigation algorithm.

Nice to have:

  • Bottom hexagons should be a litter bigger than top in order to make player feel a little 3D-visualized

Example:

LayerAgent needs to handle Y axis depth calculation

Right now if sprite in the same layer, there is no checking for them to figure out which one should be on top.
There should be a dynamic checking and sort sprite on the fly, sprite should on top of other sprites if this sprite Y axis number is bigger than others.

random seed

requirements:
value should be totally random.

Create a layer system to sort sprite

Pixijs does not have layer system, that makes our mouse component render on top of other sprite become impossible. Pixi-display library have some bug that sprite will lose interaction so we have to implement by ourselves.

Test setup doesn't work with pixijs

When running a test that tests source code using PIXI, it says ReferenceError: PIXI is not defined.

If you import pixi.js in the source code, then the test says ReferenceError: window is not defined. This is because pixijs depends on window object, and mocha environment doesn't seem to provide this global variable.

We need a better setup for the test, and some examples to show how we can test code with pixi.js

Create in-game system menu to handle quit game action

requirements:

  • 1. a system icon on the top left corner during the game (not in MainMenu)
  • 2. when user click system icon, a popup dialog would show and have a "quit game" button
  • 3. click "quit game" button and game window will be closed

Create a in-game mouse component to handle screen moving feature

We need to create a in-game mouse component that when player moving mouse to the edge of the nw.js client, the mouse icon would change and still stay inside.

example:
When player move mouse to the left edge of screen, the mouse icon change into '>', and map will begin to moving to left.

add setTransform api in class ElementCore

Right now class Terrain only have one container, and the position x & y are being set directly.

I am afraid of stack overflow because the map is unlimited and the number will not be accurate somehow.

So the solution could be:

  1. add setTransform api in class ElementCore, and specialize class Terrain's api setTransform.
  2. setTransform receives vector as param, and class LayerAgent's api moveLayerTo does not set position directly anymore.
  3. Terrain's container position does not change anymore, and more container will be inside Terrain's container dynamically .
  4. each container will render a new branch of Hexagon on the fly when layer is moving to certain coordinates

Class Actor should be more useful

Currently the Actor class only can access inside stageAgent, which is not useful at all.

Actor should be export to outside and user could hold instance, so the development will be more easier.

Single animation in sprite

Right now, the sprite can only handle one animation, it's clearly not going to work with character sprite.

implement i18n module

  • implement api
  • use JSON file to manage language content
  • easy to extend
  • auto check language setting in native system (nice to have)

Save and load

  • save into local file
  • load local file
  • load from network

Add debug hint bar in client side

Right now all the error is not show in the client side. We need a hint bar to show the error message to make us debugging easier.
Could start with errorUtil.js, add an error handling function and replace all the native console.error.
Add markup in index.html to show the error, should be easy enough at least for now.

Player could set up a country or find one

  • It is up to player.

  • The first time player will stay in a country which is not belong to player.

  • Player needs to use all the resource to find people (NPC) who is willing to follow player and build a country or take current country from the king.

A clip in font's right side

default

Environment

  • Version: 0.0.1
  • Environment name and version (e.g. node.js 6.4): 9.2.0
  • Operating System and version (windows or macOS): at least windows

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.