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

  Program that displays the ball at a random

Write a C++ program that displays the ball at a random location and then makes the ball move down to the bottom of the screen. When the ball reaches the bottom of the screen, it should start these actions over again, appear-ing at another random l..

  Write a program code to compute and build a table of reynold

Write a program code to compute and build a table of Reynolds numbers at flow velocities varying from 100 to 1000 ft/sec (at increments of 100)

  Is a void function a function that does not return a value?

Is a void function a function that does not return a value?

  C program to calculate power loss in transmission line

Write program in C to calculate the power loss in transmission line with resistance of 0.05 ohms/mile. Calculate power loss if 500 kW of power is transmitted from power generation station

  Design a deck plan space ship in eclipse

Develop a simple interactive two-dimensional spaceship deck plan editor using OpenGL and GLUT. Your program will enable a user to create and save a deck plan of a hypothetical spaceship comprising the hull walls.

  Wave steepness is the ratio of wave height

Wave steepness is the ratio of wave height (WH) to wave length(WL) and is an indicator of wave stability. When wave steepness exceeds a 1/7 ratio; the wave becomes unstable and begins to break. Assume a data file exits with the following header

  Create a class called point3d

Create a class called Point3D to represent 3D point in space, a class called Sphere and a class called Cylinder. The sphere is characterized by its center point and the radius while the Cylinder can be characterized by its center point, radius and he..

  Define the class bankaccount

Define the class bankAccount to implement the basic properties of a bank account. An object of this class should store the following data: Account holder's name (string), account number (int), account type (string, checking/saving), balance (double),..

  Write a program to open a file for reading

Write a program to open a file for reading that has twenty (20) rows and in each row there are three (3) columns.

  The factorial of a positive integer n, denoted by n!

Write a program that computes the sequence of factorial values: 1! = 1, 2! = 2, 3! = 6, 4! = 24, 5! = 120, 6! = 720, ....

  Execute tests and repetitions

Read data from standard input and store them in an array, Execute tests and repetitions

  Write a function that permanently swaps two integers

Write a function that permanently swaps two integers using pointers.

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