GithubHelp home page GithubHelp logo

aelmosalamy / ascii-combat Goto Github PK

View Code? Open in Web Editor NEW
67.0 11.0 15.0 6.09 MB

A simple CLI text adventure game, created for learning purposes, feel free to contribute.

License: MIT License

Python 99.79% Batchfile 0.21%
cli text-based-game python adventure-games help-wanted jump-in up-for-grabs first-timers-friendly

ascii-combat's People

Contributors

aelmosalamy avatar digital-black avatar iamparkerm avatar khalidelassaad avatar nat236919 avatar vexedev avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ascii-combat's Issues

Autocomplete feature

Hello! I was thinking of developing an autocomplete feature. When a user writes go, look, pick, drop, eat and presses tab a specific set of options show up one by one with each press. Does it sound good to you?

select a name

Who is Bori and why can't you select a name from a list and assign it to the player? Could at least offer a wizard, elf, rogue, etc... Want me to submit a PR?

Action Delays aka Transitions

Action delays are a short 3-5 second delays with a centered text displaying 'Loading . . .' or whatever, the point of this is adding slight depth to the game, instead of looking like a website and pages instantly switching pages, the game screen would take sometime to be displayed after specific commands that indicate hard work e.g. moving from one room to another, extracting something from a mine room (Future plans) or when transferring from normal room to a fight/combat

It goes like that

  1. Start screen displaying current room / current user stats
  2. Screen clears and displays Loading with animated dots "." ". ." ". . ."
  3. New screen appears displaying new room or new user stats

Some idea to utilize this feature:

  • Add items like pickaxe/shovel that would slightly reduce extraction time of specific stuff (Future plans)
  • Add some kind of different boots that makes it faster to to traverse types of rooms forest, indoors, mountains so on (Future plans)

Console resizing issue on Linux

I have noticed that the terminal window doesn't resize on Linux (tested) and probably it is the same for all UNIX-based systems, but I'm not sure why is that happening, I recently installed Ubuntu and did some tests on the game. So I am keeping this issue up for now

Dungeon generation!!

ASCII Combat currently needs a "generate_dungeon" function, I will be adding a new attribute to all rooms called "gen" and basically this attribute is an array with 2 elements, the first element is the "generation method" it can be a specific number (This room can be found n times in the dungeon), it can be a percentage (This room have n/100 rarity to be found in a dungeon), or maybe it can be a room which unique (only once) or a room which have a special interaction (this can give chance to introduce new room ideas: Arena, Puzzle Room, etc.. I got some plans in mind ...

Anyway, generate_dungeon pseudo code

  • Loop through all room types in the ROOMS dict and use the gen attribute to calculate how many instances of this room should be in the array available_rooms array
  • Move rooms from the available_rooms array to the dungeon_rooms array while connecting them by automatically setting the NORTH, SOUTH, EAST, WEST, UP, DOWN for each room, Keep adding rooms until there is nothing in available_rooms

This is the next step after implementing combat!

Cannot select which weapon to use

In dungeon.py line 279 it asks which weapon to use, but then only prints the available weapon. Where do you select the weapon? The loop then goes back to the main. I can't initiate the combat.

Bug in if statement

Line 303 in dungeon.py is wrong:

if arg.lower() in (current_room[GROUND] or current_room[SHOP]):

This doesn't work correctly.

It should be more like:

if arg.lower() in current_room[GROUND] or arg.lower() in current_room[SHOP]:

But even that won't work correctly, because sometimes current_room[SHOP] is None.

Pick up multiple items at once

For example in a location there are multiple items that available for picking up:
apple ... coin

So the player could type:
pick apple coin
And those items would get picked up one after another.

EDIT: Same mechanics can be applied to dropping items.

Main game screen

The main game screen even thought it will be text-based, It must be attractive, by attractive I mean colors/options/split views etc.. all of this features can be added with a curses-like TUI module.
I didn't decide yet but options are:

  1. curses itself (Nope, It only works on Unix based systems)
  2. Blessings
  3. Urwid (Nope, Unix based too)
  4. asciimatics

After some research and brainstorming for the actual needs and functionalities to be in the main game screen I will choose one of these modules to adopt in this project.

EDIT: I will choose a library called colorama It supports windows as well as unix, It will be nice to get rid of the monotone hell in the AC's Combat system, I will post a color scheme for the game soon
here is a picture of colorama in use
image

COMBAT: Win/Lose conditions and minor bugs

  • After using command the visual list of available enemies to attack updates, but the actual list of enemies available doesn't update, giving the ability to attack a dead enemy.
  • The game loop correctly check for enemies state - dead or alive - checking user state needs to be implemented along with win and lose output screens.
  • Actions needs to be created and printed inside the combat.Combat.display() function
    e. g 'Minion hit you' or 'You zapped an enemy'

Adding more skills to the combat system

I am planning to add a few extra skills, AC already have Double Trouble and Arrow Storm

Some ideas to be implemented:

(Those are all prototypes for some fancy skills, feel free to give any recommendations)

  • A Freeze/stun skill
    This prevents an enemy from attacking you for n turns while dealing n dmg

  • An insta-execute skill
    This skill executes any enemy immediately, in return, you lose n% of enemy's hp

  • A tough skin skill
    You take -1 less dmg from all enemy attacks for n turns

Those are some ideas I thought off, I think I will postpone implementing them till I deliver the dungeon/exploration system to some kind of stable state.

Combat System: Incomplete

TO BE FIXED:

  • The combat system doesn't respond to user commands
  • Needs a list of different enemies with funny names, different HP/DMG values to be added
  • Needs game-play enhancements and interface layout improvements

Dungeon system features

Introduction

I am intending to create a dungeon/cave system which will act like a gateway into the already complete combat system.

Concept

The dungeon will be the main game entrance, the weapons currently available in combat will be acquired by advancing through the dungeon, the deeper you go, the more you find higher rarity weapons, skills, and of course: stronger combats with stronger monsters, the dungeon map consists of rooms and bridges, A room can be connected to another room directly or by a bridge, Many items can be found in a room: Decorative items with the ability to look/read them, coins/gold, food, weapons, skills and more, if a bridge exists it will contain a *fight you have the choice to accept it or retreat to the previous room, in case accepted and won you advance to next room, else you stay back unable to explore more

User Interaction

The game loop displays a text-based display of each room showing its available exits to other rooms and contents each item in the room got its own ASCII character representation, user navigate through rooms by typing N/S/E/W (North/South/East/West) if no such direction exists the user gets prompted, upon entering each room the room is displayed along with some description, the description includes: room atmosphere e. g. "This room is dark, chilling. you are not feeling good" | description of all things you can see in the room | a random quote taken from a big list of possible quotes your character may say, the user can NOT move in the same room (it isn't a platformer played with arrows obviously) so it will be kind of story based game

Expected Implementation difficulties

Here is some:

  • Room generation
  • Progress saving for the whole state of the dungeon
  • Displaying rooms with ASCII character

Note: This isn't "so hard" but it will need sometime before it is done

So, I guess that is it to do ๐Ÿ˜„

Converting to YAML for storing data

The file ac_dicts.py is getting bigger and is almost getting unreadable, 350+ lines with just 8 items and 5 rooms, so I was thinking about storing and converting all the data into .YAML files using ruamel.yaml and then whenever I am adding new items I add it to the YAML files, It will be more efficient and it will make ASCII Combat's files cleaner and more organized, ac_dicts.py will contain extractor functions and some random utility functions with the main purpose of reading the YAML data

EDIT: I am currently doing some research on either I should use ruamel.yaml or use Python's pickle, currently I give 1 point to YAML for human-readability

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.