Capstone – Conclusion

Back in the beginning of 2019, when I officially started working on this project, I really had no clue what I would end up with, whether I would be successful or not, or even if I would enjoy what I was doing. Reflecting back on what I’ve accomplished, I’m proud of how far I’ve come. I have learned so much about the process of game development, a field that has interested me for a long time. As an engineer and a rather avid gamer myself, I can’t help but wonder about what is under the hood of the games I’ve found so entertaining. This experience has allowed me to build a new perspective from the developer’s point of view, and I am grateful to have such an opportunity. I found the project stimulating and intriguing; perhaps most importantly, I enjoyed my time working on it. I won’t be surprised if I find myself working on small hobby projects similar to this in my spare time, using the new skills I have learned these past few months. Overall, I am happy with the experience that I gained, and I am confident that I will use my newfound knowledge in the future.

Update 2 – Playin’ Games

Over the past few months, particularly since school ended for the semester, I’ve been working diligently to smash this project out of the park. If the COVID-19 pandemic has been good for anything, it’s widespread quarantining rules have made me unnaturally free to spend my time on projects like this one. If you need a short recap: I decided to use my capstone as an opportunity to endeavor on a learning experience in the growing field of game development. I’m happy to say that I’ve learned a lot about the process of game development; whether it concerns the game art, sound effects, music, coding, or just overall gameplay, I’m thoroughly entertained and satisfied with the work I’ve been able to produce. Of course, I’m no professional game developer, and the game I managed to create is far from flawless, but I am content with my progress and it is something I will certainly pursue as a hobby (or even potentially a career) in the future. With that being said, I would like to unveil my project in it’s final stages.

Setting Up:
The last update, frankly, was a while ago. Unsurprisingly, I’m leaps and bounds ahead of where I was at when I posted that, but I wanted to use what I had created to move forward. Eventually I decided to try to implement an Asteroids style arcade game, which exclusively used Movement Style 2 from the first update. Implementing this was easy, as I had already written the code for it before. After getting movement working, I experimented with screen wrapping, which is the famous visual effect used by Asteroids such that when an asteroid or ship moves off one side of the screen, it appears on the opposite side, as if the world was ‘wrapped’ around a cylinder. Interestingly, the Godot engine provides a nifty little function that takes care of this effect, should you want to add it to your game, which made implementing it nice and simple.

Asteroids is a space-themed multidirectional shooter arcade game designed by Lyle Rains, Ed Logg, and Dominic Walsh and released in November 1979 by Atari, Inc.

Asteroids:
Of course, one can’t create an Asteroids style game without asteroids. At this point, with the movement and screen wrapping working, it was time to add asteroids. With little knowledge on how to do this, I inquired the help of the internet and stumbled upon a nice set of tutorials to walk through building a game of the same style I was attempting to implement. From this point on, I used the online tutorial created by Youtuber KidsCanCode to guide my journey through the creation process of this game. Unfortunately, the tutorials were quite old, leading to a not insignificant portion of instructions to be out-of-date or in conflict with newer builds of the game engine. This issue, as well as some stylistic and creative decisions made by myself that differed from the tutorials ensured I derived my own end result.

Nonetheless, I learned how to implement asteroids in the game, creating my own sprites for different sizes (Large, Medium, Small). I programmed the asteroids to each spawn in one of eight locations around the screen, shown here (spawn locations are the red and green crosses forming the rectangle around the player):
Several bugs revealed themselves quickly, and while most of them were to the fault of a minor code error, one bug required more attention to fix. The asteroid spawning algorithm originally just spawned several asteroids randomly at any one of those eight locations. But what if one or more asteroids tried to spawn at the same location at the same time? This issue became apparent when I added collision detection to the asteroids, so that asteroids would ricochet off of one another if they collided. In the case where two or more asteroids spawned in the same location, the areas known as ‘Collision Shapes’ would detect overlapping asteroids and cause unpredictable behavior. I eventually created a function to generate a list of numbers that corresponded to unique and random spawn locations for each asteroid to be spawned. The code was ugly, probably really inefficient, and I’m sure there is a better way to solve the issue, but with limited familiarity of the GDScript language, this is what I came up with:

If I was more concerned with efficiency than I was about getting it working, then I probably would have spent significantly more time on this algorithm; but I wasn’t, and it worked, so it was good enough for me.

Lastly, I set up functions to allow the asteroids to split into smaller and smaller asteroids should they be hit, as well as more screen wrapping. The code here was rather interesting, but for the sake of space and time, I will spare all of the technicalities of this process.

The Player:
The player, of course, had already been set up for the most part; it had the ability to move in a ‘space-like’ fashion and the user could control the ship using the keyboard. As I was getting more familiar with the use of collisions, setting up the player collision box was relatively easy and allowed for me to set up for player death. A player would die in any of three scenarios: the player collides with an asteroid, the player collides with an enemy ship, or the player gets hit by an enemy ship bullet. After creating functions to handle these specific events, I wanted a break from coding, so I added an animation that played when the player ship ‘dies’. The primary tool I used to create sprites and sprite sheets (game developer terms for pictures and animation frames) is a free internet browser pixel editor called Piskel. Here is the ship explosion sprite that I created using Piskel‘s toolkit:

After dealing with player death, I came to the realization that I needed to track several variables important to the game, such as: number of player lives left, the score, the level number, whether or not the game was over, how many points each asteroid was worth when destroyed, etc. I figured it would be a good time to add a global script. This is useful to track variables that are crucial to the whole of the game. In this file I created variables that defined each of the criteria I mentioned above. I also, at the advice of the tutorial, added a ‘New Game’ function, that I could call whenever I would need to in order to reset the game variables and restart the game. A part of the global file is shown below:

Finally, the player is completely helpless without the ability to shoot. This was rather challenging, as each bullet was spawned as its own instance, moving in the direction away from the front of the ship. Each bullet also had its own collision box so that colliding with an asteroid or enemy could be detected. In the case of a bullet collision, the entity that it collided with (i.e asteroid or enemy ship) explodes and the bullet itself is removed from the game. To do this involved using a component of Godot called signals, which is essentially a virtual alarm that rings when certain events occur. In this case, I constructed a signal (that fires when a bullet collides with another body) to ‘signal’ the body (i.e asteroid or enemy ship) that it needs to explode. Confusing? Potentially. But, nonetheless, this method worked beautifully and at this point, the game had a user controlled player with asteroids that can be shot and collided with. The more I use these techniques, the less confusing they become.

The Enemy:
Next, I wanted to add an enemy so that the asteroids were not the only obstacle for the player. To implement the enemy, I created 4 different paths for the ship to follow. Shown below is what the paths looked like:

After successfully getting the enemy to spawn and fly on one of those paths, I worked on the enemy’s ability to fire at the player. This required some vector math, which obligated me to relearn some old physics material, but overall it wasn’t too complicated.

Power-ups:
At this point, the tutorial lessons I was using as a guide differed from where I wanted to go with my game. I felt that having some sort of power-up mechanic would add something unique. Since the tutorials did not address anything similar to power-ups, what I created with this idea is entirely my own and effectively utilized the new skills and techniques I had learned over the course of making the project. As of now, I have implemented three separate power-ups: Invincibility, Rapid Fire, and Extra Life, each of which are exactly what they sound like. Here is the code that was used to spawn a power-up:

When a power-up is spawned, it is given a ‘kind’, which signifies which of the three power-ups it will become; this determines which sprite to use. It is also randomly positioned at one of four spawn locations and relies on a series of timers to measure how long it can be collected, as well as how long it’s effects last after it has been collected. Here are the animated sprites that I created for each of the power-ups:

Rapid Fire

Extra Life

Invincibility

 

 

 

 

 

Game Art and Polish:
Nearing the end of the development of the actual game play, I still desired that my game look and feel pleasant. The game was still visually rough, and while I’m not a professional graphic designer, nor maestro music composer, I figured I’d give it my best shot to sand down some of those rough edges; after all, it’s all about learning and having fun. I quickly learned how to make a HUD (heads-up-display), which shows the level, score, number of lives, and a power-up timer on the screen for the player to see at all times. I also added a pause menu, and main menu, both of which have functional buttons to start and quit a game. The background used for the game and the main menu was fashioned using Procreate.

Afterward, I designed several animations and particle effects that were added to make the game more visually stimulating and pleasing. The following are multiple examples of these cosmetic improvements:

Fire Trail particle effect that emits when the player is moving forward.

Sprite Sheet of explosion used when asteroids split.

Explosion animation resulting from the sprite sheet.

Enemy explosion animation.

Finally, all of the sounds and music in the game are unique and were produced by me. I used a free, online, 8-bit sound making tool called BFXR for all sound effects present, and I composed the music for the game in iOS’s Garageband.

Created on the iPad, this is the track that became the music piece for the game.

Thus, I officially finished my work on this game. There are still plenty of bugs that could be fixed, rough edges that could be buffed out, and extra content that could eventually be put into the game, but I’m satisfied with where I’m at. I believe now is a good time to take a break and focus on the rest of the capstone. With that being said, here is a video of myself playing the finished product:

 

Resources and Helpful Links:

Game Art:

Game Music and Sound Effects:

Game Engine:

Tutorials:

Update 1 – The Basics

Learning how to use Godot has proven quite the challenge, not that I didn’t expect to receive one. Primarily the biggest obstacle is learning the engine’s unique scripting. It’s not very similar to other programming languages that am familiar with (Java, C++) and the learning curve is substantial, particularly for someone trying to just jump right in to the thick of game development. Nevertheless, I’ve been working on informing ourselves about Godot and how it fundamentally works. The following are demonstrations of different types of character (or Node) movement.

Link to video demonstrations: https://drive.google.com/open?id=1qaJz9x1KQYljoqkF4CrNnxnr4FycyTT8

Movement Type 1:
The first video demonstrates 8-Directional Movement, a traditional style of movement in a 2D game which generally uses four separate directional inputs to result in 8 different directional outputs. This is the simplest form of movement of the three demonstrations. Also implemented are frame boundaries, which use the function clamp to ‘clamp’ the position of the character within the edges of the window. The piece of code used to construct this type of movement is found below the video.

Movement Type 2:
The next video shows a movement type very similar to that of the classic arcade game Asteroids. This type of movement uses Vector math to calculate the position and rotation of the character. It also implements a unique sliding effect that influences the speed and direction of the character if the character is in motion, but there are no more inputs. Essentially, the character drifts through the play space.

Movement Type 3:
The last video demonstrates movement comparable to a car. Similar to the previous style, this required the character to be rotated. However, such movement means that the rotation must align with the path on which the character is moving. Also, movement in the reverse direction is implemented as well.

Methodology

Determining the Best Software for this Project

 

After looking at several options, I came up with a list of various tools that were publicly available; each application has it’s own advantages and drawbacks, which I will outline here.

Here are a few programs that I took a look at:

  1. GameMaker Studio 2
  2. Godot
  3. Unreal Engine
  4. Unity Engine

Pros/Cons for Each

1. GameMaker Studio 2

Pros: GameMaker Studio 2 is a popular game engine known for its prowess in 2D games. Some of its most famous games include Hotline Miami and Undertale. Well liked for being friendly to digital artists, this engine has plenty of advanced features and boasts a relatively quick learning curve. It also supports a large community of developers to share resources and knowledge.

Cons: Not entirely drag-to-drop (it is necessary to learn to code). Additionally, the program uses its own scripting language, which ultimately demands a lot of extra time to learn. Lastly, this GameMaker Studio 2 is a rather expensive option, with pricing at varying tiers from $99 to $399.

2. Godot                       

Pros: Godot is a relatively new game engine, initially released in 2014, and is still actively and quickly being expanded and updated by its developers. It supports both 2D and 3D game building for games on almost any platform, and sells for the convenient price of free. Its node-based architecture allows users a flexible and powerful experience. The engine also comes with its own high-level debugger, which is tremendously useful and similar to those used in computer science classes at Ohio State. Also, Godot is open source, which means if the game engine is not capable of doing what is desired, an extension to the program can be written and implemented in to the actual application itself (at this point, I’m not doing anything advanced enough to require this, but being open source is a nice feature, nonetheless). Lastly, Godot is under an MIT Licence, which not only permits open source, but also means that any work a user makes is independently theirs and only theirs.

Cons: This engine is not at all drag-to-drop, making the learning curve a bit steeper than the previous game engine. Godot also uses its own scripting language, and while this language is immensely important and useful, learning a new language is still time consuming and limiting while the user is new.

