Tac Due: Sep. 26, 2012

Similar documents
Chapter 1:Object Interaction with Blueprints. Creating a project and the first level

Mobile Application Programming: Android

2359 (i.e. 11:59:00 pm) on 4/16/18 via Blackboard

Spring 06 Assignment 2: Constraint Satisfaction Problems

Tac 3 Feedback. Movement too sensitive/not sensitive enough Play around with it until you find something smooth

CSSE220 BomberMan programming assignment Team Project

Tic Feedback. Don t fall behind! the rest of the course. tic. you. us too

Spring 06 Assignment 2: Constraint Satisfaction Problems

Playing Games. Henry Z. Lo. June 23, We consider writing AI to play games with the following properties:

CS 1571 Introduction to AI Lecture 12. Adversarial search. CS 1571 Intro to AI. Announcements

CS 2710 Foundations of AI. Lecture 9. Adversarial search. CS 2710 Foundations of AI. Game search

VACUUM MARAUDERS V1.0

CS 251 Intermediate Programming Space Invaders Project: Part 3 Complete Game

For slightly more detailed instructions on how to play, visit:

CPSC 217 Assignment 3 Due Date: Friday March 30, 2018 at 11:59pm

Lab 7: 3D Tic-Tac-Toe

Tic-tac-toe. Lars-Henrik Eriksson. Functional Programming 1. Original presentation by Tjark Weber. Lars-Henrik Eriksson (UU) Tic-tac-toe 1 / 23

CS151 - Assignment 2 Mancala Due: Tuesday March 5 at the beginning of class

Space Invadersesque 2D shooter

Taffy Tangle. cpsc 231 assignment #5. Due Dates

Star Defender. Section 1

1 Modified Othello. Assignment 2. Total marks: 100. Out: February 10 Due: March 5 at 14:30

Kodu Game Programming

CS180 Project 5: Centipede

2 person perfect information

Conversion Masters in IT (MIT) AI as Representation and Search. (Representation and Search Strategies) Lecture 002. Sandro Spina

CS 480: GAME AI TACTIC AND STRATEGY. 5/15/2012 Santiago Ontañón

Kismet Interface Overview

the question of whether computers can think is like the question of whether submarines can swim -- Dijkstra

5.0 Events and Actions

Assignment 2 (Part 1 of 2), University of Toronto, CSC384 - Intro to AI, Winter

Games (adversarial search problems)

Grading Delays. We don t have permission to grade you (yet) We re working with tstaff on a solution We ll get grades back to you as soon as we can

Silhouette Connect Layout... 4 The Preview Window... 5 Undo/Redo... 5 Navigational Zoom Tools... 5 Cut Options... 6

In this project we ll make our own version of the highly popular mobile game Flappy Bird. This project requires Scratch 2.0.

Artificial Intelligence Lecture 3

GAME:IT Junior Bouncing Ball

Contents. MA 327/ECO 327 Introduction to Game Theory Fall 2017 Notes. 1 Wednesday, August Friday, August Monday, August 28 6

CRYPTOSHOOTER MULTI AGENT BASED SECRET COMMUNICATION IN AUGMENTED VIRTUALITY

Unit 12: Artificial Intelligence CS 101, Fall 2018

CS 354R: Computer Game Technology

CISC 1600, Lab 2.2: More games in Scratch

Adversary Search. Ref: Chapter 5

Problem A. Worst Locations

Assignment 2, University of Toronto, CSC384 - Intro to AI, Winter

Programming with Scratch

No Evidence. What am I Testing? Expected Outcomes Testing Method Actual Outcome Action Required

AI Plays Yun Nie (yunn), Wenqi Hou (wenqihou), Yicheng An (yicheng)

Introduction to Artificial Intelligence CS 151 Programming Assignment 2 Mancala!! Due (in dropbox) Tuesday, September 23, 9:34am

Warmup Due: Feb. 6, 2018

GameMaker. Adrienne Decker School of Interactive Games and Media. RIT Center for Media, Arts, Games, Interaction & Creativity (MAGIC)

Project Connect Four (Version 1.1)

Programming Project 2

Stratigraphy Modeling Boreholes and Cross Sections

Official Documentation

BIEB 143 Spring 2018 Weeks 8-10 Game Theory Lab

