Draws a single level for a "rogue­like" computer game

Assignment Help C/C++ Programming
Reference no: EM1327198

Assignment in C: You will write a program that draws a single level for a "Rogue­like" computer game. The program will parse a line of input text from an input file (room.txt), use the parsed text to determine the shape of the room and its contents and then draw the room. The input text file will have 6 rooms and your program should draw all six of them. Your program should also allow the user to move the hero around the rooms and pick up the treasure.

Starting

? Play Rogue for a half hour so that you get the idea of what you are building. The source code is in the examples repo.

? The string tokenizer (strtok) will be extremely useful for this assignment. Google has lots of good info about how to use it.

? Set up your assignment folder (A3). Make sure you have all of the required folders (bin, src, include, assets, docs). The input file will go in the assets folder.

? Write a program to read a line from a file and parse the line into the dimensions, doors and items for a room. Musts: do all of these to get a mark greater than zero

? Your solution must take the name of an input file as a command line parameter and use that file to draw the level.

? Your solution must use the character set from Rogue 3.6.3

? Your solution must compile without errors or warnings, must run without crashing or segfaulting

? Your soution must draw at least the outline of the first room in the test file

? Have a README file and a makefile

The Basics: 80%

Expectations for your game

? Correctly draw the room and all of the contents and doors

? Allow the hero to move around the room using the w,a,s,d keys.

? Permit the hero to pick up items by walking over them. Print the list of things the hero has picked up when the program exits.

? Prevent the hero from walking through walls or over monsters. (no need to implement any sort of combat with monsters though)

? Allow the hero to walk onto doors and stairs. Doors should not be picked up and neither should stairs.

? When the hero walks onto a door, move the hero to the room closest to that door (unless you have created a hallway drawing algorithm).Expectations for your code

? Use the ncurses library

? Use structs

? Use dynamically allocated memory and pointers

? Submission folder has src/ include/ docs/ assets/ and bin/ subdirectories that are used properly

? Source code is divided properly into .c and .h files

? Each .c file has the required header (see the policies document)

? Source code is properly indented

? Comments about function input/output and purpose are in .h files

? Comments about algorithm logic are in .c files

? Variable and function names are meaningful and are in camelCase

? A plain text file called README is in the root folder. It contains information about running and using your program as well as any known limitations of the program.

? You have a makefile that will compile your code and place the executable in the bin folder.

? Your code must compile with no error or warning messages using the ­ansi and ­Wall flags in gcc

? Have separate source files for groups of tasks that repeat, such as dealing with operations for the room, parsing, drawing, and reading the file. Have a separate file for main

? your reference list and testing document are in the docs folder and contain appropriate information.

Details about Input File

? The input file will contain six rooms. You should draw the rooms 3 across and 2 down. No room will be larger than 20 rows X 25 columns.

? Each line of the file will consist of a space­delimited line of text, no longer than 150 characters.

? Lines will not have a space at the beginning but may have trailing spaces and may have more than one space between elements.

? Lines will always have a newline at the end.

? The first element of the input string will ALWAYS be the room dimensions give as RowsXColumns (i.e. 10X12)

? The other possible elements can be in any order

? Door elements will begin with a lowercase d followed by a letter representing the wall that the door is in, followed by a position measured from north or west. e.g. de3 is a door in the east wall in position three from the north edge (where the corner is position 0).

? All other elements will begin with a lowercase letter followed by coordinates. i.e. the hero is represented by h6,8 which means that the hero is at position 6, 8 where the north west corner of the room is position 0,0 (rows,columns).

? letters that can occur in room descriptions will be limited to s(stairs), g (gold),m(magic),h(hero), p(potion), w(weapon) and m(monster). The hero will always be in the first room.

? there will never be more than one door in a wall

? You need do only minimal error checking. The input file used for grading will not contain intentional errors. You should check that the items and heros dont start in the wall and that doors are actually in the wall. adjust items by the minimum number of spaces necessary if there are errors.

? The dimensions of a room include the walls. A 10X16 room has a floor area of 8X14

? 10X16 de4 dw9 ds8 g8,7 m3,4 h6,5 p2,2 is one possible example of a room description Enhancements: 20% You can doseveral enhancements partially, or you can do one or two really thoroughly and get a good mark either way.

? write an algorithm to connect rooms with hallways

? implement combat with monsters

? allow monsters to move randomly within the level

? write an algorithm to generate a new level randomly. When the hero walks over the stairs, go to your new level.

? make an inventory tracking system that can be accessed during game play

? allow the player to use the items that have been picked up

? allow the player to save progress and reload from the save point

? implement different types of monsters that behave differently from one another

Reference no: EM1327198

Questions Cloud

Write a program to compute a : Write a program to compute A. Test it with P = $55,000 and interest rate of 6.6% (i = 0.066). Compute results for n = 1, 2, 3, 4, and 5 and display the results as a table with headings and columns for n and A
Develop a well-structured function : Develop a well-structured function to compute v as a function of t. Then use this function to generate a table of v versus t for t = -5 to 50 at increments of 0.5.
Compare with the true value : compare with the true value of 6.737947 x 10 -3  . Use 20 terms to evaluate each series and compute true and approximate relative errors as terms are added.
Recall the velocity of the falling parachutist : Question: Recall the velocity of the falling parachutist can be computed by  V(t) = gm(1-e -c/mx )/c,  Use first order error analysis to estimate the error of v at t=6. If g=9.8 and m=50 but c=12.5 +_ 1.5
Draws a single level for a "rogue­like" computer game : You will write a program that draws a single level for a "Rogue­like" computer game. The program will parse a line of input text from an input file (room.txt), use the parsed text to determine the shape of the room and its contents and then draw the ..
Case study-sector wooden house in france : Case Study- The wooden house is it the future of "home", Sector wooden house in France, answers the questions below
Compute the product xy : Given two integers X and Y compute the product XY (multiplication), the quotient X=Y (integer division), and the modulus X (mod Y) (remainder).
Briefly describe dimco''s supply chain : Briefly describe DIMCO's supply chain, What are the advantages that DIMCOO can gain by implementing supply chain management?
Identify the pros and cons : Identify the pros and cons of a JIT relationship from D&D's point of view, Identify the pros and cons of a JIT relationship from Dixon Plastics point of view, What factors should Dixon and D&S consider before making a decision on the relationship?

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Insert the missing code in the c program

You are to insert the missing code in the C program given for combinational equivalence checking. This program will interface with the CUDD package and will parse netlist files in ISCAS85 circuit format. Next, BDDs will be created for each circuit an..

  Time conversion

Write a C++ program that takes an Eastern standard time in hours, minutes, and seconds,and prints it out in Central time, Mountain time, or Pacific time.

  C++ programming uml diagrams

The goal of this lab is to better familiarize you with polymorphism and the factory design pattern, two key components in Assignment

  Prepare a program that uses at least two functions

Prepare a program that uses at least two functions that can be called from your main.

  Calculate the trajectory of a soccer ball

Write a program to calculate the trajectory (flight path) of a soccer ball

  Represent an instruction supported by simpletron

Implementation contains a Simpletron class and several supporting Instruction classes

  A constructor and a destructor

A constructor and a destructor, Insert a new element chosen by the user at the correct place in the list

  A hierarchical jpeg encode decoder for greyscale images

This project is to develop a program that implements a hierarchical JPEG encoder/decoder for greyscale images.

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Model-view-controller

Explain Model-View-Controller paradigm

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Write a driver program called testrationalnumber.cpp

Write a driver program called testRationalNumber.cpp to test each of the above functions and overloaded operators in the RationalNumber class.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd