Giter Site home page Giter Site logo

xenonlab-studio / the_dungeon_of_sin Goto Github PK

View Code? Open in Web Editor NEW
4.0 2.0 2.0 828 KB

A fantasy roguelike game similar to Angband and Dwarf Fortress.

License: GNU General Public License v3.0

Python 100.00%
roguelike-game dwarf-fortress rpg-game python3 libtcod tcod windows macos unix linux

the_dungeon_of_sin's Issues

The generic Entity, the render functions, and the map

Now that we can move our little "@" symbol, which represents the player, I have to give him something to move.

At this time, the player with the symbol '@' and its x and y coordinates is simply represented. Should I not tie these things together in an object, along with other data and functions that refer to it?

I create a generic class to represent not only the player, but practically everything in the game world. Enemies, objects and any other foreign entity I can dream of will be part of this class, which I will call Entity.

Interface and message creation (HP Bar + message_log).

The Dungeon of Sin seems more and more playable and complete, but before going on with the gameplay, I have to take a moment to focus on how the project looks.

Despite what traditional roguelike gamer might say, a good user interface is a good thing.

I solve the part about HP. With little code, I can add a small security bar, which tells the player how much health remains before death.

I added some necessary variables in engine.py.

Field of View

Now we have a dungeon and we can move freely. But are we really exploring the dungeon if we can see it all from the beginning?

Most roguelikes (not all!) Only allow you to see within a certain range of your character, and The Dungeon of Sin will not be different. I have to implement a way to calculate the "field of view" for the player and, fortunately, libtcod makes it so easy!

Generating a dungeon

The next step is very important towards a real and working game: create a procedurally generated dungeon!

Items and Inventory

So far, The dungeon of Sin includes movements, exploration of the underground, combat and artificial intelligence.

The next step is the implementation of the items!

Start by putting a type of object, the healing potion in this case, and then I'll work on implementing the inventory. Later, I will add different types of objects, but for now the healing potion will suffice.

Implementation of enemies

What good is a dungeon without monsters to defeat? This commit will focus on placing enemies across the dungeon and setting them to be attacked (the actual attacking side will be saved for the next time). I create a function to place enemies in the dungeon; I call it "place_entities" and place it in the GameMap class.

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.