Assignment 5, CSC 101

due Friday, March 14, 11:59pm

In this assignment you will complete your world project for this quarter by adding support for clock-based movement and interactions between the entities in your world.

In general, this assignment focuses on:

More details and requirements are given below.

Requirements

High-level requirements are given below. With your submission, include a README file that clearly outlines the movement algorithm, transformation, and animation (e.g., when they occur) for each part.

This assignment also assumes that the world "begins" when the program begins. As such, your program should immediately load the saved world (created using the previous assignment) and begin the world interactions.

Movement: Clock-based with Obstacles

Your world must

Movement must now be clock-based. This will allow you to control the rate at which an entity is able to move. For instance, an entity may be set to move at a rate of one tile every 0.5 seconds. You will likely want to vary the rate for each entity to avoid lockstep motion.

Movement through an obstacle (added in the previous assignment) must be prevented. You will also likely want to prevent movement through or over other entities (expect, perhaps, when gathering). Instead of moving through an obstacle, your entity should try to move around. For this assignment, you are only required to make a simple attempt to move around an obstacle. For example, when your normal movement algorithm would require moving over an obstacle, your program might attempt to move the entity one tile to the right instead.

Transformation

Your world must support the transformation of one entity into another entity. This may be a transformation into a new type of entity for this assignment or into an existing type of entity (from previous assignments). For instance, an Adventurer may transform into a Statue when within four tiles of a Gorgon.

Animation

Your world must

Bring your world to life by adding animation to your entities. Not every entity must be animated (it may not make sense for all of them), but at least one must be animated. All animation should be controlled by the timer (clock) to restrict the rate.

In addition to animating an entity, your world will need to include at least two animations in response to an entity's actions. The first animation must be in response to the transformation of one entity into another. The second animation is up to you (e.g., it may happen when an gatherer collects a resource).

Animation can be implemented by cycling through different images (sprites) for your entity or response.

Handin

You must submit your solution on unix11.csc.calpoly.edu (or on unix12, unix13, or unix14) by 11:59pm on the due date.

You will submit to the akeen user. Submit all files needed to run your program including all code files, all sprite image files, your README file, and one gaia.sav file.

At the prompt, type handin akeen x101hw5 *.py README gaia.sav and also submit all of your sprite image files (in bmp format).

Note that you can resubmit your files as often as you'd like prior to the deadline. Each subsequent submission will replace files of the same name.

Grading

The grading breakdown for this assignment is as follows.