Category Archives: Game Design

First Monkey-X Game: Enemies and Collision

Now that the player can move around the screen, let’s give him some enemies to avoid.

Start by adding a collection to hold our enemy characters.

Now we want to modify the Character class just a little so we can have enemy characters and all of them don’t move when the player touches the controls.

Since we are only going to create 1 player character and we are going to be creating multiple enemies, we are going to give the is_player variable a default of ‘False’ so we can make all our enemies by only passing the first parameter.

Now we need to go and change our player creation code to tell the game that it is a player

Make Some Enemies

Now it is time to make some enemies. We are going to start by making a little generator that creates enemies every 3 seconds or so in our OnUpdate method. We also need to initialize our enemies list.

Now when you run this, you should have some little yellow boxes floating across the middle of the screen every 3 seconds.

Randomize the Enemies

Enemies that always come straight down the middle of the screen every 3 seconds are not that exiting. Let’s spice it up and improve our enemy creator code.

We are going to do 4 things. First we want to randomize where the enemies start. Next we want to randomize how fast they are going. We also want to randomize how often they appear. Finally we want to randomize how big they are and what color they are.

Running into enemies

Now that we have some enemies flying around the screen, lets add some code that checks if we ran into one of them or not.

This adds the checks, but right now we don’t have a way to tell the engine to do anything about them.

What we want to do is extend the engine so we can override its OnObjectCollision method. To do this we are going to create a CustomEngine class that extends Fantom Engine. Create a new custom_engine.monkey file and put in the following code.

One of the ways of passing information back and forth with the engine is by setting Tags and Text on the object. In this case we are going to tell the engine that whenever a PLAYER object and an ENEMY object collided, mark the ENEMY object as DESTROYED and make sure it cannot collide with the PLAYER again.

Now we need to go back and add the text to the player and enemy boxes. Also, in our OnUpdate method, we will remove all the enemies that get destroyed.

Now when you run the game, every time your little character runs into one of the little enemy squares, the enemy should disappear.

Now the Game Truly Begins

With collision working, we can start adding projectiles for our hero to stop the enemies before they even touch his little box.

Tutorial Part 6
Tutorial Part 8

First Monkey-X Game: Creating the Player

One of the first things I like to do when making a game is to build the fundamental mechanics in first. In this case it will be the player’s character and the ability to move around the screen.

In order to keep the code clean, we will separate the character out into its own class.

Draw

We will start by adding the character to the game and drawing it in the form of a rectangle. To do this we need to give the Character class a ftObject representing a box. Then we will create a character in the game’s OnCreate method.

We also need to update the OnRender method to tell the engine to draw all of the objects

Now when you run the Main file you should get a black rectangle on a red background.

Pretty basic but that is what we are going for.

Movement

Now that we can see the player, let’s add some controls so they can move around the screen. We will put the handling of the controls in the Character class by giving it an Update method. This way we can keep the code clean. For now let’s use the arrow keys to move our player around.

Now all we need to do is call the character update method from our game’s OnUpdate method and we will have movement.

Run this and you should be able to move your little rectangle around with the arrow keys.

Boundaries

We don’t want the player to lose their character by it flying off the screen, so let’s prevent the player from being able to leave the viewable area.

We will do this by adding some additional checks in the Character class Update method.

Now when you run your code, you should be able to move the box around with the arrow keys but it should never leave the viewable area.

Our next steps will be to add enemies and the ability to shoot them.

Tutorial Part 5
Tutorial Part 7

Game Devs Like You

One of the many things that my studies in success have consistently directed me towards is forming a Mastermind. The word may sound fancy but it is simply the idea of 2 or more people who meet together to share advice and ideas.

In game development especially, a mastermind would be extremely helpful. Sharing resources, pitfalls, and ideas in something so complicated is extremely beneficial to all involved.

So a few months ago I started looking into this a little more seriously. I have not found or formed a mastermind as yet, but I did find an opportunity to join one remotely.

Gamekedo

