Maths exam: Revision notes about FlightController code

I spent most of today revising for the up and coming maths exam. I did some overall revision of a lot of the maths involved in the code for my game, and answered some questions aimed specifically at learning these answers.

Draw the FlightController class out as a Class Diagram

FlightController class diagram

List the different data types used in the code

Float, Vector 2.

Explain the use of an ‘if’ statement

‘If’ statements work so that if a condition is within specified parameters, the statement is true, but if the conditions are not within the specified parameters, the statement is false. This can be used to make different events happen based on whether the conditions meet specific parameters.

Identify one use of Vector arithmetic

Transform code to make a player, enemy, or anything move.

Explain dot products and why they are useful for the navigation of the aeroplane

A dot product performs a series of multiplications with 2 vectors to give a single, scalar value. It multiplies corresponding values from the vectors, then adds all of those values together to make one overall value. This could be used to add the current vector direction to the direction that the plane needs to be at, to work out the angle that the plane needs to turn at.


Analysis of Game Design: Legend of Zelda, Skyward Sword

The Legend of Zelda: Skyward Sword 

Skyward Sword was released in 2011 for the Nintendo Wii. Although Twilight Princess was the first Zelda game to feature motion controls, Skyward Sword really pioneered the use of motion controls as a game mechanic. Although Twilight Princess required you to swing the remote to attack, and use the remote to aim arrows, Skyward Sword went one step further, and included Motion Plus to “accurately” swing in the direction you swing the remote, and used puzzles and weapon mechanics that required precise remote controller movement to perform.

The Legend of Zelda series as a whole targets a wide range of audiences, because the game is so accessible that anyone of any age can enjoy it. The themes of the game are quite simple, mostly revolving around friendship, responsibility, destiny, and growing up. The friendship between Link and Zelda is unusual for a Zelda title, but their adorable, unlikely friendship can appeal to anyone, and pretty much anyone can read between the lines and tell that Link and Zelda are childhood sweethearts. Link  is faced with immeasurable responsibilities in Skyward Sword, and when the story takes sad turns and Link can’t accomplish his responsibilities and protect Zelda, Impa weighs down on him harshly, and this is a theme that practically anyone can relate to. Destiny and fate is a staple theme throughout the Zelda franchise, and this game is no different, except this time, the characters have stronger obligations and links to their fates, and because of this, the game’s story is much sadder and more painful than other titles, because the friendship between Link and Zelda is so strong that when they inevitably get separated and figure out their fates, it is legitimately painful to see them get ripped away from each other. Similarly to the theme of fate, growing is also a big theme in this game. Again, a lot of Zelda titles are based around themes of growing up or growing spiritually, and Skyward Sword features both. Link grows into a more confident character, grows as a swordsman and a knight, and grows spiritually as he endures the Spirit Realm trials, and everyone can appreciate and understand growing up.

The games design in Skyward Sword receives mixed reviews from fans, some fans love Skyward Sword, but it still receives a lot of negativity from fans, mostly because of the disenchanting motion controls. Nintendo brought out new software and hardware purely to improve the controller’s motion controls, and this game was one of the pioneer games to feature the new hardware, because it only works if the motion plus is attached to the remote. However, the game’s heavy reliance on this occasionally flawed hardware soured the reception for a lot of fans, because the calibration was easily knocked by players flailing the remote around, ultimately making it a flawed invention. In game fight sequences were true to the Zelda series, as fights are real time, however this made it more infuriating for players, because combat became really hard when the remote’s calibration went wrong, making that the main reason why combat was difficult. The boss battles are formulaic to most Zelda titles, requiring the new item you get from that area to beat them, however many items in Skyward Sword feature the use of motion controls to master, such as the beetle (which is essentially a drone that link can fly for a few seconds to collect small pickups or knock switches), and the Gust Bellows. Another thing that soured this game for a lot of fans was the assistant, Fi. A lot of fans don’t like Fi, because they say that she holds the player’s hand throughout the whole game, and patronises the player, and this is especially true when the batteries run out of the Wii remote. The environments in Skyward Sword are beautiful, the graphics and art style is inspired by the Impressionist art movement, and the landscapes very well reflect this art movement. The Faron woods is filled with lush greens and blues, the Lanayru desert looks barren, but with the flick of a switch can look as life filled as the forest, and the volcano looks daunting and intimidating as it towers over the Eldin province. Overall, Skyward Sword received very positive reviews from game reviewers, and I myself love this game, despite the finicky controls. The story is strong, and I personally love this game a lot.