class TicTacToe: def init (self): # board is a list of 10 strings representing the board(ignore index 0) self.board = [" "]*10 self.

CONCEPTS EXPLAINED CONCEPTS (IN ORDER)

mywbut.com Two agent games : alpha beta pruning

Game Design Curriculum Multimedia Fusion 2. Created by Rahul Khurana. Copyright, VisionTech Camps & Classes

Computer Science and Software Engineering University of Wisconsin - Platteville. 4. Game Play. CS 3030 Lecture Notes Yan Shi UW-Platteville

Strategic and Tactical Reasoning with Waypoints Lars Lidén Valve Software

COMPASS NAVIGATOR PRO QUICK START GUIDE

UNIVERSITY OF CALIFORNIA Department of Electrical Engineering and Computer Sciences Computer Science Division. P. N. Hilfinger. Project #3: Checkers

INTRODUCTION TO COMPUTER SCIENCE I PROJECT 6 Sudoku! Revision 2 [2010-May-04] 1

CS 771 Artificial Intelligence. Adversarial Search

CS 387/680: GAME AI DECISION MAKING. 4/19/2016 Instructor: Santiago Ontañón

CS61B, Fall 2014 Project #2: Jumping Cubes(version 3) P. N. Hilfinger

Game Artificial Intelligence ( CS 4731/7632 )

To use one-dimensional arrays and implement a collection class.

PROBLEMS & INVESTIGATIONS. Introducing Add to 15 & 15-Tac-Toe

The University of Melbourne Department of Computer Science and Software Engineering Graphics and Computation

NURIKABE. Mason Salisbury, Josh Smith, and Diyalo Manral

CMPT 310 Assignment 1

Minimax Trees: Utility Evaluation, Tree Evaluation, Pruning

Existing and Design Profiles

Tic-Tac-Toe and machine learning. David Holmstedt Davho G43

In this project, you will create a memory game where you have to memorise and repeat a sequence of random colours!

SPACEYARD SCRAPPERS 2-D GAME DESIGN DOCUMENT

Beginning 3D Game Development with Unity:

Revision for Grade 6 in Unit #1 Design & Technology Subject Your Name:... Grade 6/

CS 211 Project 2 Assignment

Flappy Parrot Level 2

Tower Defense. CSc 335 Fall Final Project

CPS331 Lecture: Search in Games last revised 2/16/10

CS 312 Problem Set 6: λ-shark (CTF)

Royale Politique. A funny game developed for the RV course - University of Pisa

Module 3. Problem Solving using Search- (Two agent) Version 2 CSE IIT, Kharagpur

PASS Sample Size Software. These options specify the characteristics of the lines, labels, and tick marks along the X and Y axes.

2D Platform. Table of Contents

How to Make Games in MakeCode Arcade Created by Isaac Wellish. Last updated on :10:15 PM UTC

CS 540-2: Introduction to Artificial Intelligence Homework Assignment #2. Assigned: Monday, February 6 Due: Saturday, February 18

ARTIFICIAL INTELLIGENCE (CS 370D)

2 Textual Input Language. 1.1 Notation. Project #2 2

Board Game AIs. With a Focus on Othello. Julian Panetta March 3, 2010

Introduction to Simulation of Verilog Designs. 1 Introduction. For Quartus II 11.1

Selected Game Examples

CS103 Handout 25 Spring 2017 May 5, 2017 Problem Set 5

UNIT 13A AI: Games & Search Strategies

Tutorial: A scrolling shooter

Transcription:

CS 195N 2D Game Engines Andy van Dam Tac Due: Sep. 26, 2012 Introduction This assignment involves a much more complex game than Tic-Tac-Toe, and in order to create it you ll need to add several features to your engine. You ll be creating a tactical strategy game in which units move around a grid-based map, and the map will be defined in an external text file. The enemy units will be controlled by the computer, so your engine will need to support some basic AI capabilities in order to provide an active opponent. In order to facilitate testing your game on as many different maps as possible (and encourage you to create more interesting maps), the TAs have created a world-writable directory at /course/cs195n/ share/tacmaps in which you can share Tac map files. This is one advantage of storing game resources in external files: it allows resources to be shared between different games that agree on a common file format. Week 1 Due Sep. 19 In the first week of this project, you will make a simplified version of the game with vector graphics instead of sprites. There will be no computer player yet, but you will start adding AI by developing the pathfinding algorithm that your own units will use to navigate the map. These requirements will be due on September 19, 2012. Engine Requirements Pathfinding. The engine must support performing A* pathfinding over a graph with nonnegative edges. The game must be able to define a graph and a heuristic and use the engine to determine the shortest path between two nodes. Viewports. The engine must have a viewport object that can draw objects from a different coordinate system onto the screen coordinate system. It must support panning and zooming. Game Requirements Your game must be able to read information about a game map from a plain-text map file. The map file must store at least the following information: The layout of tiles in a two-dimensional grid. Definitions of different types of tiles and their properties (minimally, whether or not each type of tile is passable for units). The layout of units on the same two-dimensional grid as the tiles.