Gamekedo is a game development club organized by Chris DeLeon. They work mostly in Unity and work together to make games.

The club has monthly dues but for someone just starting out in game development it sounds like a great opportunity (especially if you are interested in Unity).

Game Devs Like You

In addition to the club, Chris also runs the Game Devs Like You podcast in which he interviews people in game development. I have only listened to the first couple episodes so far but they are fantastic. The first episode is with a game dev who is only 12 years old (what’s your excuse?).

It is an encouraging and informative podcast and I will be adding it to my Ultimate List of Game Development Podcasts

If you don’t already have a group to discuss games and game design with, consider looking for one in your area or online.

10 Things Analysis: Texas Hold’em

It’s been a while since I did a game analysis and since Game #3 for 2016 is going to be a card game, I decided to take a look at one of the many card games I enjoy, one that is been around for a while and played worldwide. The game I chose is Poker, specifically the Texas Hold’em style.

How I Know the Game

I had seen some Texas Hold’em played before on TV during the World Series of Poker (WSOP, which incidentally has been going on for the past few weeks), but had never played it myself and didn’t really understand it until a couple years ago.

Some guys at work where having a little home poker tournament and a friend of mine invited me to come play. I didn’t know the rules so he taught me the basic rules and then I proceeded to watch the coverage of the prior 2 years of WSOP on Youtube before the tournament to prepare.

I didn’t do all that well. And although I lasted longer than my friend, I did not have a strategy for how to win.

About 8 months later I happened across a Twitch streamer named Jason Summerville who was streaming poker of all varieties every evening and I began to watch and listen. After a couple months of watching him and about a year after my first time playing Poker, the guys at work scheduled another tournament.

Again I watched WSOP, continued to watch Jason, and played some practice games with a Poker app or 2 on my phone. This time I ended up coming in 2nd place out of about 20 guys after some real close calls. It was often and I am smiling now just thinking about it.

On to Analysis

Many of these things will actually apply to all kinds of Poker but I am mainly looking at the Texas Hold’em, tournament style.

Goal

The goal of the game is simple, win all the chips. In a tournament, typically all the players will start with a similar number of chips and if you lose all of your chips you are out.

Rules

You play the game with a standard deck of playing cards. You can play as long or as short as you want and in a tournament this is usually until one player has all of the chips. The game is played in hands and each hands has several rounds of betting. Whoever wins the hand gets the chips that where bet by the various players.

You can find a more detailed description of the rules here.

Interaction

Players have 2 basic ways to interact with each other. The most obvious is through betting. When you bet it forces your opponents to make a choice of whether to fold (let you win), call (match your bet to continue playing), or reraise (force you into this decision by putting more chips in). Also the size of your bet gives your opponents information about how strong you think your hand is, or how strong you want them to think it is.

The other less obvious methods of interaction is through table talk and nonverbal communication. Good players can read body language fairly well and can even fake body language giving their opponents false information.

Catchup

One of the things about poker is that you can come from behind and win. This is usually done from “doubling up” or doubling the amount of chips you have by going “all in” and betting all of your chips that you will win. However like all catchup features, it has risk. If you lose the hand when going all in, you are out of the game.

Inertia

Each hand has 2 blinds, a big blind and a small blind. These players have to bet certain amounts each hand. This responsibility rotates around the table by one seat after each hand. The blind is also usually the minimum amount of chips you have to raise by if you want to raise. Most tournaments have the blinds increase every so often to move the game towards completion.

Surprise

Poker is full of surprises. This comes with any game that has randomness and hidden information. For Texas Hold’em you are surprised by the cards that are revealed each round and by the cards your opponents have.

Strategy

Despite the randomness inherent in a game like poker, it is full of strategy. How else you several people consistently make a living at it? Most of the strategy comes down to playing the odds and playing the other players. There are books and websites dedicated to how to play poker well. One of the great things about poker is that it is unlikely that you will ever be able to play perfectly.

Fun

