Thursday, 21 November 2013

Unit 67 Computer Game Engines

What is a Game Engine?

A Game Engine is a type of software which is for the creation, development and production of video games, ranging from 2D games on the Playstation 3 to 3D games on the Xbox One, game engines can create many different video games regardless of their design or their purpose. The core is provided by a rendering engine (which is an engine that processes an image from a model) for 2D and 3D Graphics, a physics engine (which is a type of software that provides a simulation of certain physical systems), sound, scripting, animation, artificial intelligence, networking, streaming, memory management, threading, localisation support  and a scene graph.

Graph on Game Engines


This is a table showing some different game engines. They all vary to show how many different types of game engines there are. They also show what games the respective game engine has been used in.

2D Game Engines

Angel 2D

"Angel is a cross-platform 2D game prototyping framework based on OpenGL and C++.
It provides a broad set of basic game functionality in a lightweight fashion, and is designed to make it easy to get your game ideas up and running as quickly as possible."

A quote from one of the admins explaining 'Angel 2D', Thursday 28th November 2013.
This is a quote from a website explaining what type of engine 'Angel 2D' is. It also mentions the access speed on the process of the game being made and that it is easy to create a game using the engine.
  • "Provide all functionality in a quickly understandable way."
    • "We try to avoid overly complicated programming techniques, even if that means sacrificing efficiency or, in some cases, functionality."
    • "As far down the stack as we can manage, the code is plainly written and thoroughly commented. They expect people to modify the core engine in the course of our work, so we've tried to make that a manageable thing."
  • "Provide as much functionality as possible."
    • "Angel was originally created (and is still used) as an engine for game jams, and the last thing you want to be doing in a jam context is debugging the pathfinding code you had to cobble together."
  • "Allow an experienced developer to dive deeper."
    • "Given the first two points, we create a lot of wrappers around third-party libraries, but we always make it simple to access the raw capabilities of those libraries. So if you know what you're doing, you can be making direct OpenGL calls or poking the Box2D physics simulation."
    • "In short, we strive to keep our code relatively shallow -- it's always easy to find the code doing the actual work, so you're not slogging through multiple levels of OO redirection."
These are more quotes from the admin explaining some of the key features of 'Angel 2D', from the functionality as to how quick it is and how much there is to encouraging experienced developers to keep developing and producing games with more features and functions to possible explore, Thursday 28th November 2013.


Below is an image of one of Angel 2D's most popular games 'Pretty Scene'. I cannot receive anymore information on the game as that would require a download of the game engine. 

Adventure Game Studio

"Adventure Game Studio (acronym AGS) is a free software development tool that is primarily used to create graphical adventure games. It is aimed at intermediate-level game designers, and combines an Integrated development environment (IDE) for setting up most aspects of the game with a scripting language based on the C language to process the game logic.
"The editor and runtime engine were originally designed for Windows operating systems; though the runtime engine has been ported to Android, iOS, Linux and Mac OS X since the release of the source code. Prior to AGS 2.7, a DOS engine was also available; this has since been discontinued. It is not yet possible to run the editor to create games on operating systems other than Windows without an emulator or API wrapper such as Wine."
"AGS can create games with a graphical range from 256 colours and a resolution of 320×200 (games with more "classic" looks) to truecolor games with a resolution of up to 1024×768 (games with more "modern" looks) and an alpha channel. The higher the resolution, the more demanding a game is on computer resources, resulting in the need for a faster computer."
"It also supports the following graphics filters: none, 2x nearest-neighbor, 3x nearest-neighbor, 4x nearest-neighbor, hq2x, hq3x."
"The program has the support of a sufficiently large number of multimedia formats: mod, S3M, wav, xm, midi, ogg, mp3, avi - version 2.61. Version 2.72 has support for IT and S3M."

These are several quotes from the website 'Wikipedia' which provides information on what the Game Engine 'Adventure Game Studio' is all about. This explains what type of software the engine uses, what systems the engine is designed for, the different features in the graphical designing software, what graphic filters it supports and the number of multimedia the system supports.

Below is an image of one of Adventure Game Studio's most popular games 'The Journey Down: Over The Edge'. Their game has received many multiple awards, and as a result has received high praise and marks on Visual, Immersion, Puzzles and Pacing and Overall Enjoyment.


LÖVE

"LÖVE (aka Love2D) is a free, lightweight gamedev platform developed by a vibrant community, enabling everyone to create 2D games relatively quickly."
"The LÖVE platform is developed in C++ and implements some great cutting-edge techniques. The relatively short learning curve of LÖVE means you can start developing immediately - this is largely thanks to LÖVE using the lua programming language, which is fairly simple to pick up. Furthermore, the engine has a self-explanatory structure."

"The notable features are..."

  • "Networking abilities"
  • "Box2D ported implementation (physics)"
  • "Support for many image and audio formats"
  • "Particle effects"
  • "User-created libraries (plugins)"
  • "Uses the super flexible license (zlib/libpng license)"
"Since LÖVE is open source, you are free to use the engine for commercial purposes."

These are quotes from the website 'Wikipedia' explaining what the Game Engine 'LÖVE' is all
about and what it is. It tells you what type of Game Engine it is, how quick you can develop your potential game, how easy it is to understand the language and some of the key features the system uses.

Below is an image of one of LÖVE's most popular games 'Mari0'. The game is based on the recreation of one of the most popular game franchises of all time as 'Super Mario' is combined with another popular game franchise 'Portal'. The mechanics of the game is that Mario now has a 'Portal Gun' in possession and can shoot portals with ease, helping get through obstacles much more easily.


3D Game Engines

HPL Engine

"The HPL Engine is a 3D game engine created by Frictional Games. The engine, named after the initials of horror author H. P. Lovecraft, was started in December 2004, as a thesis job for a 2D platform game "Energetic", released in 2005. The functionality for 3D games was added later, which culminated in Penumbra Tech Demo in 2006. In 2010, the first version of the engine (HPL1) together with Penumbra: Overture was released as open source under the GPL license, after the Humble Indie Bundle promotion finished."
"HPL is a cross-platform game engine which is compatible with the OpenGL, OpenAL, and Newton Game Dynamics libraries. One of the engine's defining features is its ability for advanced object interaction through the use of Newton's physics code."
HPL Engine 1
"The first incarnation of HPL was demonstrated by the original Penumbra Tech Demo. The developers admitted to making significant modifications of the original engine to accommodate the 3D graphics in this game, "The engine is built from an engine created when making a thesis job which resulted in the platform game Energetic. Before moving into the 3rd dimension I made some cleanup of the engine (which was quite rushed in some places) and started to add a base for 3D rendering. I would not say that the original 2D engine was modified to add 3D, but rather a 3D layer was added so all of the 2D stuff is still there. It is still possible to make a 2D tile game using our engine." Another innovative feature of the engine was its ability to have static as well as dynamic shadows, allowing people with less powerful video cards to still experience some shadowing effects without the need of having to dynamically render them."

HPL Engine 2
"HPL 2 is the engine being showcased in Frictional's game series Amnesia, which has various new features and advancements. While HPL 1 used a portal system to do occlusion culling (a process which determines what objects should not be drawn), HPL 2 uses a dynamic culling system technique called Coherent Hierarchical Culling. HPL 1 also used stencil shadow volumes for shadowing while HPL 2 uses shadow mapping. The engine also boasts new effects such as Screen Space Ambient Occlusion, proper decals and a new rendering technique called Deferred shading. This causes HPL 2 to have higher systems requirements than the previous HPL Engine."

These are quotes from the website 'Wikipedia' about the Game Engine 'HPL' and what it is about. There are two different versions of the HPL engine, but both are not that different. They both possess 2D and 3D graphics and have similar effects etc. HPL was used in the popular game franchises 'Penumbra' and 'Amnesia'.

Below is an image of one of HPL engine's most popular games 'Penumbra Overture'. The game is based on a survival horror adventure. The game received many mixed reviews, mainly criticizing it's crude combat style and confusing storyplot.


Unity 3D