Definitions of different types of units and their properties (minimally, whether or not each type of unit is on the human s team or the computer s team). An example map file format is provided at the end of this handout, but you can define your own format as long as it is documented in your README. Note that the example format has information about tile sprites, which are not required until week 2, as well as an additional tile property (whether it is passable for bullets). If you use this format, you can ignore the extra information when reading the file in week 1. In addition, your game must have the following features: There must be passable and impassable tiles. Units may never move onto impassable tiles. The map must be displayed in a way that communicates which tiles are passable and impassable. The human-controlled units must be displayed on the map. required to display the computer-controlled units. It is recommended but not The player must be able to pan the game window s view the map. The player must be able to zoom in and out of the map without the center changing. The player must be able to select human-controlled units. Unit selection must be visualized in some way (i.e. units). by drawing a border around selected The player must be able to command selected human-controlled units to move to any tile on the map. The units must move to that tile if possible, but they do not need to do anything if the destination tile is impassable or if there is no route to it from their current tile. Units must move to their destination tile using A* pathfinding. Units must move smoothly between tiles, but can only stop in the center of a tile. When moving, units may only change direction when in the center of a tile. No more than one unit can be allowed to occupy a tile simultaneously. Units must not overlap at any time. The map must be loaded from a map file passed as a command-line argument to the program, OR the game must have a main menu as required in Week 2 s game requirements. Week 2 Due Sep. 26 In this week you will add sprite graphics to your game by adding support for sprite images and animations to your engine. You will also add a simple AI system to your engine and create an AI-controlled computer opponent for your game. 2

Engine Requirements Sprite-sheet images. The engine must support drawing sprite images that are a logical sub-rectangle of a single image, either by splitting the sprite sheet into separate images or by drawing only a portion of the sheet image. Shared images. If the same sprite-sheet image file is required multiple times (for example, by having multiple tile definitions in the map file specify it), the engine must support storing only one copy of that image in memory and sharing it between sprites that use it. If the engine splits a sprite sheet into smaller images for each sprite, it must still load the sprite sheet only once. Animations. The engine must be able to create an animation that consists of multiple sprites played in succession. FSM AI. The engine must support creating a finite state machine-based AI, in which the input conditions for state transitions and the actions to take at each state can be specified by the game. Game Requirements The information that your game reads from the map file must now include a property for each type of map tile that specifies the sprite to use for that tile. The sprite must be defined as a logical sub-rectangle (grid position) of a single image. An example map file format that includes this information is provided at the end of this handout, but you can define your own format as long as it is documented in your README. In addition, your game must have the following features: There must be a main menu screen that allows the player to load any level in the current directory (i.e. the directory from which the program is launched). The list of files displayed can optionally be limited to only files with a certain extension, such as.map. The main menu must appear before the in-game screen if a map file is not specified as a command-line argument when launching the program. If the map file the player selects (either on the menu screen or as a command-line argument) cannot be parsed for any reason, the game must return to a non-game screen and display an error message. Units must be represented by animated sprites. The sprite to use for each type of unit does not need to be specified in the map file (so it can be hard-coded into the game). Unit animations must play while units are moving and stop when the units are not moving. Units on opposite teams must be able to damage each other. Units on the same team must not be able to damage each other. When units become reasonably damaged, they must be destroyed and removed from the game. 3

