How to connect to ADB via Wifi

Let’s say it’s a hot summer day and you need to use one of the two USB-connectors of your Macbook Pro for a fan, while the other one is occupied by your keyboard. Time to turn on adb access using TCP and your local wifi-connection. Here’s how:

1. Connect your device using a USB cable.

new

 

2. Assign the port your device should use using the ‘adb tcpip [port]‘ command.

Bildschirmfoto 2014-04-08 um 11.38.03

 

3. Discover your phones’ IP-adress.

Bildschirmfoto 2014-04-08 um 11.38.52

 

4. Connect to your phone using the setup port.

Bildschirmfoto 2014-04-08 um 11.41.02

 

And you are done. When looking at your device list now, you will find your device using the USB-connection and your device using your Wifi-connection. Now you can unplug and use your USB-port  for other important stuff.

Bildschirmfoto 2014-04-08 um 11.43.24

 

If you want to end your connection again, use the ‘adb usb’ command.

 

This was tested on a rooted Nexus 5 and a non-rooted first generation Nexus 7.

We released ‘Flying Knight’

Well, we did see it coming and indeed it happened:

After the release of ‘Flappy Knight’, we were warned by some friends that Google was unpublishing games that try to live of Flappy Bird’s success. After about one week in the store, just as downloads started to increase a bit,  we received a “7-Day Notification of Google Play Developer Term Violation”, stating that our “title and/or description attempts to impersonate or leverage another popular app without permission” and that we had to “remove all such references.”.

So far so good. Our description, which contained statements like
“- As addictive as the now unpublished ‘Flappy Bird’
- Flap your way through endless lines of walls”,
definitely violated parts of the Play Store’s spam provisions, and since Google Play is not a democracy, we had to do as we were told.

We changed the name of our game to, removed everything that could be connected to Flappy Bird and republished an update that also contained some bug fixes. After an immensely long update time of more than 72 hours, it was done.

So hereby, I proudly announce the release of:

logo

You can get it now on Google Play.

Please feel free to share your thoughts in the comments.

Creating a ‘Flappy Bird’ clone

So, last week, on Thursday I sat with Felix, one of the people that are supporting us with designs, and we were talking about ‘Flappy Bird‘s tremendous success. The, now unpublished, Chopper Mission-like game at the time grossed around $50k a day and was, as you probably all know, topping app store charts around the world.

Flappy Bird

Flappy Bird

We were impressed by the simplicity of the design and the very easy gameplay. This was also what made us think that it would probably be quite easy to implement an app with similar functionalities.

$50k/day, a possibly fast implementation. That are two  pretty convincing arguments towards just trying it out.

Brainstorming

The Greek restaurant we went to

The Greek restaurant we went to

The decision was made and we headed over to the Greek restaurant next door to brainstorm a bit. The mission: Creating a game with similar behavior and and addictiveness as flappy bird while maintaining an own character.

Besides the amazing achievement of $50k/day in front of our eyes we wanted to keep up the spirit of ‘Flappy Bird’, which, in our impression, was rather the creation of games as a form of art instead of pure means to make money.

The brainstorming started. The basic wireframing was done rather quickly. A simple start menu, the game itself, a game over menu, GPGS highscores, maybe a bit of Tapjoy and a splash screen.

Left: Wireframes. Right: Design drafts

Left: Wireframes. Right: Design drafts

Then the big question arose: Where and when did we want our game to take place? We are working on another game in the steampunk genre anyway at the moment, so why not use this environment?

 Steampunk Bird by ~Adrienne-the-ripper. Click on the image for the origin.

Steampunk Bird by ~Adrienne-the-ripper. Click on the image for the origin.

While that sounded pretty cool we wanted to grab the chance to try a different setting. Ever since I first played it, Age of Empires II was my favorite computer game, which it stayed until today. This resulted in our final choice: The medieval times.

Getting started

First we created kanban-boards, each customized and simplified in the way needed them.

Left: My Kanban-board; Right: The designer's Kanban-board

Left: My Kanban-board; Right: Felix’ Kanban-board

Then we just got started.

I first began implementing the physics with Box2D but then decided it would be overkill and just used simple entity modifier. After a couple of hours the first, almost complete, game was done. On the left you can see our main menu, in the middle the game while it is playing and on the right the game over ‘menu’:

The first playable version of our 'Flappy Bird' replacement

The first playable version of our ‘Flappy Bird’ replacement

I like to call it ‘Flappy Pong’.

As with most casual games, writing the basic game logic needed the least time. We needed a decent character, the hero that would breathe life into our game. His name? Sir Flapalot.

Who is Sir Flapalot?

Who is Sir Flapalot?

We wanted a unique character. A person that’s cute, has a visual reason to fly and can still transport the adventurous aura of a knight.

Felix did an awesome job and created our flying hero:

Sir Flapalot revealed

Sir Flapalot revealed

Sir Flapalot comes in five parts: A tilesheet of the cape which consists out of four parts for a fast paced movement animation, a three-part-tilesheet of the arms with the wings, the harness with the feet, the helmet and the hemlet’s ventail, which opens when the knight flies downwards. Here you can see his first flying attempts in our virtual world:

Sir Flapalot flying and falling

Sir Flapalot flying and falling

Here’s the main menu with Sir Flapalot flying around on a Galaxy Y and a Galaxy Nexus:

Sir Flapalot on different devices

Sir Flapalot on different devices

Next was the Name and the Logo. We both were certain about the name in an instant. ‘Flappy Knight’. We couldn’t find a fitting font so Felix did another amazing job and hand-drew Flappy Knight’s own typeface:

logo

Development

After this two important decisions, the title and the main character of the game, development continued. We included backgrounds, a parallax floor like in ‘Flappy Birds’, the green rectangle barriers of the screenshots above became walls and the game over and start menu went through plenty of iterations.

Once this essential parts were done, I started integrating GPGS for highscores, ad banners (only AdMob for now) and Tapjoy.

Last Thursday, after one week of development, we presented the result to ANDLABS and started balancing the gameplay a bit more. It turned out that Sir Flapalot fell too fast so that sometimes it was too hard to stop him at the right time. With the change of giving him more time to the fall, a bigger distance between the walls came. While the game initially was much harder than ‘Flappy Bird’, it is a tiny bit easier now. My current record is 39, which makes me third out of four test players.

After the balancing, sound came into the game. This took us quite some time since we hand made almost all of them on our own. We tried to keep them as annoying yet motivating as the flappy-bird sounds, while sticking to our genre. While we may re-record some of them for an update, we are satisfied with the current state.

Flappy Knight

Today, after one week and three days of work, Flappy Knight was finished. Here are the final results:

Flappy Knight's main menu and get ready screen

Flappy Knight’s main menu and get ready screen

Flappy Knight's gameplay and game over screen

Flappy Knight’s gameplay and game over screen

So now, if you like (or hate) ‘Flappy Bird’ and need an adequate replacement but are not satisfied with the gazillion of copies out there, or just want to try our work, you might give Flappy Knight a try:

promo

get flappy knight on google play

Simplified Logging in Android

Logging is one of the important tools for debugging an application.

When logging in Android, one usually writes code like

public class LoggingSample {

    public static final String TAG = "LoggingSample";
    ... 

    public void loggingMethod() {   

    final String formattedTestString = "first argument = %s, " + 
             "second argument = %s";
    final String firstArgument = "abc";
    final Object secondArgument = new  Object() {
        public String toString() {
            return "123";
        }
    };
    Log.d(TAG, "loggingMethod(): " + 
           String.format(formattedTestString, firstArgument,
           secondArgument));

    }
}

This then results in an output like

D/ LoggingSample: loggingMethod(): first argument = abc, second argument = 123

We need to add a tag and many times, in order to reproduce procedures, the name of the calling method. Not much of a deal, but since logging is done frequently it is often repeated

Since we don’t like repetitions, we decided to make it a little easier. Instead of the above, we now type

    L.d(formattedTestString, firstArgument, secondArgument);

To get an output like

D/LoggingSample:26(18510): onCreate(): first argument = abc, second argument = 123

What we get is the calling class’s name and the line number as a tag, the calling methods name plus the formatted string as a message.

 

If you are interested in this type of logging, you can now git clone the ANDLABS Android Utils and add them as a library project.

 

What do you think? How do you use logging? Please share your thoughts in the comments.