"Unity is a cross-platform game engine with a built-in IDE developed by Unity Technologies. It is used to develop video games for web plugins, desktop platforms, consoles and mobile devices. It grew from an OS X supported game development tool in 2005 to a multi-platform game engine."
"The latest update, Unity 4.3, was released November 2013. It currently supports development for iOS, Android, Windows, BlackBerry 10, OS X, Linux, web browsers, Flash, PlayStation 3, Xbox 360, Windows Phone 8, and Wii U. Two versions of the game engine are available for download, Unity and Unity Pro."
"The graphics engine uses Direct3D (Windows, Xbox 360), OpenGL (Mac, Windows, Linux, PS3), OpenGL ES (Android, iOS), and proprietary APIs (Wii). There is support for bump mapping,reflection mapping, parallax mapping, screen space ambient occlusion (SSAO), dynamic shadows using shadow maps, render-to-texture and full-screen post-processing effects."
"Unity supports art assets and file formats from 3ds Max, Maya, Softimage, Blender, modo, ZBrush, Cinema 4D, Cheetah3D, Adobe Photoshop, Adobe Fireworks and Allegorithmic Substance. These assets can be added to the game project, and managed through Unity's graphical user interface."
"The ShaderLab language is used for shaders, supporting both declarative "programming" of the fixed-function pipeline and shader programs written in GLSL or Cg. A shader can include multiple variants and a declarative fallback specification, allowing Unity to detect the best variant for the current video card, and if none are compatible, fall back to an alternative shader that may sacrifice features for performance."
"As of August 3rd, 2013, with the release of 4.2, Unity allows Indie developers to use Realtime shadows only for Directional lights, also the support of DirectX11 is added, which gives shadows a more pixel perfect resolution, textures to create 3d objects from grayscale, more facial graphics, smoother animations and a boost to the FPS."
"Unity supports deployment to multiple platforms. Within a project, developers have control over delivery to mobile devices, web browsers, desktops, and consoles. Unity also allows specification of texture compression and resolution settings for each platform the game supports."
"Currently supported platforms include Xbox One, BlackBerry 10, Windows 8, Windows Phone 8, Windows, Mac, Linux, Android, iOS, Unity Web Player, Adobe Flash, PlayStation 3, Xbox 360, Wii U and Wii. Although not officially confirmed, Unity also supports the PlayStation Vita as can be seen on the games Escape Plan and Oddworld: New 'n' Tasty."

These are quotes from the website 'Wikipedia' explaining all about Unity 3D. It says what the different systems are used in the graphics engine, the art assets and file formats, the platforms it currently supports and so on.


Below is an image of one of Unity 3D's most popular games 'Gears'. The game is based on a fantasy adventure with a steampunk-based design. 



LWJGL

"The Lightweight Java Game Library (LWJGL) is a solution aimed directly at professional and amateur Java programmers alike to enable commercial quality games to be written in Java. LWJGL provides developers access to high performance crossplatform libraries such as OpenGL (Open Graphics Library), OpenCL (Open Computing Language) and OpenAL (Open Audio Library) allowing for state of the art 3D games and 3D sound. Additionally LWJGL provides access to controllers such as Gamepads, Steering wheel and Joysticks. All in a simple and straight forward API."
"LWJGL is not meant to make writing games particularly easy; it is primarily an enabling technology which allows developers to get at resources that are simply otherwise unavailable or poorly implemented on the existing Java platform. We anticipate that the LWJGL will, through evolution and extension, become the foundation for more complete game libraries and "game engines" as they have popularly become known, and hide some of the new evils we have had to expose in the APIs."
"LWJGL is available under a BSD license, which means it's open source and freely available at no charge."
"The whole point of LWJGL was to bring the speed of Java rendering into the 21st century. This is why they have:"
  • "Thrown out methods designed for efficient C programming that make no sense at all in java, such as glColor3fv."
  • "Made the library throw an exception when hardware acceleration is not available on Windows."
"Their library is designed to work on devices as small as phones right the way up to multiprocessor rendering servers. Just because there aren't any phones or consoles yet with fast enough JVMs and 3d acceleration is neither here nor there - there will be, one day. The're carefully tailoring the library so that when it happens they will have OpenGL ES support in there just like that. This means that:"
  • "They had to have a very small footprint or it'll never catch on in the J2ME space at all. That's why the binary distribution is under half a meg, and that takes care of 3d sound, graphics, and IO."
  • "Even under desktop environments having a 1-2mb download just to call a few 3D functions is daft."
  • "They've worked to a lowest common denominator principle rather than attempting to design for all possibilities, but They've made sure that 99% of required uses are covered. That's why they've only got one window, and why they don't guarantee that windowed mode is even supported (it's officially a debug mode and hence they don't even supply some very basic window abilities that you'd get in AWT) and why they don't allow multiple thread rendering contexts."

These are quotes from the websites 'Wikipedia' and 'About LWJGL' that explains what the game engine 'LWJGL' is all about.


Below is an image of one of LWJGL's most popular games 'Minecraft'. The popular game has, of course, received high praise for its back-to-school graphics and gameplay. It was also praised for the creativity in the game, where many different objects, structures and even characters can be made.

Video games that are similar to created games

For my 3D game, there were some video games that were of a similar genre to my game. Two of the most noticeable games of the same genre were Pac-Man and Bomberman. Both games are similar to my game in that they both have a maze to get around in and that there are objects to collect, but are different in that there is a score and that the player has to get out of my mazes, rather then get rid of the objects in the maze.


Bomberman, which is an arcade/maze genre based game. The game was to destroy the rocks that kept the doors to the next level hidden. You also had to defeat the enemies and abilities which could improve the player's strengths.


