April 15, 2014

Catacomb Snatch 3D update


Catacomb Snatch 3D has been improved. The performance has increased by using techniques like object pooling and the code is more optimized and much cleaner. As you can see in the image below, the walls now generate gravel when they explode. 

Maybe the best improvement is that the mummies, snakes, and bats are more intelligent. They used to move around in one of four random directions, but are now moving with an angle. Since they are 2D in a 3D world, it may look silly sometimes. They have also begun to chase the player. 

The chasing is controlled by an AI algorithm called Finite State Machine (FSM) and the basic idea is that the enemies go through different predefined states. They patrol randomly around the map, but if they see the player from a certain distance, they begin to chase him. If the player gets away, the enemies will continue to patrol where they lost the player.

Update! I've added 2 new levels:

Sounds interesting? You can test it here.

April 13, 2014

Catacomb Snatch 3D

The makers of Minecraft, Mojang, made small game during a weekend for charity purposes. It was called Catacomb Snatch. Like Minecraft, Catacomb Snatch was made in Java and was a multiplayer game where the goal was to transport an unknown liquid from the center of the map to the start area. This is how it looked like:

I thought it could be a good idea to make a new version of Catacomb Snatch but in 3D/2D and at the same time learn Unity. The first part was to make a map generator that could read a small image file where each pixel in the file is a wall piece in the final game. So if you want to move a wall, or create a new level, you just have to edit the image. 

Catacomb Snatch 3D is different from the original version. The idea is that an explorer is exploring the desert, but his car breaks down. To find his way home, he has to walk through the desert. The problem is that he is low on water, so he has to find some. 

He discovers an unknown building. To get inside of the building, he has to use bombs. 

And to see inside of the dark building, he has to carry around a lamp.

The creatures are actually not hunting anyone (it may change in the future). The bats are harmless, but the snakes and the mummies will hurt the explorer if he's too close. To get through to the water source, our explorer can use bombs or his gun to kill.

If our explorer find his way to the water source, and drinks to 100, he will be able to walk through the desert without dying from lack of water.

Sounds interesting? You can test it here.

April 9, 2014

Braveheart Cubes in Unity

A long time ago, I watched a series of videos on this YouTube account where cubes fought battles with each other. I decided to make something similar in Unity. This was the result:

And here's the more Braveheart-looking version:

You can test a playable version here. The cubes are the soldiers and have to stand close to the enemy to kill it, and the more skinny cubes are archers that can only kill from a certain distance. If you want to help one side, you can add more troops with the "r" or "b" key. I also added a "chicken" function that makes the cubes with a low health run away. These chickens will come back again when they have regained their courage.

April 8, 2014

Experiments in Unity

I've found a new toy and it's called Unity. It's common to use Unity to make games, Rovio used it to make Bad Piggies, but more and more people are using Unity for other purposes. I've seen a few newspapers who are using it to make interactive visualizations, and a few makers of military software are also using Unity (see examples here). Unity is completely free if you are using only the basic functions, and the largest benefit is that the programs you design work on all devices, such as Windows, iPhone, Android, Web.

It's quite easy to learn Unity because a lot of people are using Unity. The creators of Unity have a lot of tutorials on their website, and there's more tutorials available on YouTube than what you have time to watch. You need to know how to code, you can use either C#, JavaScript, or Boo, and you will also have to learn to make 3D models in a program like Blender, which is also available for free, so it's really inexpensive and fast to get going.

Before programs like Unity existed, the aspiring developer had to spend several months to build a game engine. One famous game designer who is using Unity is Peter Molyneux. According to his talk at the 2012 Unity conference, it took him and his team 6 months to build a game engine before they could build the actual game. With Unity, you can experiment from day 1.  

This is how the Unity editor looks like:

The game is an experiment called Endless Road (you can test it here) where you drive a car, and the computer generates a new road as you drive. It also generates new cars and small jumps randomly. The car itself is actually a Tesla car - that's why there's no sound and no damage when it collides with other Tesla cars!

March 25, 2014

Satya Patel on using the Scientific Method for Growth

Satya Patel (his Twitter) used to work for both Google and Twitter, and is now working as a partner at Homebrew venture capital.

Lessons learned
  • Companies tend to "throw spaghetti at the wall" when they grow their company - they try everything between heaven and earth, and it ends up in a mess. Satya Patel argues that it's better to use a scientific approach. 
  • No companies fail for lack of ambition - they fail for lack of focus. By using a scientific approach to ask the questions you should answer, it can help you to focus.
  • You should be learning at every step. Begin with small steps, and as you learn you can increase the steps. Crawl - walk - run. 
  • The scientific method:
  1. Purpose. What problem are you trying to solve? Twitter asked themselves 2 questions: "How do you increase active user growth?" "How do you increase revenue?" Twitter focused on those questions, so everyone in the company had to orient their product ideas around these 2 objectives.
  2. Research. Can help you to clarify the question you are trying to answer and find new answers. The goal is to conform the hypothesis so you can have a focused experiment. Talk to your customers, team, and understand your competitors. You can also find surprising answers. By looking at data, Twitter thought the users liked to click on a button. But when they talked to the users, they realized that the users had misunderstood the button.   
  3. Hypothesis. What do you believe to be true? Make sure it's measurable. AdSense's hypothesis was that they thought that publishers had to put ads on the top of the page, but AdSense realized that ads on the bottom of the pager were much better. People read the text and clicked on the ads. Twitter tried multiple hypothesis to improve their landing page: "Change the text," "Remove the search function." 
  4. Experiment. Focus on the variables that matter. Twitter could have tested a million variables to optimize the landing page, but they focused on a few (maybe 10?) main variables.  
  5. Analysis. Use enough data to make sure the result is statistically significant. But if you are new, you don't have enough data. Then take the data you have and let your intuition guide you. Remember that data is not the end since data can lie. Look at the data and use your own judgment to find the right approach.    
  6. Conclusion. From their landing page, among others, Twitter removed the search because users searched instead of signing up, and the pictures of signed up users because it increased loading time.   
  • Don't forget to write down your conclusions and share what you've learned. 
  • Reinforce what you've learned. Lather - rinse - repeat!
  • To grow, companies are using Google Analytics, Optimizely, KISSmetrics.
  • There were two good way to grow Twitter: address book import and translation of the site. Twitter also realized that growth increased if they customized the site depending on what country the user came from.  
  • Even small changes matter as long as they are statistically significant and not expensive to implement. A small change each month will grow into a large change over several months.  

Related Posts Plugin for WordPress, Blogger...