Coder Social home page Coder Social logo

fortress's People

Contributors

pkuehne avatar

Watchers

 avatar

fortress's Issues

Create MapManager

  • Create new Tile class
  • class has vector of EntityIDs
  • class has isVisible, isVisited members

Part of #33

Cleanup locally compiled libraries

  • Remove soil install and replace with libsoil-dev
  • Remove glfw install and replace with libglfw-dev
  • Remove glog install and replace with libgoogle-glog-dev

Add caching of position for each entity

Rather than iterating through all the LocationComponents to find all the entities in a particular location, we should provide a cache of (x,y) -> vector (EntitiyID)

Create EquipmentWindow

  • Shows all entities currently equipped by the entity
  • Show access key for all items
  • Right hand command panel for actions:
    • Drop
    • Inspect (DescriptionWindow)
    • Pack (into bag)
  • Grid for all other equipment
    • Arrow selector + Enter

Add Log capability to GameEngine

This is for the log displayed on the MapScreen.

  • Add new function addLog (Style, message)
  • Style represents the color
    • GOOD - green - Something positive happened
    • INFO - white - Something noteworthy happened
    • WARN - amber - Something unusual happened
    • CRIT - red - Something really bad happened
  • Store these messages in vector
  • Return const reference to log vector
  • MapScreen iterates backwards through vector painting logs from bottom to top

Add up/down stairs

  • add new StairComponent with direction member
  • new createStairPrefab with x, y, z and direction
  • Create a LevelSystem
  • When MoveEntityEvent moves player on up or down stair, adjust level on GameEngine, put player on corresponding up/down stair in the new level
  • Going too far up should result in a warning that you can't leave the dungeon
  • Going too far down should result in a win (for now)

Group Entities by Areas

  • When Entities are created, they need to be added to an area
  • Entities are stored in a std::unordered_map<Area, std::unordered_set> m_entities
  • When iterating through Entities, do it on m_entities[getEngine()->getArea()]
  • To change area, update the Engine's Area variable
  • Stairs can have an Area flag instead, which would change the are in the engine.

AboveGround Generator

  • Create a big meadow covering the whole map
  • Add trees
  • Vary the tiles and colours for the grass
  • Add plant bushes
  • Add ponds
  • Add brooks

Create EquipmentSystem

  • Allows Wieldable and Wearable components to be
    • dropped
    • picked-up
    • equipped from bag
    • unequipped to bag
  • Checks existing items in slot

Create Text Wrapping function in Window class

So that long text may be broken over several lines for display. Sample function:

int wrapText (const std::string& text, unsigned int width, unsigned int maxLines) {
    return linesUsed;
}

Start Screen

  • Start New Game
  • Start New Game (with Advanced Parameters)
  • Load Saved Game
  • Play Tutorial
  • Allow hotkey to directly select each action (N, P, S, T)

Generalize Components

  • Make all Components inherit from common base class
  • Replace ComponentManager to keep map of Entity to ComponentBase*
  • Template functions to add and get Components via their Entity (including cast)
  • Check for correct Component via dynamic_cast
  • Attach this Component Manager directly to the GameEngine
  • Replace all existing get calls with the new one

Remove getEntity() call, move tags to dedicated Components, Remove Entity class

Components are essentially tags anyway. There is no need for a raw Entity pointer anywhere. EntityId is already de-facto index into ComponentManager.

  • Change all function declarations to move Entity* to EntityId
  • Move tags to dedicated components (WallComponent, PlayerComponent, NpcComponent)
  • Remove getEntity() call everywhere
  • delete Entity class

Customization of icons for entities

  • Create a new configuration file
  • Add tags like so [WALL_ICON:35] // '#' by default
  • The tag name should match a list in the graphics class
  • The value will be the ASCII index (i.e. 65 for 'a')
  • Change SpriteComponent to use the Graphics enum value, instead of a char
  • Graphics class should only allow enum value to be drawn (with co-ordinates)
  • Enum value will then use the correct character based on the value in the config file
  • Defaults will be hard-coded, but overriden by the config file

