C++ text adventure game starter code already have

C++ Text adventure game

"Text adventures", now called "interactive fiction", were among the first type of computer game ever produced. These games have no graphics; the player reads the story of the game in text, and decides what their character will do by typing commands at a prompt. Although less popular now, text adventures are still played and created, and developed into the original online RPGs (MUDs). You can play some sample text adventures here:

Colossal Cave Adventure - this was the very first text adventure, written in 1976 by Crowther and Woods. This is an online emulated version.

Some modern text adventures: A Change in the Weather, Spider and Web, Curses, Slouching Towards Bedlam

For this work, you will be creating a simple game engine for a text adventure. Note that you are not required to write an actual adventure, only the back-end program code that would support one. You will need to add some material to the program in order to test it, but this may just be simple test material. You may add interesting descriptions or stories to your program if you want to, but there are no marks for doing so.

You are provided with a CLion project containing a very simple game harness which supports only two commands: going north (north or n), and quitting (quit). Extend it by doing the exercises below. Note that the later exercises are less explicitly described than the earlier ones, meaning that you must solve more problems yourself. This is intentional.

Part 1

In the current system you can only move North. Extend the engine to allow movement in all four compass directions.

• Add properties to the Room class for storing east, south, and west exits. These properties will need accessor methods.

• Add code to the gameLoop method to understand the commands east, south, and west(and the abbreviations e, s and w) and to handle them in a similar way to north.

• Modify initRooms to create more rooms using the new exits in order to test your code.

• Can you find a more elegant way of implementing these exits without repeating code?

Part 2

A key part of most text adventure games is the ability to move objects around. Objects can be found in rooms and can be picked up and put down by the player. Add this capability to the game engine.

• Create an GameObject class. It should contain at least a short name, a long description, and a keyword (for the player to use when typing commands).

• Extend the Room class so that each Room includes a list of GameObjects in the room.

• Extend the State class to include a list of GameObjects the player is carrying, called inventory.

• Extend the Room::describe() method to also print out the short names of all the objects in the room, formatted as nicely as possible.

• Modify the gameLoop method to pay attention to the second word of the command the player enters, if there is one.

• Modify the gameLoop command to search through a) objects in the current room, and b) objects in the inventory, for an object with a keyword matching the second word of the command the player typed.

• Implement the player command get which, when typed with an object keyword, will move that object from the current room list into the inventory. It should display appropriate errors if the object is not in the room or the object does not exist.

• Implement the player command drop which, when typed with an object keyword, will move that object from the inventory into the current room list.

• Implement the player command inventory which will print out the short names of all the objects in the inventory.

• Implement the player command examine which, when typed with an object keyword, will print out the long description of that object.

• Modify initRooms to create some GameObjects and put them in the rooms. Use this to test your program.

Kemahiran: Pengaturcaraan C++

Lihat lagi: text adventure in c, c++ text based adventure game source code, c++ text based game source code, text game programming, text based game in c, c++ text adventure tutorial, c++ text based game tutorial, how to make a text based rpg in c++, text based game development using c++, c++ text based game, text based adventure game program, text based adventure game, text adventure game bluej source code, text adventure items game bluej, text based adventure game bluej, rpg text based game php source code, python text based adventure game, text adventure game bluej, adventure game corona sdk code, adventure game code

Tentang Majikan:
( 2 ulasan ) Sheffield, United Kingdom

ID Projek: #15398802

Dianugerahkan kepada:



£45 GBP dalam 3 hari
(69 Ulasan)

10 pekerja bebas membida secara purata £50 untuk pekerjaan ini


I am very proficient in c and c++. I have 16 years c++ developing experience now, and have worked for more than 7 years. My work is online game developing, and mainly focus on server side, using c++ under Linux environ Lagi

£70 GBP dalam sehari
(79 Ulasan)
£44 GBP dalam sehari
(29 Ulasan)

depends on work Relevant Skills and Experience i have degree in computer science anddone many projects in C++ i have made similar projects Proposed Milestones £55 GBP - 1

£55 GBP dalam 5 hari
(6 Ulasan)

If you are looking for someone has some gaming experience than I bet I am the one who can accomplish this task for you. I can do this in minimum time frame while meeting all your requirements. Relevant Skills and Expe Lagi

£44 GBP dalam 10 hari
(5 Ulasan)

I'm proficient in C++ and it's OOP concepts, I am also a gamedev as a hobby. Aptitudini și experiență relevante Advanced C++, general OOP concepts and C++ particularities Plăți intermediare propuse £38 GBP - Implemen Lagi

£38 GBP dalam 10 hari
(2 Ulasan)

I will prefer you to give me the initial code so that i give it a try for the first part of the game and if i can handle it we can go further and discuss the terms about the project if you are satisfied with the sample Lagi

£50 GBP dalam 4 hari
(1 Ulasan)

I have been working as a software developer for more than two years on C++ and having good knowledge of algorithms and data structures

£70 GBP dalam 3 hari
(0 Ulasan)

I am have more than 6 years of experience in c++ programming and I will assure that I will deliver the project in time

£44 GBP dalam 10 hari
(0 Ulasan)

I propose to complete this within three days time. I already have made my own engine for a text adventure game in C. Creating this engine sounds really fun to me so I’ll be putting most of my attention on this project Lagi

£44 GBP dalam 3 hari
(0 Ulasan)