Code Monkey home page Code Monkey logo

djeada / asciiquest Goto Github PK

View Code? Open in Web Editor NEW
0.0 3.0 0.0 254 KB

Asciiquest is a roguelike dungeon game in which you play as a hero trying to find the exit of a randomly generated dungeon. The game features enemy AI, pathfinding algorithms, multithreading, and the ability to play multiplayer. As you progress through the levels, the enemies will become more difficult to defeat.

License: MIT License

C++ 96.77% C 0.62% CMake 2.62%
game rpg ncurses cmake cpp

asciiquest's Introduction

Asciiquest

Asciiquest is an ASCII-based roguelike game. As the hero @, you're tasked with navigating through a randomly generated dungeon, filled with fearsome enemies and treacherous traps. Along the journey, you'll uncover pieces of a secret story, shaping the destiny of your character. The game can be played in a terminal and features AI enemies, real-time combat, dynamic environment interactions, multiplayer capability, and a compelling narrative.

Screenshot

Peek 2023-07-27 21-58

Features

  • Procedural Dungeon Generation: Each game is a new challenge with levels generated on-the-fly.
  • Real-Time Gameplay: Keep moving, thinking, and fighting your way out of dangerous situations.
  • AI Enemies: Face off against a variety of enemies each with unique characteristics and behaviours.
  • Environment Interactions: Use your surroundings to your advantage, break walls, shoot arrows, set traps, and cast magic spells.
  • Multiplayer Support: Enjoy cooperative gameplay over LAN or Internet.
  • Hidden Story: Uncover a secret narrative as you progress through the levels, adding another layer of depth to your quest.

System requirements

To play Mysterious Dungeon, you need:

  • C++17 compiler
  • NCurses library
  • CMake 3.15 or higher
  • Knowledge of networking for multiplayer (LAN / Internet)

Building and running the game

To build and run Mysterious Dungeon, follow these steps:

  1. Clone the repository: git clone https://github.com/djeada/Asciiquest.git
  2. Navigate to the project directory: cd Asciiquest
  3. Create a build directory: mkdir build
  4. Navigate to the build directory: cd build
  5. Run CMake: cmake ..
  6. Build the game: make
  7. Run the game: ./exe

How to play

The game is controlled using the keyboard. Use the arrow keys or WASD to move the player. Press the spacebar to attack enemies. Press q or ESC to quit the game. Encounter enemies and items as you explore the dungeon. The goal is to find the exit and advance to the next level.

Game design

Mysterious Dungeon combines elements of classic roguelike games with modern algorithms and AI techniques. The dungeon maze, generated with advanced algorithms, creates a unique experience for every game. The enemies, imbued with AI and pathfinding, provide a dynamic challenge. Each level introduces new gameplay elements and tougher enemies, ensuring an engaging experience throughout the game.

game_design

Each AI entity independently requests a path and performs tasks while the path is being calculated. Once the path is ready, the entity is notified and can start following the path. This approach optimizes performance and avoids the main thread from being blocked.

Contributing

Mysterious Dungeon is an open-source project. We welcome contributions from the community! Whether it's bug fixes, new features, or improvements to existing code, your contributions are appreciated. Please open an issue or submit a pull request with your proposed changes.

License

This project is licensed under the MIT license.

asciiquest's People

Contributors

djeada avatar

Watchers

James Cloos avatar  avatar  avatar

asciiquest's Issues

Investigate usage of double buffering

void Controller::run() {
  keypad(stdscr, TRUE);
  nodelay(stdscr, TRUE); 
  isRunning = true;

  // Create a new window for double buffering
  WINDOW *buffer = newwin(0, 0, 0, 0);

  while (isRunning) {
    werase(buffer); 
    handleGameState(buffer); 
    int ch = getch(); 
    if(ch != ERR){
      handleInput(ch, buffer); /
      flushinp(); // clear the input buffer
    }

    wrefresh(buffer);     // Copy the buffer window to the screen, then free up memory
    std::this_thread::sleep_for(std::chrono::milliseconds(30));
  }

  delwin(buffer);
}

Add Display Of Coordinates

Currently, our map interface effectively displays the map area but lacks the capability to show the exact coordinates of a point. This limitation can make it difficult for users to pinpoint specific locations.

  • The coordinate display format should be concise and clear, such as "X: 100, Y: 450".
  • Additionally, display the total dimensions of the map, for example, "Map Size: 1500 x 2000".

Add traps

  • Introduce various traps such as shooting blades, fire hazards, swinging pendulums, or spike pits into the game's map.
  • These traps should be interactive, activating either on a timer, by proximity, or through player interaction.
+--------------------------------+
|                                |
|      s     s     s             | <-- Blades moving to the right
|                                |
| [Player]                       | <-- Player's current position
|                                |
|       s      s      s          | <-- Blades moving to the left
|                                |
+--------------------------------+
+--------------------------------+
|              o o o o           |
|                                |
|              ↓ ↓  ↓ ↓          | <-- Arrows shooting downwards
|                                |
| [Player]                       | <-- Player's current position
|                                |
|                                |
|                                |
+--------------------------------+

Add Movable Objects

Implement movable objects within the game's map interface. These could be characters, vehicles, items, or any other entities relevant to the game.

Implement Magic System with Spell Casting and Visual Effects

  • Develop a range of spells that players can cast, including but not limited to elemental attacks, healing spells, and defensive barriers.
  • Each spell should have a unique visual representation, like different colored ASCII characters (-, |, *) to differentiate between spell types.
  • Implement animations for spell casting and impacts. For example, an expanding series of * characters could visually represent an explosion.

Frame 1 (Spell Casting):
+--------------------------------+
|                                |
|                                |
| [Player]  -->                  | <-- Player casting a spell (a simple '-')
|                                |
|                                |
|                                |
|                                |
+--------------------------------+

Frame 2 (Spell Impact on Wall/Enemy):
+--------------------------------+
|                                |
|                                |
| [Player]             *         | <-- Initial impact (small explosion)
|                                |
|                                |
|                                |
|                                |
+--------------------------------+

Frame 3 (Explosion Expansion):
+--------------------------------+
|                                |
|                                |
| [Player]           ***         | <-- Explosion expanding
|                   *****        |
|                                |
|                                |
|                                |
+--------------------------------+

Frame 4 (Final Explosion):
+--------------------------------+
|                                |
|                                |
| [Player]         *******       | <-- Full explosion
|                  *******       |
|                   *****        |
|                                |
|                                |
+--------------------------------+

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.