Create EquipmentComponent

  • Store Wieldable and Wearable items
  • RightHandWearable, RightHandWieldable, etc
  • Vector of other items, not currently equipped
  • Max carrying weight
  • Attach one to the player and each NPC

Make Systems iterate over Entity list

To ensure that Systems only ever consider the Entities on the same level, make systems (and the map_window, etc) iterate over the list of Entities and check whether they have a particular component key. (i.e. get rid of getAll() calls).

  • MovementSystem
  • MapWindow
  • SpriteSystem
  • Replace with iteration over all Entities and checking the ComponentKey (See #12 )

Add OpaqueComponent

This will indicate whether the object can be seen through or not.
Use it for locakable doors, NPCs, Walls, etc

Scrollable Map

If the map is bigger than the allocated space on the window, it should cut out the section around the player. While bump-scrolling is fun, for now, centering is sufficient.

  • Add x, y offsets for position on the map screen
  • Add x, y offset and map width/height for position within map
  • Add if statements to check offsets and distances
  • Load player x, y co-ordinates and draw map center around it
  • When player moves, the map moves too

Create Potions

Add Potions to the game, such as:

  • Heal Potion (restored health points)
  • Clairvoyance Potion (See the whole map for the level)
  • Smell Potion (See all enemies on the map)
  • Roid Potion (Better attack)

Create a basic DungeonGenerator

Features:

  • Variable map size
  • Variable number of rooms
  • Corridors connecting all rooms
  • Placing of up/down stairs
  • Create random number of Orcs
  • Place Orcs randomly

PrefabCreator for reading basic prefabs from file

Use the ConfigManager to load files, which specify the Components and their values and then create Entities from that. Mainly to be used for new monsters. Walls, tiles, NPCs should still be created by the game through hard-coded prefab generators

  • New folder: prefabs
  • PrefabManager to read all the files in prefabs folder
  • Create prefab files in YAML
  • Create components based on content and put into general pre-fab Node map
  • Let generator create prefabs as createPrefab("Tree");

Retire EventManager

GameEngine already has a list of all systems, so only the events would need to be moved up.

  • Move m_events to GameEngine
  • Move EventManager::raiseEvent directly to GameEngine::raiseEvent
  • Move processEvent to GameEngine
  • Remove registering of handlers
  • Remove event_manager* files

Keyboard remapping

  • create new configuration file for key mappings
  • assign each action an variable
  • default variables to normal keys
  • allow overriding of variables from configuration file
  • use variables instead of the chars

Wall Smoothing during Generator

Instead of adding a system to smooth walls, just smooth them as they are created, when we have the map available for quick reference.

Levels

There should be more than one level per dungeon.

  • Break down Entities by z-level
  • Add z-level to LocationComponent
  • Make location checks support z-levels
  • Add z-level to EntityManager

Start player on up-stair on level 1

  • Remove player placement during generation
  • createPlayerPrefab during level loading
  • Place on up stair in level 1
  • Change generator to place down stair instead of player

Cleanup src folder

  • Move *.png tilesets into dedicated top-level directory
  • Windows directory
  • Components directory
  • Systems directory
  • Engine directory

Everything else can be left in the src directory as is for now

Add doors

  • Add OpenableComponent
  • Store what result of opening/closing is - BecomesOpaque, BecomesPassable
  • interacting uses those properties to change the components on the entity (remove Collidable, etc)
  • Add interact action that looks for OpenableComponent (can be re-used for fight and talk maybe?)

We'll add keys later

Move x, y coordinates into dedicated component

This is currently in the SpriteComponent and should be moved out in a separate LocationComponent.
For example:

  • Equipped items might have a sprite, but no location.
  • Triggers (to be implemented) need a location, but no sprite
  • Create LocationComponent
  • Add LocationComponent to all prefabs
  • Change MovementSystem to use LocationComponent
  • Change map_window to use LocationComponent
  • Remove x, y co-ordinates from SpriteComponent

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.