There is a ton of fun in poker. Every time you put the pieces together of whether you can beat your opponent or not based on the limited information you have it is awesome. It is like one puzzle after another and can be kinda rewarding.

Flavor

This one is tough. I am not sure that poker has a flavor and that is OK.

A Hook

In a word, money. This is what gets most people into any sort of gambling game to begin with. It is a powerful hook and can lead some people into spending too much money on the game.

Final Thoughts

There is actually an interesting crossover between people who play Poker and people who play Magic the Gathering (like me). And like MTG, Poker is a very fun game and there is a lot of strategy to be found in it. It has most of the elements of our 10 things list and is not surprisingly very popular. If you have never played before, I recommend giving it a shot. Although I will add that you probably should not play for real money (at least not at first and never more than you can afford to lose).

Have fun making games that stay popular like Poker.

Game 3 of 2016 Design Notes

It is now well into July and the 3rd quarter of the year. Game 2, “Drone Tournament” is not finished yet as the multiplayer still needs more work, but I have a schedule to keep.

Since the beginning of the year, I knew I wanted to make a simple card type game this year. I really enjoy many card based games like MTG, Poker, Munchkin, Duelyst, and Cards and Castles and want to begin coming up with ideas in this area.

The Game

The design right now is based around some of the core mechanics from MTG with some of my own flavor and rules tossed in. Additionally even though I have not played Hearthstone directly, I may borrow some of it’s mechanics as well.

Goal

The goal is to reduce your opponents character life total to 0. Pretty straightforward. This will be accomplished through attacking with your various creatures and abilities.

Rules

For this game, the rules need to be spelled out pretty clearly since it can ostensibly be played 100% on paper and no computer is needed. The following rules may change.

Each player chooses a character to represent them in play (those familiar with MTG Commander or EDH this would be like a commander but also like a Planeswalker). This character can be attacked by opponents creatures and targeted by their abilities.

Each player takes a turn that sequences as follows.

  1. Renew Resources – resources that have been used are untapped then you draw a card
  2. Status Effects Happen – any status effects that are on creatures or players apply during this phase
  3. Main Planning – players play new creatures, increase their resources, use abilities, play equipment, and modify creatures during this phase
  4. Combat – players attack with creatures and or their character during this phase
  5. Secondary Planning – same as Main planning
  6. Turn Ends

Again these rules may change a ton.

Interaction

Players can do all sorts of interaction with their opponent by attacking, blocking, and using abilities to disrupt their opponents plan.

Catch Up

The game is not over until it is over. Their will be abilities that can bring a losing player back into the game and some that can help stabilize a losing situation.

Inertia

The steady increase of available resources will unlock the player’s ability to use more powerful creatures and abilities which will bring the game to and end sooner. Considering implementing the Cards and Castles rule that when a deck runs out of cards, the player’s life starts decreasing slowly.

Surprise

Hidden information games always contains surprise. In games like this there are 2 main areas for surprise. First your own deck. You do not know what you will draw each turn and in what order. Second your opponents hand and deck. You do not know what he has planned for you.

Strategy

With deck building, strategy comes into giving yourself a good percentage to draw a sequence of cards that can be used to win the game. This skill can improve over time. With play involving hidden information like this, the strategy becomes making the play that gives you the highest chance to win with the resources that you have available and might become available later.

Fun

I am borrowing the fun from several other games so I expect this game to be fun as well. If the art of game design is to be believed, fun is just problem solving with a playful attitude and a little surprise mixed in certainly helps. This game is all about that.

Flavor

The flavor is sort of going to be borrowed from one of my favorite RPG’s called Geneforge. I plan on asking the creator of the game if I can use the flavor directly but if I can’t I will still use the ideas, just flavor them slightly differently.

A Hook

This one is actually gonna be kinda tough. There are so many TCG’s (Trading Card Games) out there that occasionally I see one and think to myself, “not another one.” But I am also hopeful about some. Regardless, I think the hook will have to be something along the lines of strategy, deck building, and defeating your enemies with your awesome monsters.

