Buka

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 lebih lanjut: 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, save load flash game, java code text based game, save text adventure game python, jenesis save load game, free php code generator online text based game, text adventure game java command, key code use online game call duty, text based browser game mmo code script, write simple text based game code, javascript text based game, Text Based Game

Tentang Majikan:
( 0 ulasan ) United Kingdom

ID Projek: #15398802

Dianugerahkan kepada:

usmanshery

----------------------------------------------------------------------------------------------------------------------------------------------------------------

£45 GBP dalam 3 hari
(61 Ulasan)
5.2

11 pekerja bebas membida secara purata £50 untuk pekerjaan ini

hbxfnzwpf

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
(70 Ulasan)
6.4
£44 GBP dalam sehari
(26 Ulasan)
4.8
ayesha29

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
(2 Ulasan)
2.1
Devesh23

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
(4 Ulasan)
1.8
DrVideoProd

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)
1.7
skriyaz09

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)
0.0
nishifernandez

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)
0.0
hassannaweed4

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
(0 Ulasan)
0.0
wdebs91

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)
0.0
praita

Hi, I have 5+ years of coding experience. I mastered C/C++, Java programming language and I can make any apps on time. Relevant Skills and Experience - Unity3D - DirectX Proposed Milestones £30 GBP - initial £20 GBP Lagi

£50 GBP dalam 10 hari
(0 Ulasan)
0.0