Code Monkey home page Code Monkey logo

flying-tower's Introduction

Flying Tower

Open source turn based roguelike that uses ES6 features

Currently in Alpha state (Not Playable in any capacity of the word)

Motivations

  • To make and finish developing a complete roguelike game
  • To learn ES6 features by practice
  • To create a resource for how to use ES6 features, escpecially with JS games

Special Thanks

  • ondras for the Rot.js library
  • Larkenx whose project inspired me to attempt to make my own JS roguelike using ES6.
  • Jean-Pierre Sierens, for his tutorial that helped me setup the project.
  • The many developers who work on the dependencies used in this project.

flying-tower's People

Contributors

thealchemist64 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

flying-tower's Issues

Items and Tile Types should be loaded from JSON

Right now, Items and Tile Types are hard-coded. I would like to instead store this data in JSON files, which will be placed in a “/data” directory in the root of the project. This will make it easy to edit/add new items and Tile Types, and easy for myself and others to contribute to the project. There is a JSON plugin for Rollup that loads JSON files as ES6 modules. That would be a great tool to use for this issue.

GlyphStack

Right now, if the game needs to temporarily change an actor's glyph, there have been two ways to deal with this. One, the change and reverting of the change are hardcoded (i.e. sentinels waking up). Two, creating a temporary private variable (_varname), store the current value in there, and change the current value (i.e. the old stun code). When its time to revert, change the current value to the value in the temporary private variable, and delete the temporary variable. The first method only works if the what the glyph is and what it changes to are constant. The second method is tedious to code and bug-prone. Furthermore, both methods would fail if I wanted to implement stacking multiple status effects (which I do). Therefore, the game code needs to support a new method. My idea is to implement a stack data structure to represent an actor's glyph. The top glyph in the stack is what is drawn to the screen. The game can push and pop glyphs from the stack to display status effects.

Design and implement remaining runes

At the time of this writing, there is only one item: a wind rune that knocks enemies back two spaces. There are three more elemental runes to design/implement.
Here are my ideas so far:

  • Ice Rune: freezes an enemy for X number of turns
  • Earth Rune: creates floor tiles
  • Fire Rune: (?) - maybe sets an enemy on fire, causing them to move randomly for X number of turns

A proper implementation of nextLevel()

When the player reaches the level exit, they only get a message saying “Multiple levels not implemented yet.” When the prototype for a single level is finished, the first thing that needs to get done is properly implementing multiple levels in the game. Since the player can’t backtrack to previous levels (assuming it hasn’t completely collapsed by that point), the game just needs to generate a new level when the player reaches the exit.

An official Design Doc(?)

Diving in just coding and experimenting with whatever came into my head worked great at the start when I was just trying to make my game ideas into something tangible. The development of this project will be kept “””lean””” in order to be able to change and add new features rapidly. However, if I am not going to be the only person working on this project, there should be a reference for the Setting/Lore/Design Ethos/etc. to keep everything consistent (unless amalgamation of various genres/ideas/tones/ IS the aesthetic). This is especially true in the possible event in the distant future that I step away from the project.

Same applies for a coding style guide.

Refactor Collapser

There is a lot of repeated/redundant code in collapser.js. It makes changing anything in regards to the Collapser involve a lot of bugs and/or a lot of using Find/Replace. Collapser needs to be refactored to make future maintenance and design changes much easier.

Incorrectly processing dT

Hi! I was looking over your project and noticed here that you're using the argument passed from rAF as dT. I just wanted to let you know that what rAF is passed is actually a DOMHighResTimeStamp, essentially performance.now(). It's the number of ms since the document was loaded. I generally keep track of the last timestamp and calculate the delta myself. Just thought that might be helpful! Reference

let step = function(dt){
if(index < frames.length){
count += dt / 60;

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.