Final Thoughts

While I don’t necessarily think this game will be a huge hit, I am excited to try to make a card game with a pile of mechanics that I think might be cool. It’s not a bunch of new stuff, but it is a different mix.

If you can’t think of new things to make, try mixing old things.

Handling Edge Cases – Literally

Game #2 is coming along quite well and as it is getting farther along I am running into certain design decisions. One of these is what to do when a player’s little drone gets to the edge of the map.

Why have a limited map size at all?

If you take a look at 10 things every game needs, you will notice that #3 on that list is the need for Interaction. Limiting the map size keeps a player from just flying away from their opponent for forever and no interaction happening.

What are the options?

After taking another look at Steambirds, they used 2 different approaches between their web version and their iPad version.

In the web version, if you get close to the edge, there are stationary turrets that destroy your little airplane as it flies off the edge. So option 1 is to destroy anybody who flies off the edge.

In the iPad version, the game prevents you from flying off the edge and makes your airplane sort of slow down and turn sharper so that you cannot fly off the edge. So option 2 is bend the movement rules near the edge of the map so that players can’t fly off.

Option 3 that I came up with, and the one I went with, is to allow the player to move outside of the map, but sort of do a 180 degree flip and bring them back at the edge of the map. I borrowed this idea from Star Fox which I spent many hours playing on my old N64.

Why choose that option?

First of all, it is a really easy option to implement. Just check if the next control waypoint is outside of the map and set it to just inside the edge that you crossed.

Second, I don’t like the idea of destroying the player if they go past the edge on a small map like I am using.

Third, I think it will allow for a little extra Strategy (number 7 in our list of 10 things games need) for players to flip around on the edge of the map.

Remember

When you are thinking about how to handle edge cases in a game, consider all of your options then ask yourself which one will make the game better and why.

Keep being awesome and making games.

Book 1 of 2016 Review – The Art of Game Design

I wrote an initial review over the first few chapters of the book earlier this year, then quickly realized with the types of notes I was taking it would take forever to finish the book. Well it took 5 months anyway with everything I had going on. I suspect if I had focused on it bit more I could have finished it in 1 month no problem. This is a very brief set of notes with a thought about every chapter.

Rating 10/10

This book is fantastic. It is essentially 500 pages of great ideas and questions to ask yourself when making a game. This may sound overwhelming and it is a little, but just get 1 or 2 of the ideas at a time. In fact, there is a separate little deck of cards that can be bought (or you can make your own) from the “lenses” in the book. Highly recommend anyone who is interested in games creation, game design, or the game industry read through this book.

Notes and Thoughts

The only way to be a game designer is to design games (and make them). So if you want to be a game designer say “I am a game designer” and go make games.

There are several important skills every game designer can have but the most important is the ability to listen. Not just listening to what people say, but also to their body language and other non verbal communication.

As a designer, you are really designing an experience that the player(s) of the game will have. Then you design a game that will deliver that experience.

Games are made for players. Who is your player? Ofter written as, who is your target demographic?

Even though people usually interact with the game through some sort of interface, the experience you design actually takes place in the player’s mind.

Games are made up of different elements. Only one of those elements is the game’s mechanics. This includes rules of the game and the playing pieces and interactions.

Balancing the game’s mechanics is very important to the experience.

The mechanics of the game support puzzles in a game. By this we mean that there is some sort of problem solving in the game caused by the mechanics.

All games have an interface so you can play them. It is a loop. Player puts inputs into interface, game interprets and gives an output, player interprets the output and gives a new input. The ideal design is to have the interface add to the experience that is being designed.

Interest curves are very important for judging experiences. One of the most effective interest curves is well known and is basically a short period of rising action at the beginning, a small drop in action, then a longer period of rising action to the climax of the story. However the best interest curves are fractals of this curve so that a small arc of the story along this larger interest curve will also follow the same pattern.

Stories are one type of experience. The dream is to have a completely interactive story with open endings. This is both difficult and impractical for now (see this post I wrote about branching explosion of story writing). There is good ways to design story into the game and the book has several good tips.

