Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

A roguelike dungeon crawler game built with React, Redux, and Node.js

License

NotificationsYou must be signed in to change notification settings

Yahir-F/roguescape

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A roguelike dungeon crawler game built with React, Redux, and Node.js

Play the gamehere!


Table of Contents

Description

A roguelike dungeon crawler game built with React, Redux, and Node.js. The game is a single-player game where the player must navigate through a dungeon and defeat monsters to reach the next floor. The game is built with a React frontend and a Node.js backend. The game is deployed on Heroku.

Showcase

Gameplay:showcase

Homepage:homepage


Login page:login

Installation

  • git clone this repository
  • Runnpm install to install all dependencies
  • Runnpm run develop to run the app locally
  • Navigate tolocalhost:3000 to play the game.
  • Runnpm run build, thennpm start to generate a build version and run it onlocalhost:3001

Usage

Navigate to thedeployed link to play the game. Create an account on the login page and start playing. Use the arrow keys to move around the map. Defeat enemies to gain experience and level up. Enter the pink portal to go to the next floor. The game is over when the player dies.

Features

  • User authentication
  • User can create an account and login
  • User can move around the map
  • User can attack enemies
  • User can level up
  • User can spend coins to increase stats
  • User can go to the next floor
  • User can see their stats
  • User can save their progress
  • User can load their progress

Technologies

Snippets

Player Movement

Expand Snippet
// calculate damage and health values and update player/enemy values// gain coins and xp based on floor levelcase'enemy':{constplayerHealth=player.attributes.health;constplayerDamage=player.attributes.damage+player.attributes.bonusDamage;constenemyHealth=newEntity.attributes.health;letenemyDamage=newEntity.attributes.damage-player.attributes.bonusArmor;if(enemyDamage<0){enemyDamage=0;};dispatch({type:DAMAGE,payload:{entityName:newEntity.entityName,dmgValue:playerDamage}});addToLog(`Dealt${playerDamage} damage to${newEntity.entityName} (Current health:${state.entities[newEntity.entityName].attributes.health})`);dispatch({type:DAMAGE,payload:{entityName:'player',dmgValue:enemyDamage}});addToLog(`Recieved${enemyDamage} damage from${newEntity.entityName}`);// check if enemy livedif(enemyHealth>playerDamage){// check if player diedif(enemyDamage>=playerHealth){toast.error("YOU DIED");reset();window.location.reload();return;}}else{dispatch({type:MOVE,payload:{entity:player,vector:vector}});dispatch({type:REMOVE_ENTITY,payload:{entityName:newEntity.entityName}});constbaseXP=Math.floor((5*(state.floor)**2+5));constxpVariance=Math.floor(Math.random()*(baseXP/5)-(baseXP/10));dispatch({type:GAIN_XP,payload:{value:baseXP+xpVariance}});addToLog(`Gained${baseXP+xpVariance} XP`);dispatch({type:LEVEL_UP,payload:{stats:calculateStats,level:calculateLevel}});constbaseCoins=Math.floor((2*(state.floor)**1.5+5));constcoinVariance=Math.floor(Math.random()*(baseCoins/5)-(baseCoins/10));dispatch({type:GAIN_COINS,payload:{coins:baseCoins+coinVariance}});addToLog(`Gained${baseCoins+coinVariance} coins`);}break;}

License

License

This Project is licensed under theMIT license.

Authors

Yahir FedericoSean Oh
GithubGithub

About

A roguelike dungeon crawler game built with React, Redux, and Node.js

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp