czyykj.com

Embarking on My Game Jam Journey: Reflections and Insights

Written on

Chapter 1: Introduction to My Game Jam Adventure

This past summer, I chose to venture into a realm far from my usual coding endeavors—game development! Although I've long been intrigued by the idea of creating games, the daunting learning curve often held me back. Feeling worn out from my regular job, I thought a fresh challenge might provide the perfect escape. As luck would have it, the GMTK Game Jam 2023 was just around the corner. What better way to accelerate my learning than to dive headfirst into a 48-hour competition?

In this article, I’ll share my insights on the preparation leading up to the game jam, the challenges I faced during the event, the resources I utilized, and some advice for future endeavors.

My Preparation

In the weeks before the game jam, I dedicated time to complete two courses on Udemy by Wilmer Lin, which focused on creating a 2D Tetris game and understanding basic level management. The courses were exceptionally well-organized, especially the Tetris-style Puzzler course, which laid a solid foundation in Unity 2D game development. I highly recommend this to anyone eager to start creating 2D games.

My GMTK Game Jam Submission

The theme for this year's GMTK game jam was “Role Reversal.” Like many participants, I initially struggled with ideas. Ultimately, I settled on a shooting game concept, envisioning a twist: instead of playing as the shooter, players would take on the role of the bullet! Below is the link to the incomplete game I submitted.

Screenshot from my game submission "I Am Bullet"

The idea revolved around allowing players to control the bullet's direction and adjust its power depending on the enemy type. I envisioned a whimsical theme combining elements of the Wild West and fantasy, featuring cowboys battling monsters.

My Struggles

Creating the game felt akin to developing a Tower Defense or Plants vs. Zombies game, which I referenced frequently. However, the simplicity I imagined quickly unraveled into complexity.

1. Designing Tilemaps

The first hurdle was crafting a suitable background for my 2D game. After some research, I stumbled upon a couple of helpful YouTube videos that demonstrated how to use the 2D Tilemap Editor in Unity. Here’s one that proved particularly useful.

Setting up a 2D background with Tilemaps turned out to be surprisingly straightforward. However, I realized that the tutorial lacked information about the sorting layers of the Tilemap Renderer. Adjusting the “order in layer” value is crucial, as higher values will appear on top. If your tiles aren’t displaying correctly, try tweaking this setting.

Example settings for Tilemap Renderer

After completing the tutorial, I needed to find an appropriate tileset that matched my Wild West theme. Fortunately, I discovered a desert-themed tileset by beyonderboy, allowing me to create a fitting 2D tilemap background in about two to three hours.

2. Creating Animated Sprites

Next, I faced the challenge of sourcing animated sprites for my “shooters” and “enemies.” I realized I hadn’t covered animated sprites in my Tetris course, so I began searching for free 2D cowboy sprite assets. While options were limited, I managed to find a fantastic sprite by samuellee that included idle, walk, and shoot animations.

Example of animated cowboy sprite

After acquiring the sprite sheets, I needed to learn how to import and animate them in Unity. Several videos helped me grasp this process.

Thanks to these resources, I successfully created a prefab for my “shooters” with the animations properly set. However, I encountered a challenge: how to randomly select one of several “attack” animations. This video tutorial provided a solution.

I replicated this process for my “enemies,” using a fantastic sprite created by elthen.

3. Implementing Tilemap Spawning

I wanted to introduce defense mechanisms for my shooters, which I learned to do through some online research. I created a tilemap and placed tilesets to designate where I wanted to spawn defensive “cacti.” Here’s a code snippet demonstrating how I accomplished this.

4. Moving Characters

Next, I focused on moving my sprites from point A to point B. I had a blast experimenting with placeholders and waypoints for sprite movement. Check out this video on using waypoints.

Here’s a snapshot of my scene with waypoints (red for enemies, yellow for shooters) and placeholders (green for enemies, blue for shooters) that served as spawn points.

Scene setup with waypoints and placeholders