The game and the story can be merged together with “indirect control.”

Stories and games take place in worlds. Some of the best worlds are those that people actually want to visit and even pretend to visit and translate into other forms of media well.

There are characters in our worlds. We want to create compelling characters.

Worlds contain spaces, we usually call them levels. You can use the design of the spaces to create a better experience through giving visual clues the players may not even notices but react to and follow.

The aesthetics of the world define its look and feel. Sound, art and the technology used to create the world all work together to help get the experience where you want it.

Some games are played with other people. This can sometimes get a little tricky.

Sometimes communities form around games. It is important if you are designing a game where you hope a community will form to build in support for a strong community. The author gives several good suggestions and examples of ways to build a strong community.

Game designers usually work with a team (even if it is only a team of 1 other person). Getting buy in from everyone on the team is super important. Keep communication levels good.

Sometimes the team communicates with documents. Make sure to not let them get stale.

Playtesting is the key to a good game. You can never playtest enough. You need to ask the playtesters: Why, Who, Where, What and How?

The team builds the game with Technology. Technology can be tricky, especially on games that are being developed over a multi year cycle. Choose carefully.

Games usually have a client. By this we mean someone who is financially backing the game.

The designer usually gives a “pitch” to the client to get them to buy-in to the idea of the game. There is a list of tips for how to give a successful pitch.

Most of the time, the client (and you as the designer) want to make a profit from the game. You should spend some time learning the lingo of game sales and figuring out the business model of the game.

Games actually change the people who play them, the book uses the word “transform.” Games can be both good and bad for you.

Because of the affects games can have, game designers have certain responsibilities.

Every game designer has motivation, what’s yours?

The End

Seriously, go get this book and read it. Even if you don’t want to design games, it still has valuable ideas for anyone wanting to get into design or creation of software.

What I Learned About Game Design From a Brazilian Steakhouse

What an Experience

I attended the Open Source Conference in Austin TX. It is a pretty good conference and there are a lot of people out there doing amazing things. But as interesting as the conference was, I learned the most from going to a restaurant.

While I was there, my coworkers and I tried out a few of the local eateries. Several were good, but 1 of them stands out far above the others. One of my coworkers who was not at this conference and is from Brazil had recommended we try a Brazilian steakhouse called Fogo de Chao. It was a restaurant experience unlike any I have had before.

There was no written menu, other than a drink menu. There was no visible price listed anywhere. They had a salad bar with a few various vegetables and other side items, but the main course was why we were there.

Several waiters walk around with 3 foot long kebabs with different cuts of meat on them. They had steak in all sorts of varieties, chicken, pork, and lamb.

It was amazing.

It was by far the best restaurant experience I have ever had. It was so good I wanted to tell people about it. It was a little expensive for my current salary range (thankfully I got to expense it) but it was so good I would go again having to pay for it myself and I would recommend others that they have to try it at least once.

Designers Create an Experience

One of the major themes in the Art of Game Design is that the game creates an experience for the user and the game designer is responsible for designing that experience. The goal of the designer should be to create an experience like the Brazilian Steakhouse.

You want to design an experience that people want to have again. You want to design an experience that people want to tell other people about and that they want other people to experience.

So take a look at your current game and ask yourself these questions.

  1. Does my game create an experience that the person who plays it will want to have again?
  2. Does my game create an experience that people will want to tell others about and want their friends to have?

If the answer to either of these questions is NO, my questions is, why not?

Games As A Service

Today we are going to talk about Evergreen games. Some games get away with being both Evergreen and Consumable like Call of Duty and Halo with their consumable single player campaigns and evergreen multiplayer service. I got some of this idea from reading an article written by Daniel Cook about playing a single game as a lifelong hobby. He put into words several ideas that had been bouncing around in my head for a few months about the kind of game I would eventually like to design.

I am a (Fill in with Game Name) Player