Analysis of Game Design: Resident Evil 7

Resident Evil 7

Resident Evil 7 is a recently released title. With the hardware that is currently available, Resident Evil 7 was released on many platforms, including PC, PS4, and Xbox 1, and because of the current PS4 hardware, there is also a PS VR port available. This is the main reason why I want to talk about this game, because the VR port has significant changes and differences visually to the normal port. Because of the PS VR hardware, the game wouldn’t play the same with the handheld components, so Capcom made the mechanical choice of changing the fixed arm positions from the normal port, to separated models of arms that move wherever you move the respective controllers.

Resident Evil 7 is a survival horror game that is definitely aimed at late teens to adults. The demo that Capcom released really put across that this game was going to be scary and gory from the get go, and the poster and released images showed a scary picture of a girl’s silhouette in front of the destroyed house, which is also targeted to an older audience. The actual gameplay of this game has gone back to the original RE roots, after the series becoming a more run-and-gun orientated series, the series went back to it’s survival horror roots, and is currently a highly regarded scary game that is terrifying even to adults, and definitely not aimed at children, although edgy teens will also find appeal in this game for the scares and the thrill.

The overall games design of RE7 goes back to the survival horror roots with a bang. The game starts of with no weapons or defense, and you slowly build and find more weapons and ammunition as the game goes on. If you don’t look in the right places, you can miss weapons entirely, such as the shotgun and the magnum handgun. The gameplay is also more puzzle based, with puzzle pieces to find, and rotating sculptures to make the silhouette fit a shape. Fighting also requires more strategic thinking, and you need to use more environmental factors to assist in fighting, which mechanically makes the game more fun. Visually, the game well reflects the horror aspects of the game. The house is broken down, and the biohazard monsters climb out of moss on the walls, which for unaware players is terrifying when caught off guard. The house has a spooky and eerie air to it, and it has some uncanny valley to it, because the main house just looks like a normal functioning family house, however individual details like the broken stairs or vile post it notes in the fridge make traversing the house scary. The slapstick arms in the VR port do take the edge off the horror from an outside perspective, and this makes the game seem funnier to a viewer, however I haven’t played this VR port first hand, so maybe it looks better first person. The dlc for this game also takes the scary edge off, with games like Jack’s birthday party, Ethan must die, and 21 which all have funny minigame aspects to them like funny point score animation, funny voice acting and lighthearted arcade aspects, however the daughters dlc is a scary story heavy chapter that I personally would argue is scarier than the main game itself, which shows the family’s transformation into what they are in the main story. The game itself runs smoothly with the current hardware that we have in 2017, with next to no lag or slowness.

Analysis of Game Design: Final Fantasy VII

Final Fantasy VII

Final Fantasy VII was released in 1997 for the Playstation. It was the first Final Fantasy game in the series that was released on the Playstation, and this meant that the advanced hardware of the console allowed for new things to be brought to this series. FFVII was the first in the series to use full motion video for cutscenes, and use 3D models superimposed onto pre-rendered backgrounds in gameplay, which at the time was revolutionary. Even the 3 disks that the game was released on was a step up from the last title, because previous titles were released on the NES and SNES, meaning that they were released on cartridges as opposed to disks for the hardware of those consoles.

Final Fantasy VII was released and marketed for the teenage to adult audience, and this is greatly apparent from the gritty and action packed trailers, however this game has appeal towards people of any age because of the action packed fight scenes. FFVII is set in a dark dystopian setting that is targeted towards young adults to adults, and some of the overall themes of the game include dealing with loss, moral justice and misguided morality, power and the dangers of abusing it, the dangers of genetic modification, and to an extent, how being in the military can affect a soldier’s mentality, which are all adult themes that a child might struggle to fully understand.

