Skip to content
Snippets Groups Projects
Commit 86bdfe5d authored by Ian Prins's avatar Ian Prins
Browse files
# Conflicts:
#	Doc/SRS/SRS.pdf
#	Doc/SRS/SRS.tex
parents ebf82d77 af6c422c
No related branches found
No related tags found
No related merge requests found
\BOOKMARK [1][-]{section.1}{Team Meeting Plan}{}% 1
\BOOKMARK [1][-]{section.2}{Team Communication Plan}{}% 2
\BOOKMARK [1][-]{section.3}{Team Member Roles}{}% 3
\BOOKMARK [1][-]{section.4}{Git Workflow Plan}{}% 4
\BOOKMARK [1][-]{section.5}{Proof of Concept Demonstration Plan}{}% 5
\BOOKMARK [1][-]{section.6}{Technology}{}% 6
\BOOKMARK [1][-]{section.7}{Coding Style}{}% 7
\BOOKMARK [1][-]{section.8}{Project Schedule}{}% 8
\BOOKMARK [1][-]{section.9}{Project Review}{}% 9
......@@ -44,6 +44,7 @@
09/28/16 & 1.0 & initial setup\\
10/02/16 & 1.0 & Continued setup\\
10/07/16 & 1.0 & Fleshing out section 1\\
10/07/16 & 1.1 & Functional reqs + risks\\
\bottomrule
\end{tabularx}
\end{table}
......@@ -59,22 +60,23 @@ project template given.
\section{Project Drivers}
\subsection{The Purpose of the Project}
\subsection{The Purpose of the Project}
The goal of the project is to produce a reimplementation of the orignal Rogue computer game, originally developed by Michael Toy, Glenn Wichman, and Ken Arnold in 1980. The gameplay of the reimplementation should mimic that of the original whenever possible. The objective of the rewrite is to produce a copy in a modern language, using modern design principles, with superior documentation and a full test suite. The original Rogue is of historical interest as it forms the foundation and is the namesake of the roguelike genre of games, typified by their randomized environments, difficulty, and permadeath features. The motivation for this project is the poor condition of the original source code. The original source was not written with readability in mind, and designed for extremely low-performance systems who required some unusual design patterns. The version of C in which it was written is very old, which hinders compilation or feature extension. The intended audience for this document is the stakeholders of this project, especially Dr Smith and the 3XA3 TAs.
The goal of the project is to produce a reimplementation of the original Rogue computer game, originally developed by Michael Toy, Glenn Wichman, and Ken Arnold in 1980. The gameplay of the reimplementation should mimic that of the original whenever possible. The objective of the rewrite is to produce a copy in a modern language, using modern design principles, with superior documentation and a full test suite. The original Rogue is of historical interest as it forms the foundation and is the namesake of the roguelike genre of games, typified by their randomized environments, difficulty, and permadeath features. The motivation for this project is the poor condition of the original source code. The original source was not written with readability in mind, and designed for extremely low-performance systems who required some unusual design patterns. The version of C in which it was written is very old, which hinders compilation or feature extension. The intended audience for this document is the stakeholders of this project, especially Dr Smith and the 3XA3 TAs.
\subsection{The Stakeholders}
\subsection{The Stakeholders}
\subsubsection{The Client}
\subsubsection{The Client}
The client of the project is Dr Spencer Smith. Dr Smith commissioned the project and will be overseeing its production. Dr Smith provides the specifications for this document, as well as other aspects of the project, including the test suite, and all documenation. In addition he will be evaluating the final product.
The client of the project is Dr Spencer Smith. Dr Smith commissioned the project and will be overseeing its production. Dr Smith provides the specifications for this document, as well as other aspects of the project, including the test suite, and all documentation. In addition he will be evaluating the final product.
\subsubsection{The Customers}
\subsubsection{The Customers}
The project customers are the players of the game. It is expected that this will consist primarily of players of the original, as well as players and developers of later roguelike games. The roguelike community has a strong open-source tradition, so a modern, well-documented Rogue could be a valuable starting point or inspiration for projects by other teams.
The project customers are the players of the game. It is expected that this will consist primarily of players of the original, as well as players and developers of later roguelike games. The roguelike community has a strong open-source tradition, so a modern, well-documented Rogue could be a valuable starting point or inspiration for projects by other teams.
\subsubsection{Other Stakeholders}
\subsubsection{Other Stakeholders}
<<<<<<< HEAD
Other stakeholders include playtesters of the game, as well as the 3XA3 TAs. Playtesters of the game will be recruited to play the game, and therefore have stake in the success of the project. The 3XA3 TAs will be evaluating the success of the project, as well as providing feedback and guiding the project while it is still in development.
\subsection{Mandated Constraints}
......@@ -82,69 +84,151 @@ Other stakeholders include playtesters of the game, as well as the 3XA3 TAs. Pla
As a constraint imposed by the project client, there are a number of deadlines for the project throughout its development. In particular, the final demonstration of functionality will be on november the 30th, and the final draft of the project documentation must be produced by the 8th of december. The goal of replicating the gameplay of the original without significant change restricts the platforms for which the project can be developed. In particular, the interface for the original is extremely ill-suited to touch-input environments such as phones and tablets.
\subsection{Naming Conventions and Terminology}
=======
\subsection{Mandated Constraints}
\subsection{Relevant Facts and Assumptions}
\subsection{Naming Conventions and Terminology}
>>>>>>> origin/master
\subsection{Relevant Facts and Assumptions}
<<<<<<< HEAD
It is assumed users will be utilizing the product in a 64 bit Linux environment, with a keyboard and monitor of at least [INSERT DIMENSIONS]. Users are assumed to be at least moderately familiar with the original, no extra material describing how to play the game is planned to be produced.
User characteristics should go under assumptions. [DELETE]
=======
User characteristics should go under assumptions.
>>>>>>> origin/master
\section{Functional Requirements}
\subsection{The Scope of the Work and the Product}
\subsubsection{The Context of the Work}
\subsubsection{Work Partitioning}
\subsubsection{Individual Product Use Cases}
\subsection{Functional Requirements}
\subsection{The Scope of the Work and the Product}
Not sure about this section
\subsubsection{The Context of the Work}
\subsubsection{Work Partitioning}
\subsubsection{Individual Product Use Cases}
\subsection{Functional Requirements}
This section will specify the functional requirements of the Rogue++ project. They are numerous, scattered, and interdependent, therefore an attempt shall be made to organize them into cascading, logical segments.
\subsubsection{Basic mechanics}
\begin{itemize}
\item The player should be able to start a new game
\item The player should be able to save the current game by name
\item The player should be able to load previous games by name
\item The player should be able to quit the game
\item The player must always begin with the default level 1 hero
\item The player must always see their hero's statistics
\item The game must wait until the user takes an action to manipulate the environment
\end{itemize}
\subsubsection{Interaction}
\begin{itemize}
\item The player should be able to view detailed information about:
\begin{itemize}
\item The hero
\item The surrounding environment
\end{itemize}
\item The player should be able to pass the turn
\item The player should be able to walk around
\item The player should be able to open and close doors
\end{itemize}
\subsubsection{The Dungeon}
\begin{itemize}
\item The player must begin at the dungeon's first level
\item The game must generate each dungeon level one at a time
\item Each level must have a downwards staircase
\item Every level must generate rooms, corridors, monsters, treasure, and traps
\item The player must be able to see in a 3x3 square centered on the hero
\item The player must be able to see the entire room the hero is in, if the hero is in a room
\item The player should see the outline of dungeon areas previously explored
\item The player should be able to search for hidden doors
\item The player should not be able to see hidden doors without explicitly searching for them
\end{itemize}
\subsubsection{Equipment}
\begin{itemize}
\item The game should maintain an inventory of player items
\item The player should be able to view the inventory
\item The game should limit the player's inventory based on the weight of its contents
\item The player should be able to add, drop, use, hold, and remove objects from the inventory
\item Scrolls, rings, and wands should have meaningless names until identified
\item The player should be able to identify items
\item The player should not be able to remove cursed items
\end{itemize}
\subsubsection{Combat}
\begin{itemize}
\item Each monster must have its own statistics
\item Each monster must calculate a plan of action
\item Monsters must only attack the player, not other monsters
\end{itemize}
\section{Non-functional Requirements}
\subsection{Look and Feel Requirements}
\subsection{Look and Feel Requirements}
\subsection{Usability and Humanity Requirements}
\subsection{Usability and Humanity Requirements}
\subsection{Performance Requirements}
\subsection{Performance Requirements}
\subsection{Operational and Environmental Requirements}
\subsection{Operational and Environmental Requirements}
\subsection{Maintainability and Support Requirements}
\subsection{Maintainability and Support Requirements}
\subsection{Security Requirements}
\subsection{Security Requirements}
\subsection{Cultural Requirements}
\subsection{Cultural Requirements}
\subsection{Legal Requirements}
\subsection{Legal Requirements}
\subsection{Health and Safety Requirements}
\subsection{Health and Safety Requirements}
This section is not in the original Volere template, but health and safety are
issues that should be considered for every engineering project.
This section is not in the original Volere template, but health and safety are
issues that should be considered for every engineering project.
\section{Project Issues}
\subsection{Open Issues}
\subsection{Open Issues}
\subsection{Off-the-Shelf Solutions}
\subsection{New Problems}
\subsection{Off-the-Shelf Solutions}
\subsection{Tasks}
\subsection{New Problems}
\subsection{Migration to the New Product}
\subsection{Tasks}
\subsection{Risks}
\subsection{Migration to the New Product}
\begin{itemize}
\item \textbf{Computer Usage Risks} - There are several risks associated with computer usage. This is often a subject matter that is discussed thoroughly in an office environment, where computers see frequent, daily usage.
\begin{itemize}
\item When using a computer, there is an ergonomic risk involved. Improper usage of the computer can lead to aches in various parts of the body, including back, neck, hands, and chest.
\item There is also a significant risk of eye aches, along with other vision problems.
\item Repetitive motion is another factor that could cause discomfort when using a computer.
\end{itemize}
\item \textbf{Offensive Content} - The game draws heavily from fantasy, involving themes of violence, fear, and witchcraft. While these elements are only displayed in a textual context, certain cultures and societies may find such elements offensive or disturbing.
\item \textbf{Anger} - The game is not easy. Frustration could easily overcome the player, especially when he/she has progressed far into the game. Anger management issues are widespread, and evidence of anger due to video games is easily found.
\end{itemize}
\subsection{Risks}
\subsection{Costs}
\subsection{Costs}
\subsection{User Documentation and Training}
\subsection{User Documentation and Training}
\subsection{Waiting Room}
\subsection{Waiting Room}
\subsection{Ideas for Solutions}
\subsection{Ideas for Solutions}
\newpage
......@@ -159,10 +243,10 @@ issues that should be considered for every engineering project.
This section has been added to the Volere template. This is where you can place
additional information.
\subsection{Symbolic Parameters}
\subsection{Symbolic Parameters}
The definition of the requirements will likely call for SYMBOLIC\_CONSTANTS.
Their values are defined in this section for easy maintenance.
The definition of the requirements will likely call for SYMBOLIC\_CONSTANTS.
Their values are defined in this section for easy maintenance.
\end{document}
\ No newline at end of file
......@@ -34,12 +34,12 @@
<taskproperty id="tpd8" name="coordinator" type="default" valuetype="text"/>
<taskproperty id="tpd9" name="predecessorsr" type="default" valuetype="text"/>
</taskproperties>
<task id="23" name="Requirements Document" color="#cccc00" meeting="false" start="2016-09-30" duration="5" complete="0" expand="true">
<task id="26" name="Draft" color="#cccc00" meeting="false" start="2016-09-30" duration="4" complete="0" expand="true">
<task id="23" name="Requirements Document" color="#cccc00" meeting="false" start="2016-09-30" duration="7" complete="0" expand="true">
<task id="26" name="Draft" color="#cccc00" meeting="false" start="2016-09-30" duration="5" complete="0" expand="true">
<depend id="38" type="2" difference="0" hardness="Strong"/>
</task>
<task id="38" name="Edit + Polish" color="#cccc00" meeting="false" start="2016-10-06" duration="1" complete="0" expand="true"/>
<task id="68" name="Due: Requirements Document" color="#cccc00" meeting="true" start="2016-10-07" duration="0" complete="0" expand="true"/>
<task id="38" name="Edit + Polish" color="#cccc00" meeting="false" start="2016-10-07" duration="2" complete="0" expand="true"/>
<task id="68" name="Due: Requirements Document" color="#cccc00" meeting="true" start="2016-10-11" duration="0" complete="0" expand="true"/>
</task>
<task id="51" name="Development" color="#cc3300" meeting="false" start="2016-10-10" duration="37" complete="0" expand="true">
<task id="53" name="Early Development" color="#cc3300" meeting="false" start="2016-10-10" duration="5" complete="0" expand="true">
......
#include "include/coord.h"
#include "include/feature.h"
Feature::Feature(char symbol, Coord coord)
: symbol(symbol)
, coord(coord)
{}
char Feature::getChar() {
return symbol;
}
Coord Feature::getCoord() {
return coord;
}
#include "include/goldpile.h"
#include "include/coord.h"
#include "include/feature.h"
GoldPile::GoldPile(Coord pos, int amount)
: position(pos)
: Feature('*', pos)
, amount(amount)
{}
Coord GoldPile::getPosition() {
return position;
}
{}
int GoldPile::getAmount() {
return amount;
......
#pragma once
#include "coord.h"
class Feature {
public:
Coord getCoord();
Feature(char, Coord);
char getChar();
private:
char symbol;
Coord coord;
};
#include "coord.h"
#include "feature.h"
#ifndef GOLDPILE_H
#define GOLDPILE_H
class GoldPile {
class GoldPile : public Feature {
public:
GoldPile(Coord, int);
Coord getPosition();
int getAmount();
private:
Coord position;
int amount;
};
......
#include "coord.h"
#include "feature.h"
#include <string>
#ifndef ITEM_H
#define ITEM_H
class Item {
class Item : public Feature {
public:
enum Location {OnGround, InPack};
enum Identified {Known, Unknown};
Item(Location, Identified, Coord, std::string);
Coord getCoord();
Item(char, Location, Identified, Coord, std::string);
std::string getName();
Location getLocation();
Identified isIdentified();
......
#pragma once
#include <vector>
#include "coord.h"
#include "terrain.h"
#include "random.h"
#include "playerchar.h"
#include "goldpile.h"
#include "room.h"
#ifndef LEVEL_H
#define LEVEL_H
class Room;
class Level {
public:
......@@ -21,11 +23,10 @@ class Level {
const double GOLD_CHANCE = .333;
const Coord SIZE = Coord(80, 25);
std::vector<std::vector<Terrain> > tiles;
std::vector<Room> rooms;
std::vector<Mob> mobs;
std::vector<GoldPile> golds;
int genGoldAmount(Generator);
Coord size;
int depth;
};
#endif
......@@ -6,7 +6,10 @@
class Mob {
public:
Mob(std::string, Coord);
Mob(std::string, Coord, int);
int getHP();
void setHP();
int getMaxHP();
Coord& getCoord();
void setCoord(Coord);
int& operator[](int);
......@@ -14,6 +17,7 @@ class Mob {
private:
std::string name;
Coord coord;
int HP, maxHP;
};
#endif
......@@ -10,16 +10,15 @@ class PlayerChar : public Mob {
public:
PlayerChar(Coord);
int getStrength();
int getMaxStrength();
int getArmor();
int getGold();
int getHP();
int getMaxHP();
int getLevel();
bool foundAmulet();
int maxDelved();
private:
const int START_HP=10, START_ARMOR=0, START_STR=1, START_GOLD=0, START_LEVEL=1;
int HP, maxHP, armor, strength, gold, level;
const int START_HP=10, START_ARMOR=0, START_STR=15, START_GOLD=0, START_LEVEL=1;
int armor, strength, maxStrength, gold, level;
ItemZone backpack;
bool hasFoundAmulet;
int maxDepth;
......
#pragma once
#include "coord.h"
#include "level.h"
class Level;
class Room {
public:
enum Darkness {DARK, LIT};
enum Treasure {TREASURE, WORTHLESS};
enum Hidden {HIDDEN, VISIBLE};
Room(Coord, Coord, Darkness, Treasure, Hidden);
Room(Coord, Coord);
Coord operator[](int);
void dig(Level&);
......@@ -11,4 +19,7 @@ class Room {
private:
Coord topLeft;
Coord bottomRight;
Darkness isDark;
Treasure isTreasure;
Hidden isHidden;
};
......@@ -13,4 +13,9 @@ class Wall : public Terrain {
Wall();
};
class Corridor : public Terrain {
public:
Corridor();
};
#endif
#include "include/item.h"
Item::Item(Location loc, Identified id, Coord coord, std::string name)
: location(loc)
Item::Item(char symbol, Location loc, Identified id, Coord coord, std::string name)
: Feature(symbol, coord)
, location(loc)
, knowledge(id)
, coord(coord)
, name(name)
{}
Coord Item::getCoord() {
return coord;
}
std::string Item::getName() {
return name;
}
......@@ -25,4 +21,4 @@ Item::Identified Item::isIdentified() {
bool Item::operator==(const Item& other) const {
return this == &other;
}
\ No newline at end of file
}
......@@ -49,10 +49,13 @@ void Level::generate(PlayerChar player) {
Coord roomPosition, roomSize;
do {
roomSize = Coord(4+gen.intFromRange(0, maxRoomSize[0]-4), 4+gen.intFromRange(0, maxRoomSize[1]-4));
Coord positionRand = Coord(gen.intFromRange(0, maxRoomSize[0] - roomSize[0]), gen.intFromRange(0, maxRoomSize[1] - roomSize[1]));
Coord positionRand = Coord(gen.intFromRange(0, maxRoomSize[0] - roomSize[0]),
gen.intFromRange(0, maxRoomSize[1] - roomSize[1]));
roomPosition = boxTopLeft + positionRand;
} while (roomPosition[1] == 0);
Room curRoom = Room(roomPosition, roomPosition + roomSize);
Room::Darkness isDark = gen.intFromRange(0, 10) < depth - 1 ? Room::DARK : Room::LIT;
Room curRoom = Room(roomPosition, roomPosition + roomSize,
isDark, Room::WORTHLESS, Room::VISIBLE);
curRoom.dig(*this);
//put gold in current room
if (gen() < GOLD_CHANCE && (!player.foundAmulet() || depth >= player.maxDelved())) {
......@@ -61,5 +64,7 @@ void Level::generate(PlayerChar player) {
golds.push_back(GoldPile(goldPos, goldAmount));
}
//put monsters in current room
rooms.push_back(curRoom);
}
}
......@@ -2,11 +2,21 @@
#include "include/coord.h"
#include <string>
Mob::Mob(std::string name, Coord coord)
Mob::Mob(std::string name, Coord coord, int hp)
: name(name)
, coord(coord)
, HP(hp)
, maxHP(hp)
{}
int Mob::getHP() {
return HP;
}
int Mob::getMaxHP() {
return maxHP;
}
Coord& Mob::getCoord() {
return coord;
}
......
......@@ -4,26 +4,16 @@
#include "include/coord.h"
PlayerChar::PlayerChar(Coord pos)
: Mob("@Rogue", pos)
, HP(START_HP)
, maxHP(START_HP)
: Mob("@Rogue", pos, START_HP)
, armor(START_ARMOR)
, strength(START_STR)
, maxStrength(START_STR)
, gold(START_GOLD)
, level(START_LEVEL)
, backpack(ItemZone())
, hasFoundAmulet(false)
, maxDepth(1)
{}
int PlayerChar::getHP() {
return HP;
}
int PlayerChar::getMaxHP() {
return maxHP;
}
int PlayerChar::getArmor() {
return armor;
......
......@@ -5,9 +5,16 @@
#include <string>
Room::Room(Coord topLeft, Coord bottomRight)
: Room(topLeft, bottomRight, LIT, WORTHLESS, VISIBLE)
{}
Room::Room(Coord topLeft, Coord bottomRight, Darkness dark, Treasure treas, Hidden hid)
: topLeft(topLeft)
, bottomRight(bottomRight)
{}
, isDark(dark)
, isTreasure(treas)
, isHidden(hid)
{}
Coord Room::operator[](int corner) {
if (corner == 0) {
......
......@@ -8,3 +8,7 @@ Floor::Floor()
Wall::Wall()
: Terrain('#', Terrain::Opaque, Terrain::Blocked)
{}
Corridor::Corridor()
: Terrain('+', Terrain::Corridor, Terrain::Passable)
{}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment