Skip to content

2D videogames course final project. 5th semester.

Notifications You must be signed in to change notification settings

rcgc/2dvideogames

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

2D videogame

Abstract

Patterns describe a problem which occurs over and over again in our environment, and then describes the core of the solution to that problem, in such a way that you can use this solution million times over, wihtout ever doing it in the same way twice. Design patters are descriptions of communicating objects and classes that are customized to solve a general problem in a particular context[2].

A design pattern names, abstracts, and identifies the key aspects of a common dessign structure that make it useful for creating a reusable object-oriented design. The design pattern identifies the participating classes and instances, their roles and collaborations, and the distribution of responsiblities. Each design pattern focuses on a particular object-oriented design problem or issue. It describes when it applies, whether it can be applied in view of other design constraints, and the consequences and trade-offs of its use[2].

Implemented Patterns

  • State: Main character state management
  • Strategy: Level management
  • Observer: Collision management
  • Singleton: Characters factory-instantiation
  • Factory: Characters instantiation

Demo

Level1

Image 1. Level 1


Level2

Image 2. Level 2 (final level)


References

[1]E. Freeman and E. Robson, Head First design patterns, 1st ed. Sebastopol, CA: O'Reilly, Edition: 10th Anniversary ed., 2014.
[2]E. Gamma, R. Helm and R. Johnson, Design patterns, 2nd ed. Addison Wesley, 1998.