Skip to content

Example on how to implement a simple Abstract Factory pattern in Games

License

Notifications You must be signed in to change notification settings

ABPMultimediaUA/ex_absfact

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Abstract Factory Example

This code is an application example of the Abstract Factory Pattern[1]. It shows a simple maze game with different types of enemies and walls. These different types are created using an Abstract Factory.

Screenshot of the two Game Modes in the Abstract Factory textmode example game

Explanation

This example was used during Computer Games lessons of the Multimedia Degree at the University of Alicante. You may want to check out the associated C++ lesson video (in Spanish):

Francisco Gallego's Computer Games Lesson at the University of Alicante

Compilation requisites

In order to compile this code you require:

  • A Linux/*Nix operative system (Win10 bash may do the job)
  • CMake 3.2 or greater
  • A compiler supporting C++11 or greater (GNU GCC is recommended)
  • NCurses library and its development headers

Compilation instructions

  1. Enter project folder
  2. Create a build subfolder (mkdir bin/)
  3. Enter build subfolder (cd bin/)
  4. Launch CMake (cmake ../src/)
  5. If CMake succeeded, run make (make)
  6. If build succeeded, run minimaze game (./minimaze)

Copyright and License

(c) 2017 Francisco Gallego

This code is distributed under GNU-GPL v3 License.

[1]: "Design patterns: elements of reusable object-oriented software." Addison-Wesley Longman Publishing Co., Inc. Boston, MA, USA ©1995. ISBN:0-201-63361-2

About

Example on how to implement a simple Abstract Factory pattern in Games

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published