Creating a base modular framework for games – part one

CREATING A BASE MODULAR FRAMEWORK FOR GAMES – PART ONE

Once again I stumbled across a very good resource. This book is called C# Game Programming Cookbook for Unity, written by Jeff W. Murray.
As I started reading this book, I realized that the concept of having a good, solid and modular framework is a great way to speed up the game process by
minimizing code repetition. At the same time, once the framework is in place we can re-use it, with minor adjustments for other games.

Having several scripts dedicated for a particular task, allow the programmer to be able to use them in more than one situation in a modular fashion.
As usual, I tend to outline all the information using a flowchart as I believe it is a clear and quick way to grasp the big picture.

 

mind mapping software

 

The flowchart below, describe one of the base scripts used in the framework. The idea is to have a base class containing several
virtual methods with the least amount of code as possible. Once we inherit these methods we can then easily extend their functionality
by overriding their basic functionality. I like to see them, as a template that gives me basic functionality to be tailored in a second moment
to suit the intended game mechanic.

mind mapping software

 

As I will go through  the book in the next few days, I will summarize all the main concepts and although I can not copy and paste the code provided,
I can certainly offer my implementation of the code as I will build a simple game from scratch. If you are interested to see more,
I would love to read your comments, ideas, or recommendation below.

Regards,
Peter

Add a Comment

Your email address will not be published. Required fields are marked *

5 × 2 =