DATA STRUCTURE AND ALGORITHM PROJECT Fall2011 Group Members: Asma Rafi BS-3 Fatima Saleem BS-3.

Slides:



Advertisements
Similar presentations
Sprite-visual object (actor on the stage) Scripts- Tells actors (sprites) what to do.
Advertisements

The Coordinate Plane By: Christine Berg Edited By:VTHamilton.
GAME:IT Junior Learning Game Maker: The Control Tab.
Solving 2-D Vectors Graphically
Laboratory Study II October, Java Programming Assignment  Write a program to calculate and output the distance traveled by a car on a tank of.
Q2-1.1a Graphing Data on the coordinate plane
3. S/E with Control Structures 3.1 Relational Operators and Expressions 3.2 If and if-else Statements 3.3 The Type Double 3.4 Program Design with the While.
Microsoft® Small Basic Advanced Games Estimated time to complete this lesson: 1 hour.
Drill #56 Evaluate the following expressions: 1. 5( 2 + x ) =
I.1 ii.2 iii.3 iv.4 1+1=. i.1 ii.2 iii.3 iv.4 1+1=
I.1 ii.2 iii.3 iv.4 1+1=. i.1 ii.2 iii.3 iv.4 1+1=
Distance and Mid point.
INTRODUCTION TO SCRATCH. About Me Resources Scratch Website Learn Scratch Washington-Lee Computer.
CSCI 101 Introduction to Software Development and Design.
Line up By Melissa Dalis Professor Susan Rodger Duke University June 2011.
Introduction to TouchDevelop
Problem Solving and Mazes
KeyListener and Keyboard Events Just as we can implement listeners to handle mouse events, we can do the same for keyboard events (keypresses) –to implement.
Description, Classes, Interfaces, Hierarchy, Specifics George Georgiev Telerik Software Academy academy.telerik.com Technical Trainer itgeorge.net.
KeyListener and Keyboard Events Another type of listener listens for keyboard entry – the KeyListener which generates KeyEvents –to implement KeyListener,
Chapter 4 Inequalities 4.1 Inequalities and Their Graphs.
Addison Wesley is an imprint of © 2010 Pearson Addison-Wesley. All rights reserved. Chapter 7 The Game Loop and Animation Starting Out with Games & Graphics.
StarLogoTNG 101 Treasure Hunt Game Unit Lesson 2: Keyboard Controls.
Test Environment Algorithm Program Requirements/ Enhancements Analyze the Problem and Design a Solution Programming Software Translates the Source Code.
The Coordinate Plane By: Christine Berg Edited By:VTHamilton.
Transparency 6 Click the mouse button or press the Space Bar to display the answers.
Chapter 1 Graphing. § 1.1 Reading Graphs and the Rectangular Coordinate System.
Slide 1 Copyright © 2015, 2011, 2008 Pearson Education, Inc. The Rectangular Coordinate System and Paired Data Section8.3.
Opening Title Fire'nIce Team Member: Zhang Yujie Wang Huan Xiao Fei Cheng Peng Tutor: Alexandre Devert SSE USTC Team Leader: Wei Qiang.
 What is the game about?  Looking into the algorithm  Looking into the code  Complexity and conclusions.
