Thursday 26 September 2013

Design Patterns

In this lecture we learned about design patterns. Design patterns are like the solutions to making your programming easier to control. They can prevent long and tiresome amounts of code by allowing you to use reusable ones. That is why we revised OOP in the last class. Using inheritances, classes and polymorphisms can solve the problem of having way too much code in your game. It is a good way ease up the load in your programming by using design patterns. Professor Hogue described four different types of patterns that can be used in our game this year.

Singleton

A singleton pattern is a class that instantiates an object one time. So instead of using a globally defined object, you can use a static variable in your singleton class. That way the object will only have one instance. Hence the word "Singleton", "single". Get it? 


Facade

A facade pattern is a set of classes interact with each other in a subsystem. Only one class exchanges data with another class within another subsystem containing interactive classes.



State

State patterns is like a using switches() and enums. It's like having a group of code do its own set of instructions. In the end, you will eventually merge the states together by calling them in an update().


This decreases the amount of errors which occur in your program. 



Factory

A factory pattern is a single point of a class entrance for the creation objects. It's just like an actual factory that builds many of the same products. When it is ready to be manufactured it is shipped to its location. The same thing is with a factory pattern, it creates many objects  for specific function. Factory pattern is also good for organizing memory allocation.


Design patterns are a very good practice to use especially if you like order and neatness in your code. You can use these kinds of patterns to further improve your programming style.

Tuesday 17 September 2013

3D Engine Fundamentals

What is a Game Engine???

Now when Professor Hogue asked us this question, I knew the answer but for some reason I couldn't put it into words. Apparently, the rest of the class had almost the same impression as I, so right away we had to form groups and have a clear and formal idea as to what a game engine is. In my own opinion, a game engine system of all data and components used in a game in order for it to work. It is the most important part of the game; without it the game will not be a game. I like the example of a car that Professor Hogue gave us in class. He said think about a car and whether it would be the same without the engine. Of course not, a car needs an engine in order for it to drive otherwise its just useless. It's the same idea with a game. Without a game engine, you cannot do anything on it. 





A game engine has to manage the data of the game as well as coordinate data with sub-components of the engine, manage flow of data, enable user input, etc...
Game Engines were not as famous as they are today. Games used to be made without any game engines up until the 1990s when 3D computer graphics started to become popular. It is a good thing it is popular today too. Can you imagine what it would be like without engines??? Game companies would've had to make their game from scratch EVERY TIME. It scares me just thinking about it.

Types of Game Engines

  • Ogre
  • Havok
  • TorqueX
  • Delta3D
  • Panda3D
  • Crystal Space
  • WildMagic
These are just a few free game engines discussed in class. I can't wait to use Havok and Ogre in class this year for our game. Also, CrystalSpace looks like a cool and awesome engine to check out as well. Clearly they named the engine after me.



Review of OOP

We also revised object-oriented programming. Which is a very good way to program because it allows you incorporate classes, inheritance, and polymorphism which enables a programmer to re-use code rather than writing new ones every time. It makes programming easier to code, easier to maintain, and easier to debug. So, in other words less stress. 


Pointers, are another topic we quickly reviewed as well. In game engines, it is important that interfaces are small, few, and explicit. 



Basically Lecture 2 is mostly revision but I'm glad we went through them in class because we will be using all of these attributes in the implementation of our game.

Sunday 8 September 2013

Game Idea

Well it is back to school and Professor Hogue has assigned us to write blogs again which I think is terribly fantastic.

Game Idea

Our game idea for this year is a helicopter combat game. This game will involve the player having to accomplish various missions in order to retrieve high-tech weapons for upcoming levels and tasks. This game is set in a futuristic war world so the designs of the helicopter and the weapons will be slightly different to what they look like now. The helicopter as well as other machinery will most likely have different architecture but still recognizable to the player or players.

Story Idea

Our story will probably be about a potential war that has occurred. The players will be assigned to fly a helicopter and complete tasks including defeating an enemy or rescuing people or simply picking up supplies. There will be a combat facility where players can have training or practice. However, this is just an idea. As time goes by, we will develop our story.

Here is quick example of a HUD I had in mind in our game. I did mention earlier that the helicopter will look different than it does regularly because of the set time we have in planned. So forgive me that the helicopter looks normal for now. There will be a defined style in which it will be drawn and modeled.




We will be using 2Loc as our wrapper for this years game. 2Loc includes physics, collisions, particles, camera control, and all sorts of engine blocks needed for our game.

Game engines we will be using are Havok and Ogre. Both these game engines are very new to me so it's going to be a challenge learning how they work. However, I do consider myself a fast learner so in the event, I am excited about learning these engines.

With Havok, our game will have a highly optimized collision detection library. Havok will give our game a more realistic virtual world. In addition, it is free for education and works well with Maya.

Ogre(Object-Oreinted Graphics Rendering Engine) is a very good 3D rendering engine. This will help with our fight scenes in which the players have to fire their weapons at specific target or whatever the case may be.

All in all, Havok and Ogre are both interesting game engines that require hard work in order for our game to succeed, so I'm up for the challenge this year.