Monthly Archives: December 2016

Books I Read in 2016

I love reading. So much so that I read over 20 books this year.
This is a brief breakdown of most of the books I read.

Game Design and Game Creation Books

Since I am teaching myself game design, I started reading books related to getting better at making games. There are several more in this category that I plan on reading for 2017.

The Art of Game Design: A Book of Lenses – Jesse Schell

This was the main book I found when Googled which books to read about game design. It is an awesome book covering game design pretty thoroughly. It is a long read and full of great information. I would definitely recommend anyone who is making games or thinking about making games give this a read.

Game Programming Patterns – Robert Nystrom

This is a free to read online book (you can purchase print and e-book formats) that covers various patterns that you find in games and game engines. Even if you are using an engine that takes care of most of this stuff for you, it is still worth a read to learn about what is going on behind the scenes.

Making Games with PhaserJS – Thomas Palef

I mainly read this book to get some ideas on the format of a book teaching people how to make a game. One of the most useful ideas I got from reading it was to look into the engines and plugins that were made for Monkey-X that handled physics and other things I had been calculating before. It is what led to me looking into FantomEngine. A really good read and a good tutorial for learning the PhaserJS game framework.

General Programming Books

My daytime profession is being a programmer and the games I make are primarily video games. It follows that getting better at programming would greatly benefit me.

Clean Code: A Handbook of Agile Software Craftmanship – Robert Martin

One of the most influential books that I read this year. It really helped me be more mindful about the way I made my games and wrote the code to make it easier to come back to. The difference in the way I wrote and looked at code before I read this and after is huge. Anyone who is going to write code to make a game should read this book. I will probably read it again in 2017 as a refresher.

Agile Web Development with Rails 4 – Sam Ruby, Dave Thomas, DHH

In teaching myself Ruby on Rails this year, I went through this book and did the exercises in it. It is an okay guide to the Rails framework and a pretty solid foundation for a beginner.

Books on Productivity

If you can figure out how to create more value in an hour than anyone else, you can probably rise to the top and write your own ticket.

Linchpin – Seth Godin

A pretty good book about being the kind of person that is really valuable to a company. Can strongly recommend.

The 10X Rule – Grant Cardone

Basic message is make your goals bigger and push harder for them if you want to achieve success that others can only dream about. Inspiring. Definitely worth the read.

The War of Art: Break Through the Blocks and Win Your Inner Creative Battle – Steven Pressfield

I wrote about some of the ideas that I had heard from this book, then I actually read it. Strange order I know. The author primarily warns you about Resistance and encourages you to fight through it and not let it stop you.

Do the Work – Steven Pressfield

Written by the same guy who wrote The War of Art, this is a short book that kind of walks you through a project and gives you warnings and tips about how to finish a project. I especially like what it says at the end. Ship your project, then start a new one. Liked this a little better than the Wart of Art.

The 12 Week Year – Brian Moran

Basically saying you should set 12 weeks worth of goals at a time, not 12 months although they might be the same size goals. One of the reasons I picked this up was because I noticed that my goals were morphing and evolving over the year as I learned and got more information. The plan in this book is ok and I am going to start 2017 by trying it out.

Action Strategies for Personal Achievement – Brian Tracy

This is not a book. It is a course that you can get on Audible and it is pretty long. There is a ton of good information in this course. Definitely recommend getting it and listening to it. I am currently listening to it again because it has so much good stuff in it.

Finance and Business Books

We all deal with money, almost on a daily basis. It would benefit everyone to master this particular area. Also, understanding business will help you understand money.

Money Master the Game – Tony Robbins

Book about how to invest using the strategies of the super wealthy. Covers proper mindset about money and then tells you how even low income people can invest to have a good retirement. Definitely worth a read if you invest in the stock market or have a 401K or IRA.

The E-Myth Revisited – Michael Gerber

Awesome book. Really powerful look at small businesses and entrepreneurs and why they fail. Thankfully it also includes how to do it right. The key is systems. Will be reviewing this book again in 2017 as well. Must read for anyone starting a business for the first time.

Never Split the Difference – Chris Voss

This book is about the art of negotiating effectively. The author takes skills he learned as a hostage negotiator for the FBI and applies it to business and life in general. Super powerful book. Will be keeping it handy.

Millionaire Real Estate Investor – Gary Keller

I bought my first home this year and I am looking into doing real estate investment. This book was recommended by someone I know who has invested successfully in real estate as the only book he would recommend. It has good, actionable strategies and plans for investing in real estate. Definitely pick this up if you are planning on doing any real estate investment.

Rich Dad, Poor Dad – Robert Kiyosaki

This book is primarily about having the correct money mindset. Getting rid of the limiting and disempowering beliefs you might be holding about money and replacing them with stronger beliefs and understanding. Great read.

Self Improvement Books

One of the things I picked up near the beginning of the year was that if you work on your job you can make a living, but if you work on yourself you can make a fortune. To that end I read several books and listened to several courses and talks to work on myself.

Outwitting the Devil – Napoleon Hill

I listened to this on Audible on a recommendation and I can recommend this format as well. The voice actor for the Devil character does a superb job. The format is an interview with the Devil who tells his secrets for keeping people from being productive and living good lives. This was written by the same guy who wrote Think and Grow Rich (which you should also read).

How to Win Friends and Influence People – Dale Carnegie

Powerful book on how to interact with people in a way that you both come out of the interaction feeling positive. Good warnings on common missteps and great advice on how to form better relationships. I read this 3 times this year. I will be rereading it next year.

Re-Awaken the Gian Within – Tony Robbins

Pretty good book about creating lasting change and how to get what you really want out of life. Would recommend reading. You can get it for free. I may reread it soon.

7 Habits of Highly Effective People – Stephen Covey

Classic book on self development and self improvement, and I now know why. Stuffed with value, you should definitely find yourself a copy of this book. One of the most interesting ideas for me that the author puts a name to is the Emotional Bank Account. It spells out a phenomenon I have seen occur all the time with regards to various relationships.

The Power of Now – Eckhart Tolle

Weird book. Has some good ideas in it such as not letting past and future events give you anxiety. Had some trouble following the written style, I imagine it would be easier to listen to. Some of the stuff in it is kind of mystical sounding. Not a strong recommendation on this one, but there is value here.

Good to Great – Jim Collins

Another classic book on self improvement. Comes up with various principles on what it takes to become great and then gives case studies. A solid read.

Man’s Search for Meaning – Victor Frankl

An interesting little book written by a Jewish Psychologist (Psychiatrist?) who survived the Holocaust and being worked to the bone in a concentration camp. Some good points on the meaning of life.

As a Man Thinketh – James Allen

More of a pamphlet than a book. This short read is still super valuable. You can find it for free on Project Gutenburg. Wholeheartedly recommend.

Fiction

Although a lot of my reading this year was focused on making games, self improvement and business, I still found some time for a few good fiction books.

Atlas Shrugged – Ayn Rand

Huge book. One of the thickest on my bookshelf. It is also thick with a great story and a great point. Super enjoyed this book and the underlying message. 100% recommend reading it although I would recommend getting the Kindle version for portability.

Catch 22 – Joseph Heller

I had heard this phrase growing up and wanted to learn about its source. This book was a ridiculous story and very entertaining. The author has a way with wording sentences that was fun and may help you increase your vocabulary. Can definitely recommend this as a entertaining read.

Other

Evolution 2.0 – Perry Marshall

An look at evolution from an communications engineer perspective. Very thought provoking and well written. Definitely recommend this to anyone who is on either side of the evolution/creation debate as a valuable perspective.

The Reading List Is Growing

I already have more books than this that I want to read in 2017, not to mention the ones in this list that I want to reread. We’ll see how far along I get.

First Monkey-X Game: Player Destruction and Game State for Losing

Our player can fire projectiles and destroy enemies. He can run into enemies and take damage. But right now the player does not get destroyed.

In this part of the tutorial, we will move to a Game Over state whenever the player gets destroyed. This will cover some of the basics of FantomEngine’s layers and scenes.

Game Over State

Right now, we only have the default layer and scene which we are playing our game in.

In order to be able to move to a Game Over state, we need to create a new scene that the game can transition too.

Now we have a play scene that we will run the game in, and a game over scene that we will show when the player gets destroyed.

Right now the game over scene doesn’t have anything in it. In the game’s OnCreate method, we will build our game over scene by adding some text that says “GAME OVER”.

It is important to remember with FantomEngine that whatever layer is the current default layer will be the one that things get added to. This is why we need to change the default layer to the game over layer when adding the Text object and switch back when we are done.

NOTE: The font system is not particularly well documented for FantomEngine. It supports FontMachine and EZGui style fonts. You will need a PNG file and a TXT file describing the layout in your project_name.data folder for it to work. I was able to use a tool called Hiero to convert Google font VT323 to this format. There will be an appendix section covering this. There is a sample font in the examples that come with FantomEngine which you can use in the meantime. I will also try to make the converted font I did available.

Switching Scenes

Our final step will be to add a check to the OnUpdate method to switch the scenes if the player is destroyed.

And now we have a playable and basic version of our game where the player can move, shoot enemies, and be destroyed which ends the game.

