[SOLVED] DrRacket: CISC 108 Project 2

$25

File Name: DrRacket:_CISC_108_Project_2.zip
File Size: 263.76 KB

5/5 - (1 vote)

Project 2:

Again, the goal is to practice designing a large program, with multiple functions, using iterative refinement, and no specific directives from us as to how to represent data or how to break up the problem. You cannot do more than one Project Two. You CAN get extra credit by doing a harder project from this list!! Pick something that will be interesting to you!!

It is more important to follow the design recipe (data design, data examples, templates, contracts, purpose statements, and unit tests) than to finish every last bell and whistle. You will be graded primarily on the maintainable structure of your code, not on efficiency. That being said, videogame projects like Asteroids may require some thought as to efficiency AFTER you get you code working (slowly). Data structs that are no longer needed for calculations or display should be removed from the World.

You may use whatever images you wish for the pieces of the games, please cite appropriately in your source code.

Honors students should be choosing from 150+ point projects; you should ideally be proposing your own project.

Project 2a: Snake [100 points]

Wormalso known as Snakeis one of the oldest computer games. When the game starts, a worm and a piece of food appear. The worm is moving toward a wall. Dont let it run into the wall; otherwise the game is over. Instead, use the arrow keys to control the worms movements. The goal of the game is to have the worm eat as much food as possible. As the worm eats the food, it becomes longer; more and more segments appear. Once a piece of food is digested, another piece appears. The worms growth endangers the worm itself, though. As it grows large enough, it can run into itself and, if it does, the game is over, too.

The above figure displays a sequence of screen shots that illustrates how the game works in practice. On the left, you see the initial setting. The worm consists of a single red segment, its head. It is moving toward the food, which is displayed as a green disk. The screen shot in the center shows a situation when the worm is about to eat some food. In the right-most screen shot the worm has run into the right wall. The game is over; the player scored 11 points.

You can read more in the HTDP/2e book at section 4.5.2. This project covers exercises 170174, and then some additional fun

