torrobinson / roguelike Goto Github PK
View Code? Open in Web Editor NEW๐น๏ธ A procedurally-generated roguelike personal learning experiment (for fun!)
Home Page: http://www.torrobinson.com/roguelike/build/game.html
๐น๏ธ A procedurally-generated roguelike personal learning experiment (for fun!)
Home Page: http://www.torrobinson.com/roguelike/build/game.html
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?
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.
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?]
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.
Ignore any compiled JS
Command = Walk to point 10 spaces away
Action = Walk 1 point towards it
Convert player movement to follow this concept
Create 2 subclasses of Inventory Item:
Equipment
Consumable
Add attach points for equipment to Actor:
Restrict keypress event triggering to [something] presses per second to ensure that faster computers/browsers don't zip around and keep movement consistent
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
Look for:
== 'function'
And convert to a helper function
function UseDynamicValueIfDynamic(val){
if(typeof val== 'function') val= val();
}
An action should take X ticks to actually complete. Must be in sync with the game clock.
The new sprites should all have sprite.blendMode = PIXI.BLEND_MODES.MULTIPLY
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
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.
Sprites should have a subset of frames, and a "loops" attribute
Implement a menu system allowing the drawing and handling of:
package.json change
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
To be used later with sprites.
Movement of an actor should change the facing direction to that direction
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
Darken tiles on the map and minimap until they've been seen or explored
Dev should be able to run the pre-built HTML files with 1 set of development references, and have them removed and replaced with references to single minified files on build.
The renderer should know which sprites on-screen represent what actors
Generate a minimap base don any world size and render it out
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.