First Monkey-X Game: Projectiles and Score

We have all sorts of enemies flying at our hero and if he hits them they disappear. Now we need to incentivize him to NOT run into all the bad guys.

Our next steps are to make enemies damage our hero when he runs into them, give him the ability to shoot the enemies before they reach him, and give the player points whenever they successfully destroy an enemy.

Health

Since all of our enemies and our player are Characters in our game, we can handle keeping track of their health in our Character class.

To do so we will add a health field and give each enemy and the player some starting health and a maximum amount of health.

Now we need to change our game creation code and our enemy generator to pass in health for our player and enemies.

Damage

Now that characters have health, we should give them the ability to take damage.

Let’s change the OnObjectCollisionMethod to cause the player and enemies to damage each other when they run into each other.

In our character class we are going to add a method that handles units taking damage. Then we will call it from the character Update method.

And in our OnUpdate method, we will make some changes to handle updating characters to damage them and destroy them.

Now when you run the game, when the player runs into an enemy it causes damage instead of outright destroying them. Enemies with more than 1 health won’t be destroyed. And after the player takes too much damage, they will no longer damage enemies. Eventually we will add a GAME OVER or lost life for this case but that will come later.

Projectiles

Now that we have characters taking damage, lets give our player the ability to shoot at enemies and destroy them. We will start by making a projectile class and a projectile type class. Create a new file called projectile.monkey that we can start making projectiles from. It will have a constructor and an update method.

and a file called projectile_type.monkey

Projectiles have a variety of attributes. First of all they have a box that can collide with enemies, and when we make enemies that shoot, with the player. Next they have power. This is done so that powerups can make the player’s projectiles stronger.

We also give the projectiles maximum speed, range, and acceleration. This is also for handling upgrades and how different weapons on different player ships or characters will work. We can have a short range, fast moving projectile. We can have a long range projectile that starts slow but speeds up over time which we handle with the Projectile’s Update method. Whatever we want.

The reason we separate the projectile type attributes out is so that we can store each character’s projectile type in their character class.

Firing

Now we want our player to be able to make some kind of projectile when the space bar is pressed. We are going to give the player character a type of projectile to fire and limit their fire rate. The idea is that whenever the fire key or button is pressed, we will true to the game engine and it will create a new projectile at the player’s location.

First we need to pass in a ProjectileType as part of the Character class constructor.

And modify the Character class to have a ProjectileType

Now we are going to add a projectile creation function for our game, and set up the SPACE bar to be our firing control.

You should be able to “fire” bullets now. Currently we are not restricting how fast you can fire, which means you can use bullets to draw a line on the screen. Our next step is to limit the players fire rate. We will do that by giving characters a last fired time as well as giving projectile types a rate of fire.

Start by updating the ProjectileType class.

Then in the Character class, lets add a method that determines whether or not a character can fire.

Finally, add the check for whether the player character can fire or not in our games OnUpdate method. Also we are going to make some small modifications to the CreateProjectile method

Your player’s character should now be firing little light blue bullets about every half second if they hold down the space bar.

Projectile Collision and Damage

Now that we can fire projectiles, we want them to actually hit the enemies and do damage to them. This means we need to modify our CustomEngine Class OnObjectCollision method to tell enemies to be damaged by projectiles and to set projectiles to destroyed when they hit enemies. While we do that, we will also refactor our other collision code to make it cleaner.

We also need to remove all projectiles that hit enemies from the game, so they don’t hit enemies twice. And since we are not currently calling the projectile’s Update method each loop, acceleration will not work yet. Let’s add that in as well as we loop over the projectiles.

When you run the game now, bullets that hit enemies should disappear and enemies that take enough damage should be destroyed (at this point red enemies take 1 damage, green take 2, and blue ones take 3).

Score

For the final part of this section, we are going to give the player points whenever he destroys an enemy. To do this we need to assign each enemy a point value, we don’t want those tougher enemies to be worth the same as the weak ones.

To do this, we are going to store a point value in the Character class. The player character won’t use it and that is just fine. We will also make a method for increasing the points earned. Then whenever an enemy with 0 health is destroyed we will give the player that many points. The reason we are checking the health is that soon we will be removing enemies that fly off the screen to keep game performance up.

Now we need to modify the Enemy and player creation code to include point values in the constructors.

Now lets add a check in OnUpdate when we destroy an Enemy to increase the player’s score if the enemy’s health is 0 or less.

Now whenever we destroy and enemy, our players score will get updated. But we can’t see what the score is right now. Our next step will be to draw the player’s score on the screen. We will do that my adding a text draw to our OnRender method to draw the player’s score in the upper left hand corner of the screen.

