Coder Social home page Coder Social logo

sebastianluczak / php-roguelike Goto Github PK

View Code? Open in Web Editor NEW
11.0 2.0 0.0 1.8 MB

Simple RPG text game done as a side project using Symfony components

License: MIT License

Shell 1.25% PHP 98.05% Dockerfile 0.34% Twig 0.35%
game php7 php-game console-game

php-roguelike's Introduction

php-roguelike

CodeFactor GitHub code size in bytes GitHub repo size GitHub Sponsors GitHub closed issues GitHub issues GitHub GitHub release (latest by date) Website GitHub last commit Docker Image CI

Logo

What is this?

PHP Roguelike is a console (CLI) based game driven by rogulike scheme based progression. You'll die. A lot. Embrace it and go further and further, discovering new bosses and trying to beat high score.

This game is done as a part of side-project to show'up some programming skills in PHP. You're welcome to give ideas and put some PR's.

Trivia

J: Mom, can we have ADOM at home?

M: But we have ADOM at home...

Meanwhile, ADOM at home:

Screenshot

Purpose

It's so fun to fiddle with some side-project and have a time sink for myself. I was missing side project and playground/testing area to experiment and keep on track with everything. I'll produce a roadmap in some time to see some final goal and keep myself motivated.

Influences

Ok, so in fact I've gathered a few ideas from different games. Most notably you'll see elements from:

  • Dungeons and Dragons
  • Fallout
  • ADOM
  • Enter the Gungeon

Run & build

Prerequisites:

  • Docker with Docker Compose
  • Terminal Emulator capable of displaying rich text and XTERM256 support
cd ~
git clone https://github.com/sebastianluczak/php-roguelike.git
cd php-roguelike
chmod +x bin/*
bin/build.sh

Keymap

See: Keymap

W/A/S/D - Movement of character
I - Player Interface (WIP)
L - show Leaderbords
Q - quits the game
H - use Healing Potion

-- 
DEV_MODE
R - regenerates the level
P - switches DevMode (required for some output and commands)
R - regenerate a map (DEV_MODE required) 
M - DevRoom :D (╯°□°)╯︵ ┻━┻ 
G - God Mode!
K - Increase MapLevel

Win/Lose conditions

As all roguelikes - you'll die eventually. It's just part of the process. Your score will be written down in LeaderBoards. Try to achieve best score!

Legend

There are multiple tiles with scattered logic all around the board.

# - Chest or RareChest - guaranteed drop of Item, Gold or Health Potion
$ - Mysterious Man - can do good things for you
* - Boss Fight - be prepared!
o - Altar, drop some gold for a buff or curse

Go figure the rest by yourself, see here to get started. No documentation folks :).

Win strategy

  1. Go for Luck > 1
  2. Hoard Chests for life
  3. Try to stay alive (visit ShopTile and AltarTile as often as you can)
  4. Fight small creatures (luck based)
  5. Visit Chests
  6. Go for max Health Regen from buffs
  7. (wait for it, wander around)
  8. Fight BOSS
  9. Die and repeat
  10. PROFIT

API

WHAT THE HECK?! RPG cli game in PHP with API?!

Visit 127.0.0.1/api and check and check out some neat features we're planning, like:

  • complete access to current state of the game being played via API
  • custom, high risk - high reward type one hit dungeons/mazes
  • NPC Dialogue API and CreatureProvider moved to microservice

My plan is to be able to change/update/set state of player dynamically via API. I know I'm far from it because logic is inside loop of the game but ...

php-roguelike's People

Contributors

code-factor avatar dependabot[bot] avatar sebastianluczak avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

php-roguelike's Issues

Upgrade to PHP 8.x

Why

As a developer I want to use new features from the new version of PHP to increase my productivity.

How

We need to bump version in composer and check all libraries.

Create random events based on timer

i.e. if rand(1,6) minutes from last event launch event.
Events are bosses with different mechanics.
Bossess drop keys
Keys are for dungeons scattered in some levels.

DUNGEONS DLC!

Add validator for level complexity

There're ongoing issues with level generator:

  1. Sometimes it does not generate proper level (empty map)
  2. Sometimes it does not create spawn point
  3. Sometimes the complexity is very low

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.