GithubHelp home page GithubHelp logo

torrobinson / roguelike Goto Github PK

View Code? Open in Web Editor NEW
18.0 18.0 1.0 582 KB

๐Ÿ•น๏ธ A procedurally-generated roguelike personal learning experiment (for fun!)

Home Page: http://www.torrobinson.com/roguelike/build/game.html

JavaScript 0.81% HTML 1.95% TypeScript 97.24%
experimental game procedural-generation random-generation retro roguelike tilesets typescript

roguelike's Introduction

roguelike's People

Contributors

cjshmyr avatar torrobinson avatar

Stargazers

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

Watchers

 avatar  avatar

Forkers

dongp314

roguelike's Issues

Optimize renderer to not redraw every frame

The renderer should know what actors are off screen and off screen, should be able to implement a viewport, and should only redraw things as they vanish/appear/move off-camera.

Ideas:
Actor has :isSpriteDirty() and isLocationDirty() which is "true" until next sprite change? Then renderer only makes changes if those 2 are true on an actor?

Think about movement

Is movement arrow-key based? Or does movement happen when the player uses the mouse to click on a tile?

If the latter, wait until the PixiRenderer is complete, as the TextRenderer will be unable to detect click events on specific letters.

Inventory Menu

Hitting "I" should open an Inventory menu.
Can this be the same format as MainMenu.ts but automatically generated based on the player's inventory?

Player presses I and menu pops up:
[1 row per inventory item]
โ””> Use [if usable]
โ””> Equip [if equippable]
โ””> Discard [worry about later?]

Decorator: Floor Decorations

Implement the inclusion of a layer between Floor and Wall that decorates the floors (carpets, blood, etc).

Modify a RoomType to populate a carpet to prove it works.

Decorator: Add more room types

  • Drop well in centre of atrium. Make atriums only medium or larger rooms
  • Room type: workroom (random anvil and workbench if small room)
  • Room type: kitchen (furnace and kitchen table if small room)
  • Room type: alchemy room (alchemy tables and purple torches in corners)
  • Room type: graveyard (graves if medium sized)

Implement a follower-camera

Though the always-centered camera works for now, build a second method for slicing the world pre-render that has the camera move towards the player when it gets X tiles from the edge of the view

Torches temporarily unfog

Currently if you can see a torch but a fogged enemy were to walk by it, you wouldn't see them until they became unlogged.

To make this more realistic, when fogging sprites, override the fog style.hide type to SHOW if the sprite is illuminated = in the render loop, tag with a made-up attribute (false, then set true if illuminated) and check when hiding if fogged

Chaser: reroute move path if unintended collision

  • When targetting the player, set this.chaseTarget = player;
    collidedWith(actor){
    if actor != chasetarget
  • retoute to target
    }

Currently if the chaser cant see the player anymore and is chasing them to where they last saw them, but something else (another chaser) blocks them off, they keep stupidly running into the new obstacle that wasn't there when they initially pathfinded.

Menu System

Implement a menu system allowing the drawing and handling of:

  • The Menu
  • Menu Pages (and maintaining stack order)
  • Menu Options
  • The ability to go back and forth between Menu Pages
  • The ability for select Menu Option to either direct to another Menu (placing it on the top of the stack) or executing a command

Investigate gulp.js build workflow

Can we have a build pipe that takes all <script src="xyz"> references, babel transpiles, uglifies, and concatenates like normal, and then insert a new <script src="compiled.js"> tag in their place?

Look into gulp packages that can read and replace html elements

Generalize 'Torch'

Generalize the class and usage in PixiRenderer so that rendering doesn't base itself on the class and can emit light from multiple emitter classes

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.