Posts

Showing posts from October, 2022

Upgrade System Implementation

Image
 Author: Yashwant Patel Problem: For Island Defenders currently the player can only build one tower while fighting different elementals and there is only one gun which does not scale with the wave difficulty. Not only does this make the game challenging, but as the game goes on the challenge increases too much which could take the player out of flow state. This could frustrate the player and make the game boring since there is not that much agency for the player. While this doesn't break or disturb the main game loop it is a feature that could facilitate keeping the player in flow  state. Currently in order to try and keep the player in flow we have a phase in between every round where the player can build towers freely without having to worry about enemies. This upgrade system will be accessible during this phase and will help the player scale along with the enemies and waves. Solution: In order to solve this problem I am currently implementing an upgrade system (currently it...

Interface or Abstract Classes?

Author: Matthew Steinhardt  The Problem While designing the tower system for our game, it was immediately apparent that many of the towers would share similar functionality. This meant that if our code framework was not done correctly, it could lead to lots of duplicate code or an overly restrictive base that would not allow for flexible development later on.  When looking at how our towers function, they can be broken down into two main groups: Offensive Towers and Utility Towers.  Offensive towers have the unique functionality of finding enemy targets and attacking them in some way. However, the "attack" method could vary widely. Is it a direct "lock-on"? Is it projectile based? A wide cone-attack? Conversely, Utility towers are much broader in the sense that they don't need enemy targets to necessarily work. Furthermore, their functionality could include nearby towers or not.  The Solution The solution I came up with was to use a general abstract base class c...

Convoluted Blueprints and the Building System

Image
Author: Matthew Steinhardt   The Problem: When setting out to design our building system, I imagined a simple, streamlined system that would be easy to add new towers to for a quick, iterative process down the line. The first thing I thought to do was design a framework for our Towers. We need a base class to classify all our towers under for easy coupling to other systems (i.e. the enemy elementals). This wasn't such a big deal. Thanks to the modularity of our health system, I was able to simply extend a TowerHealth class and slap it onto our Tower base class.  However, the true complexity came about when deciding how best to tackle the "preview" requirement for building. When a player selects a tower from our UI, they are presented with a preview of what the tower looks like, and they can determine where to place it using the mouse. This became more complex when I had to take into account the building restrictions we placed on towers. Towers should not be placeable on t...

Implementing UI Delegates

 Author Patrick Kelly Date 10/21/2022 The problem encountered when programming a user interface is having the displayed values change when they are modified. The problem I ran into was having the user interface update the player currency when its modified without having to re-write or place additional code within other systems to command the user interface element to update.  The solution to this problem was using dynamic multicast delegates. By using these delegates, any system watching the player currency can update when another programmer uses the provided functions to modify the currency. This eliminates the need to check if the currency has been modified every tick as the delegate will broadcast to any elements or blueprints listening to the delegate. On one element, using tick to update a value on the user interface would not have any performance impact, but a game with hunreads of values updating could cause a noticeable impact. Delegates remove the need to constantly w...

Elemental Rendering Problem

Image
 Author: Yashwant Patel The Problem This week I was tasked with creating and implementing a wave system that would spawn enemies in all three lanes based on a weight given to the lane and based on the weight of the enemies for a particular weight. This makes it nice to fine tune individual waves and the implementation mostly went without a hitch. Although there was one giant problem that stuck out like a sore thumb or in this case it really didn't stick out and it should've. Our two enemy types use a particle currently as their model and when the elementals are spawned, but due to some internal workings of Unreal (or maybe a bug) they wouldn't render in when initially spawned. What's the point of a wave system if all the enemies are invisible? If we were going for a game where enemies could turn invisible or were invisible then this would've been fine, but we aren't, so it is frustrating for the player to try and gauge the location of the enemy using the health ...

Health UI: Adding a health bar

 Author Patrick Kelly Date 10/14/2022 The problem I ran into while working on Island Defenders was implementing a blueprint that would update a progress bar for player health on their heads up display. I was trying to get a reference to the player actor and using it’s health to update a progress bar to display player health to the player. The issue I ran into was getting a reference into the blueprint widget. Even with that issue, the other problem is when the player gets hurt, the blueprint widget would never receive the update for player health changing. I created a widget blueprint that used a custom event that would take an input zero to one value to update the progress bar. Eliminating the extra steps from the UI grabbing the player and binding health updates and having to take in max health to produce a proper zero to one value. From there, in the player controller, I placed an add to viewport call on the health bar and bound the health bar update event to the player’s ...

Player Input: Where Should the Logic Be Held?

Image
By: Matthew Steinhardt Expanding on the Player Input When creating our player character, we initially had the idea for all of the player interaction to take place within the third person view. This included the shooting, placing towers, and purchasing upgrades. However, as we discussed our idea more it became clear that a better view for building towers would be a top-down, wider angled, view. The Problem I set out to create player input controls to allow the player to seamlessly switch between a third person camera view and a top-down view. In this new "mode", the player got a much bigger picture of their surroundings. In addition, we made the cursor visible only while in this view to allow the player to easily interact with a familiar UI for placing buildings. However, there were a few problems. The first problem was that controlling our character from a top-down view didn't feel good. It was clunky and there was no reason for the player character to be moving around wh...

AI Navigation Problems - Yashwant Patel

Image
Problem In Island Defenders we want our AI to go down a lane to reach the core. Ideally the AI should navigate through the lane in a way where they don't cut corners to try and optimize the path they take in order to reach the Island Core. The path finding algorithm is implemented in a way to have the AI reach the destination using the quickest path while keeping obstacles in mind. For most games this would make for good AI, since you want AI to take the most efficient path. In our case we want the AI to always be in the center of the lane even if that path is not the most optimal. This wouldn't affect the user's gameplay physically, but it would seem like an odd behavior to have AI cutting corners in a game like this. For example, if you have a racing game and the AI cuts through the middle of the map in order to go from one point to another it wouldn't make sense. Even though that is the most optimal path in terms of pathfinding it's not the correct path. This is ...

Island Defenders

Image
 Welcome to "Island Defenders" In Island Defenders, you play as Edgar “Eddy” McEdgison, the toughest space pirate in the galaxy. He finds his secret island where he stores his stash of “treasure” under attack from angry elementals. He sends his trusty companion Kugo to find reinforcements as he holds down the base from the invaders. Build towers and defend the island against ever-increasing hordes of elementals. Bribe Kugo with bananas for new towers and upgrades after each round until all the elementals are vanquished or your stash is uncovered and pillaged. Careful not to lose your towers or your life to the elementals!