The next two game engines, Unity and Unreal, are currently the most popular engines in the industry. Quickly, I realized that with great power, also often comes great complexity. It was almost immediately clear that these programs were meant to be used by professionals, or at least people more experienced in game developing than us. The user interfaces alone are complex and look rather overwhelming to someone with little knowledge of how to use them. Despite them being primarily free (premium versions of Unity are subscription based) and having massive followings and engaged active communities, I eventually decided it would be best to try simpler engines.

 

Overall, GameMaker Studio 2 seemed like it had the most advantages in areas that I was looking for, with Godot following right behind. However, with GameMaker being priced a minimum of $99, a less than optimal proposition for college students, Godot seemed like the more financially acceptable choice.

 

Planning Phase

Name(s): Justin Holderby

————————————————-———————————————————————-

Project Area (Math, engineering, STEM education, etc.):

Computer Science, STEM education, Game Development

————————————————-———————————————————————-

The following timeline was completed as a part of the project proposal and was approved by STEM Scholars leadership. Target dates are permitted to be flexible if necessary.

Your project needs to be completed no later than April 1st of Spring Semester in order to get your poster approved and printed before presenting. What is your proposed timeline?

 * * * * * GLOBAL PANDEMIC: COVID-19 HAS DRASTICALLY ALTERED THE CAPSTONE TIMELINE * * * * *

Now – August 23rd : Conceptualization and Research Phase

August 23rd – September 1st : Further Brainstorming (Determining which software and tools will be required to complete the project)

September 1st – October 1st : Familiarization with Development Software

October 1st – January 1st : Coding and ePortfolio Posts (Intro, planning, update 1)

January 1st – March 1st : Testing and Debugging

March 1st : Begin writing paper. Potentially add new features to game (i.e. extra levels, music, improved art style).

March 15th : Begin assembling poster.

APRIL 1ST : Turn in Paper.

APRIL 5TH : Turn in Poster.

Capstone Introduction

As somewhat of an avid gamer myself, I find the aspect of Game Development a fascinating idea and a promising potential career path. Being a student in computer science will likely give me the tools and resources to pursue that course if I determine that being a game developer is something that I would like to do in the coming years. The average person may likely assume that the gaming industry is small or slow, but in fact, the opposite is true. According to a report published by GlobalData in April 2019, the gaming market was worth $130 B last year, and is likely to explode to $300 B by 2025. With such an auspicious outlook for the future of the industry, it would certainly be advantageous to learn some basics about Game Development, whether it be game engines, programming languages, modeling, or other relevant skills.

The purpose of this particular project, ultimately, is to gain further understanding of what it takes to be a Game Developer. Using professional grade software, I will focus on learning basic techniques and apply those techniques in various examples to demonstrate comprehension of those skills. I will determine the most beneficial yet powerful tools to use; capability, usability, and cost, are all important criteria that I have deemed necessary. Being new to any software, program, or skill will undoubtedly take plenty of time to grasp without prior experience, which is fundamentally why this is a perfect opportunity to open another door for the future.

 

Year in Review

Nine months ago, I was a timid freshman. Walking into Houston House, I remember checking my room number for the third time that morning, probably unreasonably nervous that I would stumble into the wrong dorm. Really, there was quite a lot that I was nervous about. Will I be able to handle the classes? Will I get homesick? What if I can’t make any friends? These are, I assume, common freshman questions, and I completely understand why. Jumping from high school to college is a crazy lifestyle change.

Personally, I felt that I was more ‘ready’ than most incoming students. Perhaps it’s my go-with-the-flow style personality that made the adjustment easier for me, or maybe I should thank my parents for giving me some useful life skills that surely helped smooth the transition. Nevertheless, I believe I surprised myself with the ease with which I managed to get the hang of things around college life.

Be that as it may, you can’t be prepared for everything, and I have had my fair share of challenges on the way. In high school, I frequently succeeded in my classes without much significant effort, but college quickly proved to be a different story. Particularly in my Computer Science and Engineering Calculus courses during the first semester, I hastily learned what would be required of me to find success in those classes. Studying time was made a priority, and homework essentially became required. As a slower worker, midterms which were occasionally a press for time made me anxious and prone to mistakes. I had to learn to work efficiently and accept the results, whatever they may be.