Recursion Chapter 17 Instructor: Scott Kristjanson CMPT 125/125 SFU Burnaby, Fall 2013.
GAME:IT Junior Paddle Ball Objectives: Review skills from Introduction Create a background Add simple object control (up and down) Add how to create a.
Creating a Simple Game in Scratch Barb Ericson Georgia Tech May 2009.
4.1 NOTES. x-Axis – The horizontal line on the coordinate plane where y=0. y-Axis – The vertical line on the coordinate plane where x=0.
Game Maker Tutorials Introduction Clickball IntroductionClickball Where is it? Shooting Where is it?Shooting.
5. Animation Let’s Learn Saengthong School, June – August 2016 Teacher: Aj. Andrew Davison, CoE, PSU Hat Yai Campus
REVIEW. A. All real numbers B. All real numbers, x ≠ -5 and x ≠ -2 C. All real numbers, x ≠ 2 D. All real numbers, x ≠ 5 and x ≠ 2.
Unit 8 Solving Inequalities Essential Question: How can you use inequalities to solve real world problems?
LINEAR EQUATIONS PART I
1.2 Slopes and Intercepts equation for a given line in the coordinate
MOM! Phineas and Ferb are … Aims:
Recursion -- Introduction
Scratch for Interactivity
p5.js mouse, keyboard and if’s
Background Shapes & Collision Resolution (Top-down and Side-scrolling)
Objective The student will be able to:
Jeopardy Final Jeopardy Translations Reflections Vocabulary Solve It
Chapter 3 Graphing.
Drill #56 Evaluate the following expressions: 1. 5( 2 + x ) =
Plotting Points In A Coordinate System
LINEAR EQUATIONS PART I
Coordinate Plane Plotting Points
Quadrants and Reading Ordered Pairs
The Coordinate Plane By: Mr. Jay Mar Bolajo.
Addition Grids.
The Coordinate Plane By: Christine Berg Edited By:VTHamilton.
Transformations.
4.1 Rate of Change and Slope
LINEAR EQUATIONS PART I
The Coordinate Plane By: Christine Berg Edited By:VTHamilton.
Graphing Linear Functions
Multiplication Grids.
2.3 Graph Equations of Lines
Graphing Linear Equations
Click on a number block to go to a question. Blocks 1, ,4, 5, 8, 10, 12, 15, 16, 17, 19, 21, 23, 24, 25 will.
Solving Equations 3x+7 –7 13 –7 =.
LINEAR EQUATIONS PART I
The COORDINATE PLANE The COORDINATE PLANE is a plane that is divided into four regions (called quadrants) by a horizontal line called the x-axis and a.
The Distance & Midpoint Formulas
Graphing Linear Equations
Presentation transcript:

DATA STRUCTURE AND ALGORITHM PROJECT Fall2011 Group Members: Asma Rafi BS-3 Fatima Saleem BS-3

 The object of the game is for the player to find their way to the end of the maze.  The program is based on the 2-D array and the graphics(mainly drawLine), represented using Applet.

o The goal of our project is to learn the implementation of a Data structure (2-D array). o To learn the inco-opertion of graphics and applets with the code.

 BUILT-IN CLASSES USED: java.applet.Applet; java.awt.Graphics; java.awt.event.KeyListener; java.swing.* 2-D array for creation of Maze. drawLine() method for walls. fillOval() method for player.

CREATION OF MAZE: I. Create a Boolean 2-D array for horizontal and vertical walls of the maze I. Set True for open walls and False for closed walls I. Draw lines using loop where walls are closed. II. Draw a player FALSE TRUE FALSE TRUE

I. Use keyListener to move the player(Up, Down Left and Right). II. Detect Collision of player with the walls and block using correct positions. RIGHT ARROW KEY: While pressing the right arrow key, if player’s horizontal position is greater than the coordinates of the closed wall, then assign players position to that particular value. LEFT ARROW KEY: While pressing the left arrow key, if player’s horizontal position is less than the coordinates of the closed wall, then assign players position to that particular value.

UP ARROW KEY: While pressing the up arrow key, if player’s vertical position is less than the coordinates of the closed wall, then assign players position to that particular value. DOWN ARROW KEY: While pressing the down arrow key, if player’s vertical position is greater than the coordinates of the closed wall, then assign players position to that particular value.

 The ball starts from the top left corner of the maze.  It moves along the open walls, using the arrow keys, the closed walls block the ball from going through.  Finally reaches the end of the Maze and thus the maze is solved.

At player X position(SQ)=26 At player Y position(SL) = 26

At player X position(SQ)=186 At player Y position(SL) = 26

At player X position(SQ)= 178 At player Y position(SL) = 230

 From this project we learned: I. Key event handling. II. Implementation of 2-D array. III. Collision Detection. IV. Tried different algorithm techniques for creation of the maze(DFS, Tiles, fillRect()). V. Use of Graphics and Applet.

 dex.php?title=Maze:%20Third%20Person dex.php?title=Maze:%20Third%20Person  ut/index.htm ut/index.htm