Tag Archives: Gaming

Fun Friday’s: AlterKnight

Friday’s are for fun. So let’s get to it!

This Friday’s spotlight is on AlterKnight. A retro-RPG with nostalgic graphics and deep game play for such a modest concept. Best part is it was written, coded, sounded, graphic..ed.. 100% by my brother! Let’s dive in deeper on what AlterKnight is.

P.S. the world is randomly generated!

AlterKnight places the player in a world that was once peaceful but is now infested and overrun with monsters of all shapes and sizes. Players can explore the vast open world searching for quests, treasures, and surprises! Along the way players will fight back against the darkness and slowly reclaim the land unlocking new shops, taverns, and places to explore.

Damn little goblins…

Combat should feel very familiar for those retro Final Fantasy players. AlterKnight takes a turn based approach that forces players to balance their use of spells, equipment, weapons, and items found along the way. Oh and don’t worry about getting bored with combat, with over 70+ unique spells and 80+ unique types of equipment all randomly generated you’ll never run out of options for destroying your those damn little goblins.

Told you there was a lot of gear!

The cherry on top for AlterKnight is that you can play with your family and friends over WiFi! This makes all the little details like camp fires and dungeon lighting all that much more enjoyable when you can share it with a friend. Plus, the rewards and treasures are even greater when you’re adventuring together!

AlterKnight takes some of the things we love most about open world RPG’s and places it right into your pocket. With so much procedurally generated content, random encounters, customizations, and unique items AlterKnight will keep you entertained time and time again.

Download it here and follow along for future updates at: https://www.facebook.com/AlterKnightGame

Fun Friday’s Among Us

Not everything has to be so serious all the time, so today I’m doing a brief review of something a little more fun that the whole family can jump into over the weekend. Today we’re going to take a look at the wholesome, family oriented, gather round the fireplace fun game, Among Us.

Among Us currently has almost 2.5 million downloads on the Google Play Store with an average rating of 4.5 stars! It’s also available on the Apple App Store and Steam with just as great of reviews on these platforms. So what makes Among Us so great? Let’s dive in and take a look!

Among Us is all about working together online with a group of friends to prep a space ship for take off. You’ll play as one of the little astronauts tasked with running around the space ship and completing simple puzzles to prepare the ship for take off. The only problem is that one of your crew mates is an Imposter

The Imposter’s only goal is to sabotage the ships take off and murder it’s crew members…

Think of it as Clue in space but not so boring.

Each game starts by joining a lobby and waiting for enough other players to join to start the match. A level is selected and all players start in the same room. At the start of the match each player is notified, in secret, if they are an astronaut or an Imposter. It’s up to everyone on the team to work together, watch each other’s backs, and get their ship ready for take off before the Imposter(s) can ruin it all.

As players move around the ship completing tasks like fixing up wires or setting buggy computer programs straight the Imposters are taking secret tunnels, cutting power to light systems, and taking other crew members out (and I don’t mean to dinner).

While astronauts are fixing up their spaceship, they may discover a KIA team member and can call an emergency meeting to discuss who the imposter might be. During this brief meeting (I’m talking like 2 minutes to try and get your shit together) team members try to discuss and determine who the Imposter is. The meeting concludes with a vote and the team member with the most votes is ejected from the spaceship. Vote wrong and you may just kill off one of your best buddies…

Among us is a great way to spend some time with family and friends. With it’s easy to pick up and understand rules, interesting mini-games, and savage ‘trust no one‘ experience it’s a solid addition to any Friday night fun. If you get a chance to download it drop me a message and we’ll go a few rounds to see whose the better Imposter!

Taking your Objects for a Swim

There are times while we’re coding that we need to create a number of objects to handle various workloads. This could be a Factory producing a number of enemies for a game or a SaaS application firing up multiple instances of a worker process.



Whenever we start dealing with a number of the same object like this we have to start considering object management, the lifetime of the objects, and garbage collection. If we don’t we’ll have to deal with out of memory exceptions, rouge processes, and bugs, bugs, bugs…

photo cred: Wynand Uys

Thankfully there’s a solid way to handle all of these objects, not only in a clean way, but in an efficient way. That way is called, Object Pooling.

Object Pooling is the concept of taking each of our created objects and placing them into a group or “pool“. Then when our game or application needs to use one of these objects, we provide a way to check that pool, find an inactive object, activate it, and return it to the caller.

Advertisements

If we check our pool and find there are no free objects available because they’re all already in use somewhere else, then we can provide the functionality for our pool to create us a brand new object, add it to the pool, and return it to our caller.

When our callers are done with their objects they can shut themselves off and remain inactive in our pool until another caller needs to request the object. Whew… okay that got technical so let’s break it down a little bit and see how it looks in code:

//our "pool" of enemies
List<Enemy> enemies = new List<Enemy();

//our function to check our pool for an enemy that is inactive
public Enemy GetEnemy()
{
   foreach (var enemy in enemies)
   {
       if (!enemy.IsActive())
         return enemy;
   }
}

So in a very basic example we have our “pool” and a way to get inactive objects out of that pool. But what happens if there aren’t any objects in our pool to begin with? What happens if there are some objects in our pool but they’re all in use and there aren’t any in active ones to be returned? Let’s see what else we can add to fix this.

Advertisements
//let's add some functionality to create a new enemy if our list has none 

//our function to check our pool for an enemy that is inactive
public Enemy GetEnemy()
{
   //loop over our pool and find an inactive enemy to return
   foreach (var enemy in enemies)
   {
       if (!enemy.IsActive())
         return enemy;
   }

   //if no enemy returned, create a new one and add it to the pool
   var enemy = new Enemy();
   enemies.Add(enemy);
   return enemy;
}

So what did we change here? Well we gave our GetEnemy() function the ability to not only find an inactive object to return to the caller but we added the ability for it to create a new enemy if there aren’t any available enemies to return. This means that no matter what, when we call GetEnemy() we are guaranteed to get an available object returned back to us.

photo cred: Joe Calata

This is essentially the bread and butter of Object Pooling, but why is this better and what are the advantages?

  1. We get a single place to find and get an available object
  2. We’re not forcing our application to create and destroy objects over-and-over, eating up resources.
  3. We’re not allowing our objects to run free. They’re all contained and managed in our “pool” and if we wanted to, we could turn them all off.

Now how do we know when the best time is to use Object Pooling? If you find you’re creating and destroying a number of the same object, repeatedly overtime, you should be using Object Pooling. The performance gains are significant and the pattern can be implemented in any scenario.