For Full credit, you should generate three kinds of food. Besides the normal food described above, also provide:

  • shrinking food: When the snake eats this kind of food, its size is halved
  • foody food: When the snake eats this kind of food, 10 new pieces of food are added to the

    board.
    Feel free to use a different number than 10 (but at least two!) if it matches your game style better.

    Playtest. 10% shinking food, 10% foody food, and 80% normal seems about right, but again playtest. You may also want to alter the timing of the game for playability/fun (you can do this with big-bang itselfcheck the Help Desk).

    Project 2b: Asteroids [130 pts]

    Based on the classic video game. My feelings are that the essential features are the ship movement (there is loss of momentum) and firing, and the asteroids themselves; representing these as circles is fine (i.e. a large circle when hit may break into 2-4 medium circles, which break into 2-3 small circles which then can be destroyed, and scoring.

    Project 2c: Tetris [130 pts]

    Based on the classic computer game. Here I see the essentials as pieces dropping into place, rotating the pieces, clearing a row, rows advancing, and scorekeeping. Recursive gravity should be easy in ISL, no?? [Joke! Sort of!]

    Project 2d: A Psych Experiment: Muller-Lyer Illusion [150 pts]

    Create a platform for measuring your friends response to the classic Muller-Lyer illusion. This web page gives a good example of an experiment that shows the linear effect of the arrowhead angle on the amount people misjudge the size of the lines: http://opl.apa.org/Experiments/About/ AboutMuller-Lyer.aspx
    I dont think you need the smallerlarger slider; just use the arrow keys to make the line smaller or larger, and provide another key for OK (put some instructions on the window). Do follow the experimental design of doing two repetitions of each of the 11 arrow angles. Write the results out to a CSV file to analyze in Excel or JMP. OR, For another 20 points, do the analysis inside of Racket (contact me and Ill point you to a built-in graphing package)

Feel free to choose a different Psychology experiment (talk with us briefly first). The site http://opl.apa.org/Experiments/CategoricalList.aspx has several other possible experiments to program (e.g. the Stroop Effect)!!!

Project 2e: Chat Noir [200 pts]

Based on this Flash game. A fairly complete description of this assignment is attached, however the interface in Universe has changed since that was written. We mean for you to write a 2- player, distributed version of this game across two computers using 2htdp/image and 2htdp/ universe. You dont need to write any AI component. Please note that the attachment is a bit out- of date, and you need to use the CURRENT version of Universe in DrRacket. Extra points for helping me update that document too!! This is a good assignment for CS majors interested in networked game design.

Project 2f: Symbolic Algebra [150 points]

The goal is develop a basic symbolic algebra package for Racket. This package would define functions that manipulate mathematical expressions, such as polynomials, in a way that is similar to what humans do. It would turn Dr.Racket into a powerful algebraic calculator, extending its basic numerical operations to much more complex symbolic expressions. See attachment.

Project 2g: N-Body Simulation [130 points]

The goal of this project is to create an N-body simulation. This is a simulation of the movement in space of astronomical bodies (moons, planets, stars, etc.) whose motion is governed by Newtons law of gravitation. See attachment

Project 2h: Conways Game of Death [200 or 250 points]

Conways game of death is a classic side-scrolling space-ship game, which requires the player to dodge cells which grow according to Conways Game of Life.

My feelings are that the essential features to earn 200 points are the ship movement and firing, the growth of the background according to the Game of Life rules, and scoring. For the 250 point version, add a network component that allows cooperative play between multiple ships.

Project 2i: Battleship! [200 points]

Another fairly straightforward distributed network game. You need for both players to place ships, and then for each player to select a spot to check, with hits and misses recorded on screen.

Project 2j: Agent-based Cell Modeling [200-300 points]

Dr. Bruce Bowman, director of Cancer Genetics and Stem Cell Biology at the Helen F. Graham Cancer Center, is interested in the use of mathematical modeling to study the epithelial cells line the inside of cavities (like the colon), as well as form structures like your skin. The amazing thing is how the epithelium forms a permanent structure while constantly changing as cells divide and die. Dr. Bowman has been working on some simple models of this process, for normal cells, and would like you to explore visualization, parameter effects, and other perturbations of these models. See attachment.

Project 2k: Music Composer. [150 points]

This is for the musically inclined. Develop an application for representing music in the standard Western 5-line staff notation. Your application should include a way to represent notes (which have a duration and pitch), a melodic line (sequence of notes), and a stack of lines that are played concurrently (counterpoint). When these are presented as a sequence of measures under a fixed time signature, you have a piece of music.

The application should include a function draw-music to take a piece of music and return an image of that music in the staff notation.

It should include a function transpose which takes a piece of music and transposes it to a new key.

It should contain a function append-temporal which takes two pieces of music and appends them so that one comes right after the other.

It should contain a function superimpose which takes two pieces of music and overlays them so they play concurrently in time.

It should include a function which consumes a piece of music and some specification of time (say, a measure number and a beat within that measure) and return the chord (set of notes) that is sounding at that time.

You may restrict yourself to a single staff/clef (say treble clef). You should be able to deal with arbitrary time signatures (2/4, 4/4, 6/8, ) and any of the 12 (major) keys.

Include a few non-trivial examples (e.g., a Bach chorale) for full-credit.

For even more extra credit, if you have time, you can use the RSound package (http://pkg-build.racket-lang.org/doc/rsound/)

to actually play a piece of music (i.e., actually make sounds).

Project 2l: Animation/Simulation of sorting algorithms [140 points]

Develop an application that demonstrates different sorting algorithms using animation.

The user provides a [List-of X] (for any type X), and a comparator on X, i.e., a function of type (X X -> Boolean), and a symbol specifying the sorting algorithm. Then the animation should show the elements of the list in a line, and then show the sorting algorithm executing step by step, with the objects moving smoothly from one place to another, one at a time. It should also show the score (as in a game): the number of moves performed so far.

For full credit, you must do at least quick sort, insertion sort, and bubble sort.

Extra credit if you can devise a way to make this work for an arbitrary (user-provided) sorting algorithm.

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[SOLVED] DrRacket: CISC 108 Project 2
$25