Many non-digital games are often played many times over the course of ones life. And often people get associated as a player of that game. He is a chess player. She is a soccer player. He is a basketball player. She is a poker player. And the list could go on.

The idea is to create a game that people enjoy playing over and over and make playing it part of their identity. This is where a lot of the E-sports games come from.

Game as a Service

There are a quite a few examples of games as a service out there, just pick almost any E-sport game and you have one. Almost all of them share a common set of attributes.

  • There is a low barrier to entry. Usually free or a small one time purchase.
  • The game is easy to play but hard to master.
  • The community is stable and there are competitive events around the game.
  • There is some sort of cycle of new content or regular changes that keep long time players interested.

A lot of these attributes are focused on the Strategy and Hooks section of the 10 things every game needs. You need the hooks like a low barrier and a large community to get players interested. Then the slow influx of new content and the deep strategy or at least slightly evolving strategy based on the changes keep the players interested.

The Connection

With my current game, I want to design an experience that people can play in an evergreen way. So I need to study what kinds of things make for a good evergreen play experience. In addition to writing the article that inspired this post, Daniel over at Lost Garden games also worked on Steam Birds and wrote an article that talks about how they designed it to be more evergreen.

I plan on using these insights to better design my as yet unnamed game to be able to be played over and over again.

Game 2 of 2016 Design Notes

Its time to start on game #2. After the last few games experimenting with MeteorJS and writing games in Javascript, I figured it was time to get back to a dedicated game platform. As of yet I have not decided which but am thinking of going back to Monkey-X or diving into PhaserJS. Additionally, I have changed one of my goals for the year. I will not be releasing games to mobile. They will however still try to be mobile friendly designs but just released for the browser.

But enough of that, into the design.

The Game

For game #2 I am planning on using a mechanic that I have seen in several games, the most well known probably being Steam Birds although an almost identical mechanic was used in a game from the 90’s called Critical Mass. The player will have a unit (or units) that they give commands to that then move and act in short bursts of “real time.” Like a lot of games it will be combat based where your unit destroys others and tries to not get destroyed itself.

Goal

Destroy the most enemy units over a course of X number of turns. Deathmatch.

Rules

Each unit will have speed and turning radius that limits there movement each turn. They will also have some health or toughness that when it reaches zero, they are destroyed. After a set number of rounds, the player with the most enemies destroyed wins. Ideally this will be multiplayer.

Interaction

Basic interaction is players score by destroying each other. May give units additional abilities or power ups to be able to interact with the opposing units.

Catch Up

This could either be a power up when destroying an enemy with more kills than you, or a bonus on respawn. Have not decided yet. We will play around with these ideas and see which one plays better.

Inertia

Like many good turn based games, this one has a set number of turns. Once they have all been taken the game is over.

Surprise

Random spawn locations and respawn locations. Random power ups perhaps. I was thinking of adding some sort of “cloud cover” where a unit could enter it and hide and nobody could see it and it could not see outside of the cloud. This would allow a player to change direction to get away but possibly make a bad choice and run into an opponent.

Strategy

I think in order to add a necessary strategic layer, the units will need some sort of limited consumable weapon, shield, etc. that players can learn to use more effectively. Possibly manage an energy level for weapons and shields.

Fun

I am taking an idea that I and presumably several others already find fun, 2D dogfighting, and adding some new twists that I believe will prove to be fun as well.

Flavor

With the energy idea, I am thinking space / sic-fi flavor. It fits pretty well and is one of my favorites. Maybe piloting drones in a space based tournament.

Hook

Sort of along the lines of taking something popular and adding other ideas into it. For me the hook is multiplayer version of steam birds. I think that would be pretty cool. Like 8-20 players battling it out, maybe even in teams. The turn based part of it might be a bit rough with that many players with each decision part of the turn needing a timer.

Final Thoughts

Looking forward to making a prototype of this game and start play testing. Learned a good bit the first 3 months working on game 1. Looking to learn even more in the 2 quarter of the year.

Keep growing and learning.