While I didn’t struggle much with this aspect, I realized that there were improvements to be made, particularly to prevent character overlap.

5. Enemies Attacking Defense

Another challenge emerged as I implemented enemy movement. I needed the enemies to halt in front of defenses and attack them before proceeding. This took me over two hours to figure out, as I struggled with colliders and triggers.

This video provided a solid example of implementing a melee hitbox.

To understand colliders and triggers better, I referred to this informative video.

After dedicating significant time to these tutorials, I finally achieved a functional system where enemies would stop and attack the defenses.

Image showcasing enemies attacking defenses

6. Projectile Mechanics

Next, I wanted my “shooters” to fire projectiles at enemies, a topic well-covered in this video tutorial.

I aimed for a unique bullet flight path, which required deviating from the standard raycast projectile method. I adjusted the implementation to replace mouse direction with placeholders, similar to the melee hitbox method, utilizing AimPoint and FirePoint for projectile direction.

Image illustrating bullet mechanics

7. Controlling Bullet Movement

With limited time remaining, I focused on allowing players to control the bullet's direction—a feature I was still mastering during the jam. I learned about events and static classes, which I combined in my game.

Essentially, I created a BulletsManager to oversee all bullets in the game. When the “shooter” fired a bullet, it would be added to the BulletsManager. The PlayerController then selects a bullet from the BulletsManager and triggers a player input event, allowing bullet control.

Image demonstrating bullet control mechanics

Unfortunately, this implementation still has numerous bugs, leading to hours of troubleshooting. If anyone has suggestions for improvement, please share!

My Takeaways

I never expected to win this game jam; rather, I viewed it as a valuable learning experience to kickstart my journey in game development. I realized I may have been overly ambitious with my ideas, given the limited time. Much of my effort went into grasping various Unity fundamentals, and in retrospect, I wish I had chosen a more familiar concept instead of tackling something entirely new.

Despite these challenges, I have no regrets about the time I invested in learning. I wish I had delved deeper into implementing game mechanics and creating my own sprites, as well as incorporating visual effects and music. Until the next game jam!

Summary

This experience was a significant departure from my usual activities. I thoroughly enjoyed the entire process of learning and developing my own game. While I may not have been fully prepared to compete in the jam within 48 hours, I gained a wealth of knowledge in a short time. If you’re a beginner like me, step out of your comfort zone and participate in a game jam—you’ll learn just as much!

Lastly, I want to express my gratitude to the YouTube creators, forum contributors, and asset developers who generously share their knowledge and resources with newcomers like me. Thank you for your support!

Thank you for reading! If you enjoyed my content, please consider following me for more updates!

Share the page:

Twitter Facebook Reddit LinkIn

-----------------------

Recent Post:

Exploring the Double-Slit Experiment: A New Perspective

This article delves into the double-slit experiment and its implications for quantum mechanics and the nature of reality.

James Webb Space Telescope Unveils Breathtaking First Images

Discover the breathtaking first images captured by the James Webb Space Telescope, revealing the wonders of the universe like never before.

Effective Strategies to Combat Obsessive Thoughts

Discover practical strategies to manage obsessive thoughts and improve mental well-being. Learn to redirect your focus and find peace.

What You Missed in April 2024: A Financial Recap

An overview of the financial landscape in April 2024, highlighting key events and trends impacting the economy and stock market.

The Urgent Call for a Transition from Fossil Fuels to Clean Energy

A critical look at the investments in clean energy and the need for a faster transition from fossil fuels to avoid catastrophic climate impacts.

Quick Techniques for Falling Asleep in Just 2 Minutes

Explore effective methods to fall asleep quickly, backed by YouTube techniques and personal experiences.

Finding Our Place in the Universe: A Unique Perspective

Explore humanity's unique role in the cosmos and our responsibilities toward the Earth and each other.

Navigating the Need for an Accountant in Your New Business

Exploring whether a new business truly requires an accountant, based on personal experiences and insights.