Completed

C++ text adventure game starter code already have, need to go in further detail , only need backend of the program done , also an explanation of whats happening in the code and each part

C++ Text adventure game , ANYONE WHO CAN GIVE ME A LOWER BID THAN £10 I MAY ACCEPT

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 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.

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.

part 3

Since most players will not want to play an entire game at one sitting, most games include save and load (or restore) commands. Implement these commands. They should ask the user for a filename and then write or read the current game state, to or from that file.

Note that the layout and descriptions of rooms, and the list and descriptions of objects, are not part of the game state because they do not change during the game. These should not be included in the save file and saving them will lose marks.

Some important things to think about:

The “game state” may also include the locations of objects the player has dropped in rooms. Would it be a good idea to restructure how object locations are stored?

The State object stores the current room, and objects, using pointers. Pointers cannot safely be written to disk since addresses may be different when the program is reloaded. How can you enable this data to be safely saved and reloaded?

Skills: C++ Programming

See more: Text Based Game, javascript text based game, text based game creator, web text based game, write simple text based game code, text mmo game, text adventure game java command, save text adventure game python, text adventure game bluej, python text based adventure game, text based adventure game bluej, program quest adventure game, text adventure items game bluej, text adventure game bluej source code, text based adventure game, text based adventure game program, c++ text based game, text based game development using c++

About the Employer:
( 0 reviews ) United Kingdom

Project ID: #22095902

Awarded to:

raman10101

I will give the answer in just 1 day. I am expert in c++ programming. Please lets discuss more on this.

£10 GBP in 1 day
(1 Review)
0.2

5 freelancers are bidding on average £28 for this job

wwwTom

Greetings. Thanks for this opportunity. I am a preferred C++ program developer with over 9 years experience and a strong workforce of many Professionals. -My Service Guarantee-- *24*7 hours live support. *Free of cost More

£100 GBP in 2 days
(5 Reviews)
3.6
chunzuo

Hi, I'm Chunzuo.I read your requirements very carefully. I have rich experience C++ programming. Please contact with me to discuss more. Regards

£11 GBP in 7 days
(0 Reviews)
0.0
Aerobics

Hello. I have read your requests and I am interested to start working on your text based adventure game.

£10 GBP in 7 days
(0 Reviews)
0.0
Sripadsahu

Hi, I am an Embedded System Engineer working for a startup. In my college years i have done multiple projects with Raspberry Pi, which requires C,C++ and embedded C, which gave me a good amount of experience and i am More

£10 GBP in 7 days
(0 Reviews)
0.0