Units on the computer s team must be controlled by a finite state machine-based AI. The AI must have at least two states with noticeably distinct behavior that can each transition to the other. There must be at least one form of UI element that is drawn on top of the game s viewport rather than inside it, but whose position is based on a point inside the viewport. This means the element is drawn in the screen s coordinate system rather than the viewport s coordinate system, so it does not scale with the size of the viewport, but its position changes to follow a point inside the viewport. An example would be a health bar that hovers above each unit, following the unit while it is visible but not scaling when the map is zoomed. The player should win if he eliminates all of the computer s units, and the computer should win if it eliminates all of the player s units. When either wins, a win or lose message must be displayed to the player, and the player must be able to return to the main menu. It must be possible to start a new game without restarting the program. Map File Format One possible format for the map file is described below. If you use this map file format, you can use the sample map files provided by the TAs to test your game (they re in /course/cs195n/ support/tac). If you choose not to use this format, you are responsible for creating your own test map files. The map file will be divided into three sections: dimensions, terrain, and units. The sections will have the following lines: Dimensions: One line consisting of <width> <height>, two integers indicating the size of the map in tiles. Terrain: Begins with TERRAIN on a line by itself. Any number of lines in the format <code> <boolean> <boolean> <file> <int> <int>, each of which defines a type of terrain tile. <code> is a two-character identifier for the type of tile, the first <boolean> is TRUE or FALSE indicating whether the tile is passable for units, and the second <boolean> is TRUE or FALSE saying whether the tile is passable for projectiles. <file> indicates a sprite file, and the two <int>s correspond to the zero-indexed column and row respectively, numbered from the upper left, of the sprite to display for the tile. START on a line by itself indicates the start of the tile layout grid. <height> lines, each of which has 2 * <width> characters. Each pair of characters corresponds to a <code> for a tile type. END on a line by itself indicates the end of the tile layout grid. Units: Begins with UNITS on a line by itself. Any number of lines in the format <code> <boolean>, each of which defines a type of unit. <code> is a two-character identifier for the type of unit, <boolean> is TRUE or FALSE indicating whether the unit is AI-controlled (true indicates computer s team, false indicates player s team). 4

START on a line by itself indicates the start of the unit layout grid. <height> lines, each of which has 2 * <width> characters. Each pair of characters may correspond to a <code> for a unit type, or it may be filler text. A unit type code indicates the unit that occupies that grid position, while anything other than a unit type code indicates that there is no unit in that position. The non-unit-codes can be ignored and are purely used to space out the unit codes. (The filler text can even be map tile codes, which can be helpful for visually inspecting the map file to see where the units will be placed on the map.) END on a line by itself indicates the end of the unit layout grid. Example Map File Here is an example of a file that follows the TA map file format: 10 9 TERRAIN.. TRUE TRUE sprites.png 5 3 WW FALSE FALSE sprites.png 7 2 START.....WWWWWW...WWWWWW....WW...WW....WW...WWWW...WW....WW...WW....WW..WWWWWWWW..WW....WW...WW.....WWWW...WWWW...... END UNITS aa TRUE bb FALSE START ######aaaaaaaa###### ######bbbbbbbb###### END 5

Suggested Extras If you meet the requirements listed above, you will receive credit for the assignment. However, if you have extra time and wish to make your game more interesting, you might want to implement some of these extra features. Note that you cannot receive extra credit for going beyond the assignment s requirements because assignments do not get scores or letter grades, but the students who playtest your game will certainly appreciate if you make it more fun to play. Make several different maps to play on. Have destructible tiles that change their sprite and become passible when taking damage Add animations for bullet explosions and unit deaths. Make some enemies spawn after the game starts instead of all being placed at the beginning of the game. Create a way to select multiple units, such as a click-and-drag selection box. Create units that have different types of weapons or do different amounts of damage. Distinguish between impassable tiles that block bullets, and impassable tiles that bullets can still pass through. Instead of tiles always blocking bullets or not, have each tile have a concept of height : bullets are blocked only by tiles that have a height greater than the height of the tile they were fired from Handing In Each week, you should hand in the entire directory tree for your project, including code you handed in last week. You should also include a README file that describes how to verify each requirement, and an INSTRUCTIONS file that describes how to play your game, as specified in the Global Requirements. If you re using Eclipse, execute cs195n handin tac1 or cs195n handin tac2 from the root directory of your Eclipse project. If you re not using Eclipse, the directory you hand in should include an executable shell script that compiles your source code into a jar file. For this project, it is important to hand in map files that can be used to run your game. If you do not include any map files, the TAs will use map files written in the TA format described above. 6