This does not mean that I became complacent with less than stellar scores on tests or quizzes, but rather, I taught myself to breathe, learn from the mistakes, and move on to the next one, working no less diligently than before. I had to remind myself that it is okay to fail, as long as I try to improve.

Similar challenges have hounded me in my second semester, this time with Linear Algebra and Software. I have slowly learned to be patient with my growth and to keep working.

Also, I have developed better time management skills trying to find a balance between a seventeen credit hour schedule, clubs, scholars requirements, and ‘me-time’. Though I have honed my ability to be efficient with my work, I am looking forward to having a lighter schedule next semester.

 

Current Event: First Picture of a Black Hole

First-Ever Picture of a Black Hole Unveiled

A National Geographic article by Nadia Drake

___________________________________________

About two weeks ago, a team of over two hundred scientists released the first ever picture of a black hole. Ironically, the photo captures more of what is known as the event horizon, since the black hole is a generally a void of darkness and is the shadow-like circle in the center of the ring. The event horizon is the threshold surrounding the black hole in which not even light can escape it’s monstrous gravitational pull. See below:

Picture of the supermassive black hole at the center of Galaxy M87

No matter if the picture is clear or not, it is an impressive feat to say the least. Creating the image took over two years to complete, requiring several teams of scientists to assemble five petabytes of collected data. To put that in perspective, five petabytes is equivalent to the estimated data storage of two human brains — for one image.

The scientists also explain that this picture helps to confirm (for the most part) some of Albert Einstein’s theories, including the famous theory of relativity. In fact, the image, which was collaborated on by observatories around the globe, can tell us a lot about this particular black hole. For instance, based on the data that was collected, it has been estimated that this gargantuan black hole has the mass of around 6.5 billion Suns, and that it’s event horizon could possibly stretch farther than 120 times the distance from the Earth to the Sun.

___________________________________________

The potential impact of this photo and the research that was done cannot be understated. Movies like Interstellar (2014) have long taken guesses at what a black hole would actually look like, and some of those guesses came surprisingly close to the actual image. Personally, I find it incredibly impressive that such predictions can even be made with the minimal knowledge that we currently have about black holes. The photo will likely fuel research on black holes for years to come, particularly when the same team of scientists release the picture of the black hole at the center of our own galaxy, which they were working on in concert to that of M87.

From a more political standpoint, nothing stood out to me more than the fact that this was an international endeavor. Six observatories, including stations in Hawaii, Arizona, Mexico, Chile, Spain, and Antarctica, participated in the data collection process and utilized the skills of scientists from several countries to complete such an ambitious project. It is breakthroughs like these which often exemplify that the best advances in science or technology are created when the world comes together. I couldn’t imagine what the world might accomplish, if all of a sudden, humanity did away with greed and hate; if humanity prevailed with the morals that which make us human, and progress became a global mission, then the stars are the limit. Nothing shows the potential of a world where everyone works together more than these moments.

 

More Midterm Woes – Linear Algebra

This semester, I decided to take Linear Algebra. It is a required course for my intended major, and I had met all the prerequisites for enrolling in the class. Linear Algebra turned out to very different from any type of mathematics I had ever learned before.

As a visual learner, I seemed to academically grasp classes like geometry, algebra, and even calculus better than this particular class; linear algebra frequently involves of abstract ideas and concepts that are naturally challenging to visualize. Consequently, I struggled to get the hang of the material.

Inevitably, my lack of thorough understanding of the various concepts on the midterms led to a few undesirable scores. Interestingly, though I tested below average for the midterms, I managed to receive above average marks for the weekly quizzes. Nevertheless, I was determined to heighten my overall knowledge of the material, which I still often find unclear and confusing.

This experience of struggling with coursework is fairly new to me, as I am sure it is for many freshman students at Ohio State. As one of the top students in my high school, I rarely needed to strain to ‘get it’, or be successful with my academics. But classes like Linear Algebra that I have taken in my first two semesters in college have really opened my eyes to the amount of work I really need to put in. My time management skills have improved. I have reduced some bad procrastination habits. I have learned to be at peace with myself if I receive a less-than-desirable grade (not satisfied, but not distraught).

Overall, I have to say that I am glad I decided to take Linear Algebra. It may be challenging, and I’m still not in the clear yet (the final is in a week – fingers crossed!), but I believe I have gained valuable experiences that will help me in the future.