Find Jobs
Hire Freelancers

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

£10-12 GBP

In Progress
Posted over 4 years ago

£10-12 GBP

Paid on delivery
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?
Project ID: 22095902

About the project

2 proposals
Remote project
Active 4 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
2 freelancers are bidding on average £10 GBP for this job
User Avatar
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.0 (0 reviews)
0.0
0.0
User Avatar
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 quite confident with that board.I have decent experience with Python too since i have been working on python for past 8 months . I wish to finish this project ASAP and would definitely provide further assistance or support if needed. Looking forward to hearing from you . Thank you, Sripad
£10 GBP in 7 days
0.0 (0 reviews)
0.0
0.0

About the client

Flag of UNITED KINGDOM
Oxford, United Kingdom
5.0
7
Payment method verified
Member since Nov 1, 2019

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.