Pac-Man, which is also an arcade/maze genre based game. The game was to collect the dots to advance to the next level. Bonus points are awarded for collecting the fruit and for also defeating the ghosts.


3-Demon  is a 3D maze genre game that was actually based on Pac-Man. This game, however, is from a first-person perspective, which makes the game a lot more difficult then Pac-Man.


Maze-War is also a maze-based game, hence the name. In this game, the player has to shoot at other players in the maze. The player can move up, down, and turn 90 degrees at a time.

For my 2D game, there were some that are similar of that to the game which I created. The two games which are similar to my 2D game are the classic Metroid and Mega-Man games. Both these games are similar to my game in that, the player has to destroy as many enemies as possible, but is different from my game in that both Metroid and Mega-Man are also adventure based and, as a result, have different levels in their respective games.


MegaMan, which is a adventure/shooter based game. The game is similar in that the player has to shoot at the enemies to gain points.


Metroid, which is also a adventure/shooting based game. The game is similar to that of my created and Mega-Man, in that, you have to shoot at the enemies to gain points.

Sketches for 2D and 3D games


Top left: Character, enemy(s), health crate and the support carrying it.
Top right: Environment for game that includes platforms and a background animation (gears moving).
Bottom left: Explosion when laser shoot explodes, with the laser with some smoke below.
Bottom right: Score with the numbers that will appear when enemies are killed and a health bar.


Top left: Layout for the 3D game.
Top right: Design of the clocks that will be spread around the maze(s).
Bottom left: Design of menu for 3D game that will include rain.
Bottom right: Layout for the starting point in the maze.

In-Game development of Unity 3D games


3D Game


1. Create first layout (maze) for game.



2. Add box colliders and mesh colliders to the layout so the player can move.



3. Add materials to walls and floors. This will be applied to future layouts.



4. Add effects to make the level have an 'eerie' air around it.



5. Add first-person controller to character, which is actually just a cube.



6. Add spot light to character as if he/she were holding a torch.



7. Add more spot lights to give the player potential guidance in the level.



8. Create a wall that advices the player to take notice of the lights, good or bad.



9. Create a wall that tells the player that the level/maze is complete.



10. Create a plane to say to the player that level two is about to start.



11. Copy original layout to keep effects but remove walls in maze and redesign.



12. Add spotlights to second level.



13. Create a wall that tells the player that the second maze is complete.



14. Create a plane to say to the player that level three is about to start.



15. Copy second maze to keep effects but remove walls in maze and redesign.



16. Add a point light that spreads all over the third maze.



17. Create a platform with an animation and words to advise the player to wait.



18. Copy third maze to keep effects but remove walls in maze and redesign.



19. Create new materials that show fingers pointing and a stop sign.



20. Create a plane that tells the player that the mazes are complete and that they are safe.



21. Copy fourth maze to keep effects but completely redesign layout.



22. Create new materials that is a simple gold texture that covers the whole final platform.



23. Create 'torches' that include a particle system.



24. Add sound effects (Heavy breathing and rain).



25. Create a timer with the default timer set to 65 seconds.



26. Redesign/Reposition timer to suit the game more.



27. Create 'clocks' spread around the maze(s) that add 10 seconds to the timer. (Image update to come soon).




28. Add more information to Timer script that will tell the game to pause when the timer reaches zero seconds.



29. Create a menu that will include the name of the game.



30. Create a 'hover' script that will lead to the game when the 'Start Game' font is clicked.



31. Add a downloaded zip file that contains a plane that sends rain down.



The images above show the development of my 3D game made in Unity. This particular game is going to be an action, maze based game where the player has to escape from a monster hiding above. The player will have to get through 4 mazes to escape. Each maze will have a light(s), as will the player (as if the player was holding a torch). The maze(s) will have clocks scattered around the mazes that will add 10 seconds to the original 65 seconds at the beginning. If the player runs out of time, the player will freeze in a position and the game will stop working. I should point out now that the cubes which will act as clocks have been replaced with a creation of an actual clock created in Cinema 4D. All 10 of the clocks in the game also do a 360 rotation at a slow speed.

2D Game

1. Create sprites for game, including the character, enemies, the health crate and the 'parachute jet'.







2. Create background platforms. These will not be 'sprites'.







3. Create additional features, such as the power source for the tower, the gears and the satellite dishes.




4. Get background material and have it as a skybox.



5. Add background platforms and the 'floating platform'.


6. Add the effect 'Box Collider 2D' to each platform and set the correct measurements to each one.


