Aug 182011
 

So, as I mentioned in the last post, we are doing a trade. A game for some artwork. So what I’m trying to do is a week game jam. Build the game in 1 week of about 10-20 hours of work. So far I’ve managed to put in 6 hours and the results are great. I’ve got a working gun system (except for the flame thrower) and zombie animations are playing correctly. Some polish has already been added even, namely infinite objects like arrows stuck in walls and eventually blood on the ground.

Since the Zombie genre is very over populated, I wanted to give players something a bit different from most zombie games and that is where we are going to give it. In realism. Trying to make things as real life effected as possible, while making the game playable for short periods of time. Since its a week game we obviously can’t include as much as we want, but if its received well we will definitely give it another week or two extension and give it a makeover. A screenshot of the game, the menu, and some of the bullet calculation code can be seen below.

Continue reading »

Jul 042011
 

Over the last few weeks at my internship (at Boeing, the aerospace company), I’ve been developing an app for Android to control the ARDrone, a quad-copter. Here is an image of the ARDrone, hosted on the Parrot company’s website.
I’m very impressed with the drone itself. Its got an incredible autonomous flight system built in which is incredibly powerful. You can push the drone and it won’t get upset. It will try to return to its original position you first had it at and try to keep itself stable. Its got a few limitations to it, like a 15 minute run time battery life as well as a distance limiter on it, due to the wifi signal.

The actual drone runs linux inside with either C/C++ which interfaces to the wifi and received by C/C++ code. I haven’t been looking at the actual code so I wouldn’t be able to tell you which one (C or C++) it actually uses. Then, to get the Java to talk to the C/C++ I’ve been using JNI and the Android NDK. That’s all some pretty ugly code combined, so thankfully I was able to base my code off existing Java software (though it was not Android compatible).

Since then, I’ve been working on porting the Java code library, called Javadrone to Android compatible Java. I’ve been successful in getting the ARDrone to communicate perfectly with the exception of receiving video feeds so far. The Android app I’ve written so far allows the user to take off, land, as well as connect and disconnect at will without fear of crashing the drone (I’ll go into the first test flight next…). I’ve been a bit hesitant to start working on direction controls merely because I’m worried that I will overdue the controls (yaw/pitch/etc) and cause the drone to flip out or majory crash and break. Even though its relatively cheap ($300 or so), I don’t think I want to be spending that much on buying a replacement.

Anyways, the story of the first test flight: I had just compiled the app and was going to test the takeoff button/command for the second time, since the first didn’t work. I press the connect button, wait a few seconds, then press take off. And it works! So then I start thinking about what would the drone do if I disconnected from it while mid-flight. I hadn’t coded that scenario for the drone and I figured the autonomous flight that was native to the drone would kick in. And it did! It just hovered there. Though I had no way to get it back to the ground, since I wasn’t connected, to turn the drone off. So I decided to connect to the drone to land it. Big mistake. Boom. The drone freezes its props (all 4 of ‘em) mid-flight. Thunk! it his the ground. Uh oh, I’m worried that I just broke the entire $300 ARDrone that wasn’t even mine. But it turns out to be just fine, though a bit jostled. Lucky break for me. To fix this issue, I just added a condition where if the drone is still in flight when you disconnect it sends a land command before disconnecting.

So the entire app I’ve coded so far is open source and available on my github page and you can download it here. Though I must remind you that it is a work in progress that I’m going to be spending at least another few days on. After this I will not be able to post anymore updates for the source code and will unlikely ever post updates, partly because I don’t even own an ARDrone to test out future updates. Feel free to modify and publish the source code, using the license provided, which says that you can use the source code just find as long as you keep the copyright and license info with it.

Jun 132011
 

Taking a look at our game stats, we have a record of most of the links out in Ruby Star. It is our most recently released game. With only a small bit of branding, located in a credits menu, users have to click 1 button to reach the credits menu. Then they can click links out. We have still been able to secure a good number of clicks out. However, the game was hosted mainly on a Chinese site that blocks links, and we have only had a 7% success rate. We have recorded that 2,525 links out to our blog alone have failed (though, the unique player number would probably closer to 1000, since failed users might click twice), while only 178 actually made it through, and of these 159 were unique.

There is a solution to lower these failed links in an attempt to force portals to allow links, though you would be sacrificing game plays most likely. PortalBlacklist will display a message on sites where links out are blocked and not let the user play the game on that site.

Jun 112011
 


The current version of MirrorMaze relies on some unique depth sorting, due to the 2 layers of tiles, all of which are graphically similar. Each tile has a lighted top and a darkened front, making the tile appear in 3d in perspective. Deciding which tiles to place where and when was the trickiest part of the display. The layer on the bottom must be added first, in the correct opinion, then the top layer can be added on top of that. You must also render from top to bottom of the screen to make sure each tile is placed ‘in-front’ of the tile behind that. How was this issue of depth sorting solved? Well here is some code.
Continue reading »

May 302011
 

Remember Cave Generation + Dynamic Lighting v1.0? Well we had a lot of really small areas in between all of those caves that aren’t really good for anything. Too small to be of much use for exploration value/mining value or anything. Writing an algorithm to detect those small ‘caverns’, lets call them, was not fairly simple. With such a large bitmap, I was encountering stack overflow with my recursive flood fill and area finder. What I really needed was a non-recursive function for the area finder and to use the bitmapdata.floodFill() function that is in the BitmapData class. The evolution of the area finder algorithm was recursive to color bounds using mass floodfilling to a non-recursive queue implementation. The filling algorithm just went straight to the bitmap’s floodfill which wasn’t limited by stack overflow as the recursive one I had designed. In the picture below you can see the areas that were detected as too small colored red, and will be filled in with the Solid color.

Continue reading »

May 282011
 

Inspired by Emanuele Feronato’s procedural cave generation, I took his code, and made this experiment. Instead of running on graphics data, which makes it hard to use when using incredibly large areas and changing colors of each individual ‘block’, I used a bitmap and vectors of uints to create the same effect. A fully visible cave system would look like this, with the larger caves filled in with color to show their sizes.
Continue reading »