Assignment in c you will write a program that draws a

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

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: EM13358462

Questions Cloud

Economic formulas are available to compute annual payments : economic formulas are available to compute annual payments for loans. suppose that you borrow an amount of money p and
Piecewise functions are sometimes useful when the : piecewise functions are sometimes useful when the relationship between a dependent and an independent variable cannot
Qestion evaluate e-5 using two approachese-x 1 ndash x : question evaluate e-5 using two approachese-x 1 ndash x x22 ndashx33-----ande-x 1exnbsp 11xx22 x33
Question recall the velocity of the falling parachutist can : question recall the velocity of the falling parachutist can be computed byvt gm1-e-cmxcnbspuse first order error
Assignment in c you will write a program that draws a : assignment in c you will write a program that draws a single level for a rogueshylike computer game. the program will
Case study- the wooden house is it the future of home : case study- the wooden house is it the future of home sector wooden house in france is attached belowquestions to
Problem statementgiven two integers x and y compute the : problem statementgiven two integers x and y compute the product xy multiplication the quotient xy integer division and
Lucille jenkins the ceo for the durham international : lucille jenkins the ceo for the durham international manufacturing company dimco believes that the company can
Dixon audio systems had developed a reputation as a leading : dixon audio systems had developed a reputation as a leading producer of speakers audio systems and car stereos. dixon

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Show what is output by the following segment of code

Show what is output by the following segment of code. Consider the following statements.

  The main function should prompt the user

The main function should prompt the user for the 2 numbers, call the function to display the correct label, then calculate and display the sum of the numbers. Call the function to display the correct label, then calculate and display the differenc..

  Write a function integerpower

Write a function integerPower(base, exponent) that returns the value of base^exponent. For example, integerPower(3, 4) = 3* 3 * 3* 3. Do not use any math library functions.

  Generate a set of 75 random integers in the range -26 to + 4

Write a program that will generate a set of 75 random integers in the range -26 to + 42. The program

  How many times will the inner loops s be executed

How many times will the inner loop's S be executed? Show HOW you got that answer.

  Write a program that reads an array with wind-tunnel test

write a program that reads an array with wind-tunnel test data then allowss the user to enter a flight-path angle. If the angle is within the bounds of the data set, the program should then use linear inteerpolation to compute the corresponding coeff..

  Calculate the component voltages

Calculate the component voltages for the following series resonant RLC circuit

  Write the code

Write a program that allows an instructor to keep a grade book. Each students has scores for exams, homework assignments, and quizzes.

  Prepare an accounting for a dorm''s kitchen

The "purpose" of the program is to prepare an accounting (database) for e.g. a dorm's kitchen, to keep track of the consumption of beer for each room.

  Our string class always deletes the old character buffer

Our String class always deletes the old character buffer and reallocates a new character buffer on assignment or in the copy constructor.

  Write a program that will be used to gather statistical data

Write a program that will be used to gather statistical data about the number of movies

  Refresher on andys basic requirements

The game Battleship is back and better than ever. Instead of hacking everything together in C, you will instead leverage C++ and all of your newly gained object oriented programming knowledge to construct a much cleaner end product.

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