That wraps up projectiles and scoring for now. Our next step is to be able to actually end the game when the player takes too much damage and to add some other game states.

Tutorial Part 7

November 2016 Goal Review

Time to review November before it gets too far away.

Goals

  1. Write 3 Blog Posts Per Week and Publish 2 – Only 4 written in November. My main focus in November was not so much on writing but on my next goal.
  2. 1 Game Designed, Created, and Released Per Quarter – This was the primary focus in November. I spent a good deal of time stabilizing the multiplayer server code for the game then on creating a build of it out on Heroku so that the web and eventually Android clients can play multiplayer on it. I was able to release the game out on Itch.io in November, and at the time of this review, it is also on the Google Play store for Android (although that was done in December).
  3. 1 Book Read Every 2 Months on Game Design – Still reading through the online version of Game Programming Patterns. Haven’t made a lot of progress through it because I have several other books that I am reading through. I usually have 3-5 books that I read through at once and usually only 1 of those is game related.
  4. 1 Article Read Or 1 Video Watched About Game Design/Creation Per Week – Again I watched a few more Extra Credits videos that came out in November and I have been reading the API reference for the Monkey-X FantomX engine. Refocusing on this a bit in December. However, I did go to a local game dev meetup in my area and followed along a bit with a Unity tutorial that was being taught. I also met some awesome guys who are making games in my area. I would strongly encourage everyone to do this. One of the guys told me a bout a game he was working on where you play through sound. It was pretty cool, you can check it out on GameJolt
  5. Get 100 People Reading Evolving Developer Per Month – Honestly have no idea how I did in November. I just switched analytics from Clicky which was fine and fairly lightweight, to Google analytics so I lost any history I had and Clicky’s free account only gave you like 30 days history anyway. But now I will have a little more insight and history as I go forward.

What Went Right

Game #2 was finally released to where people can play it. It is stable and multiplayer works through Heroku. I was able to write some good tutorial steps that I will turn into chapters of a book on making and releasing your first game using Monkey-X. And I met some awesome people in my area by going to a local meetup.

What Is Not Perfect Yet

I think this has mostly been a theme for the year, writing volume not at intended level. Looks even lower than average because I forgot to do the October review until December. Also I need to start documenting the things I watch and read so I can better track my progress. Finally, I need to work on solving more people’s problems because that is how to increase traffic.

Corrective Measures

I have gotten my sleep schedule back to pretty regular and have been doing more writing and programming as a result. Working on building a habit of writing down immediately when I watch or read something relevant to game creation. For helping more people, I need to start looking for problems to solve. This means reading blogs, forums and QA sites to find problems to solve and write about.

Gonna try a new goal pattern in 2017, stay tuned.

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

October 2016 Goal Review

Just realized that I did not write a review of my goal progression for October last month so here is a quick breakdown.

Goals

  1. Write 3 Blog Posts Per Week and Publish 2 – Wrote 6 so average is up. Less focused on monthly totals at the end of the year as I have a series I am trying to write as a tutorial on making your first game using Monkey-X.
  2. 1 Game Designed, Created, and Released Per Quarter – Drone Tournament (Game #2 of 2016) was progressed even more. The multiplayer server was basically finalized and released to Heroku as a first step to releasing the game.
  3. 1 Book Read Every 2 Months on Game Design – Finished the book on PhaserJS. Started reading through the online version of Game Programming Patterns. Great stuff, you should check it out.
  4. 1 Article Read Or 1 Video Watched About Game Design/Creation Per Week – I was planning on keeping a list of what I read or watched on game design and creation but I did not and cannot remember what I read. I did watch some videos from Extra Credits on Youtube. I have mentioned their videos before because they are really valuable. Check them out.
  5. Get 100 People Reading Evolving Developer Per Month – Got around 30 – 50 people’s eyes on the blog in October. Was not a focus this month as my primary focus in on wrapping up Drone Tournament and writing the tutorial series.

What Went Right

Still making progress. Got the multiplayer server into a stable build and pushed out to Heroku and starting to focus on making the interface better. Got the first couple parts of the tutorial series I want to turn into a book written. More people than the first 75% of the year were looking at something that I wrote.

What Is Not Perfect Yet

Although I am clarifying what I want to write about, the volume is still not there. Also did not do as much study on game design and creation that I wanted to.

Corrective Measures

Sleep schedule. It has been changing with the Sun going down earlier and coming up later and with the horrid daylight savings time changes. I need to get my sleep schedule back on track so I can put the time in where I want it.

Late review so I forgot some stuff. Now need to review November.