The games design in FFVII is overall impressive. The turn based combat is similar to the games before, using the active time battle system to determine who attacks next and showing how long each character has to wait until their next attack. The use of pre-rendered backgrounds was new for this series, and at the time was a popular solution to creating an illusion of 3D space (for example, pre-rendered backgrounds can also be seen in houses in the legend of zelda ocarina of time). Visually, FFVII looks amazing for it’s time. The environments well reflect what their story and mood, for example the slums of Midgar look dark and gloomy, with areas like the train graveyard that look desolate and reflect despair and abandonment, whereas the Costa del Sol is a bright and warm beach resort, which reflects that everyone in this place is mostly rich and happy, and that they can live their lives in ignorance of the awful things that happen on the other continent. The full motion video cutscenes are even now amazing to watch, and they show the awesome moments of the game which couldn’t otherwise be done justice, for example the reactors blowing up, or pan shots of an impressive plane or action sequence that the 3D models couldn’t do justice. FFVII as a whole was so successful with it’s audience that Square Enix has even announced a remake for the PS4, which will feature a new combat system (which has changed to a real time combat system similar to that of Kingdom Hearts).

Animation in Unity

Most of this lesson was spent on my portfolio, and fixing things up for it, however the main focus of today’s lesson was supposed to be working out how to animate an object within Unity.

I decided to animate a door to open, because I didn’t have any 3D models of my own that could be animated easily in Unity. I made 3 cubes in Unity, and made the middle one door shaped to be the door. I then opened Unity’s animation window, and made a new animation. I made keyframes for opened, and closed, and this ran okay. I then ticked ‘loop animation’ off.

Door animation.gif

Animation attempt screen snap

At this point, I would have attached code to make it only open once a player went near it, however, firstly I forgot how to make a player in Unity 3D, and secondly I couldn’t work out the code I needed to make. Both of these excuses are pathetic, but I spent a little too long on fixing up my portfolio and didn’t leave myself with enough time.

Solo coding lesson

In today’s lesson, I was set off on the task of working out the answers to four questions about coding.

What does the dot do in a piece of code?

The dot is used to specify smaller and finer details, for example

What are the curly brackets used for?

They are used to contain a specific section of code.

Which is better, Allman or 1 TBS?

In my opinion, 1 TBS indents are better because they seem more logical to me, but overall it doesn’t matter because the code runs exactly the same regardless.

1tbs and allman comparison.png

Why does code have tabs in?

The tabs are used to indent the lines of code, purely to make it easier to read. They are also useful to show levels of brackets, but overall they are just a cosmetic thing to make it look good.


I was then set off on the task of making some code, that would make a cube or model interactive. I tried task 4, which was to make the cube spin across the x axis when you press down the space bar. I started off with some code that made the cube spin around the y axis automatically, and then added in code borrowed from when I made a flashlight but changed it so that it would be the space bar. I was struggling to make it work, because it wouldn’t keep spinning, it just only moved in tiny rotation movements everytime you pressed the space bar. I got stuck and sought help from Unity’s coding help website, and managed to work out a way to get it to work using booleans.

SPace rotate boolean vers.

I then adapted this to make it work without the help of booleans, and it shortened down my code a bit, but still worked effectively.

Space rotate no bool vers.

Spin thing lalal


Solo game: Toggling shooting off and on

So far, this has been my most difficult task yet, and I have just managed to fix it up.

The first code I made was just to make sure the base idea of the code would work. I originally made the code so that it would change the colour of the enemy sprite, just to check that the cone of vision worked.

Toggle code colour thingy


This worked properly, and caused the enemy to change from a cyan colour, to a dark blue colour when it saw the player…

Enemy colour test.gif

I then edited the code from colour change, to an ‘if’ statement using booleans where firing is toggled off and on.

Toggle code shoot goof.PNG

This was where I really slipped up, because I was confused about what I needed to do next. It wasn’t as obvious a fix as my last goof, but this time my mistake was that I didn’t know to literally drag the behaviour scripts from the enemy’s inspector view into the respective slots. And once I had figured that out, it still wasn’t working, but it was because for some reason, the ‘projectile’ code turned itself off in the projectile prefab.

Once I turned that on, it worked like a dream.

Shooting working final

At this current point I am over the moon with my game. I have included all of the code I need so far, and all of it is running super smoothly! The only things I would change about my game from this point on are purely cosmetic things, maybe make a newer map or jazz up the collectable item, maybe even add a new level, because I already have all of the necessary code. I think the most likely change I will make is the cosmetic changes, a new map is probably the most outstanding thing I’d change because it doesn’t look great.