7. Add the sprites to Unity and place the character on the top-left platform.


8. Add the scripts, Box Collider 2D, Circle Collider 2D and a Ridgebody to the character. The scripts 
include the character movement and the character's health.


9. Add the Enemy script and the Circle Collider 2D to the enemies. 


10. Create the 'spawner', which will summon the enemies and add the script to allow the enemies to be summoned.


11. Add the gears to the background and create animation so that the gears are moving in harmony.


12. Create an animation for the platform in the middle as if it were floating.


13. Create more animations for the tower which would have power running through it.


14. Create more animation for the satellite dishes which have a simple rotation.


15. Add the background music, which was created in Mixcraft 6.


16. Add the gun script to the character, which would make the character shot the lasers.


17. Create the laser shot and explosion for the gun.


18. Create the animation when the gun has collided with a platform, enemy etc. Also create an order so the explosion will be split in 4, so when the laser has collided, the order will play (1-4).


19. Create more enemy sprites, including a damaged and death sprite.

20. Create a score script and align it in the middle.


21. Create multiple scoring systems to each enemy, 100 for blue, 200 for green, 300 for red.


22. Create the numbers and display them when each enemy is killed.


23. Add information to the score that adds up when each enemy is defeated.


24. Add sound effects to character such as the gun blast+explosion, the speech (random noises) and the jump.


25. Add some sound effects to the enemies, including when hit and death.


26. Create a health crate and a health script for the character to 'Pickup'.

27. Create a 'Pickup' script for the character so that the character can receive health crates with ease.


28. Add the 'Parachute jet' to the health crate, as if it were falling down.


29. Create a script that will remove the character and enemies when they both run out of health.


30. Create another script that will restart the game when the character runs out of health.


31. Create a menu that includes the name of the game.


32. Add the hover script to the font that says 'Start Game'.


33. Add the gears and animations behind the menu cube, as if it were a machine.



The images above show the development of my 2D game, also made in Unity. This particular game is going to be a Platform/Arcade based game where the character (Kingamabob) is under attack from some creatures called 'Grembits', who want to get rid of the character to infect the machine-like world. The character's mission is to defeat as many of the Grembits as possible. The Grembits vary in forms, Blue is the slowest of the three, takes one hit to kill and rewards the player with 100 points, Green has medium speed, takes two hits to kill and rewards the player with 200 points and Red is the quickest of the three, takes three hits to kill, making it the hardest of the three to kill, but rewards the player with 300 points when killed. The character's gun can shoot without using up ammo, so the player can shoot all the time. Sometimes during gameplay, a health crate will appear down to the ground to give the player some health. When the player loses all of their health, the game and score will restart.

Online Tutorials for 2D and 3D games





Evaluation for 2D and 3D Games

Although both the 2D and 3D were made again, I decided to focus less on the scripting and more on the design. Overall, I am happy with how the 3D game went. The layout of the mazes are complex, although I admit that the mazes should have been made more difficult as the game went on, not easier. The lighting in each maze is difficult to perfect, since there are many 'Spot Lights' scattered around each maze, the floor automatically absorbs all the lighting. I was very happy with how the two scripts, the timer and the clocks, turned out. The timer starts at 65 seconds due to the title menu selection starts the clock and when the timer reaches 0, the game will stop and you could only look around. The clocks give 10 seconds to the timer and to collect them the player needs to press the 1 key. Some of the early criticism for the game was that the game was too difficult to see (aka too dark), so I added small flares to the spot lights so that the player should be able to see them. This only applies to the first two mazes. The game itself is very simple, in that there are only 2 scripts created and 1 already created (First-Person-Controller etc) but the design itself is effective.

I am pretty happy with how the 2D Game was produced. The game was mainly inspired from the demo of 'Tower Bridge Defence' that was provided to be downloaded from Unity3D. The scripting was taken from the demo game, but was edited to suit my game more. Everything else designed in the game was my own. The layout for the game is very flat, mainly to fit in with the 2D feel. The most difficult part of the game was to create multiple scripts to sort each of the enemies scores out. There was going to be bombs in the game, but the scripting was similar to that of the scoring system, however, this time, the bombs would keep multiplying every time the bomb didn't go off, so the bomb was taken out of the game and replaced with the increased likely-hood of health crates. 

There were a total of 13 sound effects for both games, 2 for the 3D game and 11 for the 2D game. The created sound effects were from (1) My voice. (2) A radio. (3) Punches on the walls. (4) Rain. (5) A switch. The background music for the 2D game was created in Mixcraft 6.

No comments:

Post a Comment