Skip to content

Latest commit

 

History

History
172 lines (130 loc) · 5.18 KB

REQUIREMENTS.org

File metadata and controls

172 lines (130 loc) · 5.18 KB

# 3rd year SOFTWARE PROJECT at Polytech’ Grenoble

In this section, you will find a description of the requirements and constraints concerning the project. To see how we faced them, see OVERVIEW

  • I. Game play
  • II. Learning objectives
  • III. Set up of a MVC solution (Model/View/Controller)
  • IV. GAL parser & automata
  • V. Graphic animation format .ani
  • VI. Menu

I. Game play

The game type was imposed and we faced common video game programmation issues.

2D Video Game

The video game must be a plateformer with a top view map.

Viewport

  • The world in which the player evolves should be larger than the viewport.
  • The viewport is centered and focused on the entity played (keyboard controlled).

Endless map

There were two options available:

  • The world is randomly generated as the player moves forward
  • The world is a torus. When the player reaches an edge, he teleports to the other edge.

2 distincts worlds with different associated actions

This was the main constraints for the project. The game must contain two different worlds with different behaviours. For example, taking a land and an aquatic environment, the action MOVE in the first one will make the entity step forward while in the second one, it will make it swim forward. The gravity or the directional plane had to be different as well.

Therefore, the player can move between the two worlds using, for example, ladders to go underground and back above ground.

II. Learning objectives

  • Use of an event graphic framework with problems of updating and reactivity
  • Model/View/Controller architecture design with clear separation between the three concepts
  • Use automata to animate game elements
  • Use of GAL parser provided by teachers
  • Definition of an animation standard: the sprites sheet + animation sequence
  • Think about a class structure where actions are not defined directly in the entity.

III. Set up of a MVC solution (Model/View/Controller)

The Controller

  • receives the keyboard and mouse events
  • trigger the update fo the Model and the View

The Model

  • updates the entities by asking each to take a step of their automata
  • carry out the actions triggered by the automata (updating positions, …)

The View

  • Graphically display actions via the avatars associated to the entities.
  • The player interacts with the Controller
  • All entities belongs to the Model
  • The avatar are entities graphic version and belongs to the View

IV. GAL parser & automata

Entity behaviour was defined by automata, written in *GAL (Game Automata Language)

Each entities behaviour is controlled by an automata

The game must contains at least

  • One playable entity keyboard controlled via un automata “keyboard-control”
  • Opponents whose behaviour is defined by automata
  • Map elements where behaviour is an automata “do nothing”

Automata example, from Kusinta

Demon (East) { *(East)

! GotPower() ? Explode() : ()
Cell(E, O) ? Turn(W) : (West)
Cell(H, P) ? Power : (ME)
Cell(E, P) ? Wizz() : (East)
Closest(P, E) ? Pop(E) : (East)
True ? Move(E) : (East)

*(West)

! GotPower() ? Explode() : ()
Cell(W, O) ? Turn(E) : (East)
Cell(H, P) ? Power : (MW)
Cell(W, P) ? Wizz() : (West)
Closest(P, W) ? Pop(W) : (West)
True ? Move(W) : (West)

*(ME)

Cell(E, P) ? Wizz() : (East)
| True ? Move(E) : (East) *(MW)
Cell(E, O) ? Turn(W) : (West)
Cell(W, P) ? Wizz() : (West)
Cell(W, O) ? Turn(E) : (ES) True ? Move(W) : (West)

}

Player_Donjon(Init){

  • (Init)
!GotPower() ? Explode () : (Init)
Key(SPACE) ? Egg() : (Doing)
Key(z) ? Jump: (Doing)
Key(q) & !Cell(W, O) ? Move(W) : (Init)
Key(d) & !Cell(E, O)? Move(E) : (Init)
Key(x) ? Get() : (Init)
Key(c) ? Store() : (Init)
Key(s) ? Wizz() : (Init)
Key(v) ? Pop() : (Init)
Key(a) ? Pick() : (Init)
  • (Doing)
! GotPower() ? Explode () : (Init)
Key(q) & !Cell(W, O) ? Move(W) : (Init)
Key(d) & !Cell(E, O)? Move(E) : (Init)
Key(s) ? Wizz() : (Init)
Key(x) ? Get() : (Init)
Key(c) ? Store() : (Init)
Key(v) ? Pop() : (Init)
Key(a) ? Pick() : (Init)
Key(z) ? Jump: (Doing)
Key(SPACE) ? Egg() : (Doing)

}

V. Graphic animation format .ani

The game must use sprite sheet .png and an animation file .ani. The sprit sheet contains all the illustrations of an entity The animation file contains the image sequence to make the entity visually perform an action.

Example of an animation file, from Kusinta

sprite_sheet = resources/Player/spritePlayer.png
18;7
MOVE = 8;9;10;11;12;13
JUMP = 15;16;17;22;23
FALLING = 23
SHOT = 114;115;116;117
DEATH = 66;67;68
SHOTMOVE = 120;121;122;123
DEFAULT = 0;1;2;3

VI. Menu

The game must provides a menu to attribute an animation and sprites sheet to each entity. Therefore, we can easly change all entities behavior and visual.

— AUTHOR: Alexis LANQUETIN, Polytech’Grenoble, Univ. Grenoble Alpes DATE: October 2020