Personal Projects Thread

I’ve spent my spare time for the past four years writing games for smart phones.

The games aren’t doing too bad:

I started with a simple slot machine game to learn Android development and that did better than I expected when I published it, so I wrote another one. Then I thought I’d try something a bit different with Plasma Duel but never managed to get much visibility on Google Play for it. I spent most of my time last year porting my games over to IOS but that’s had disappointing results so far with only a few thousand downloads on that platform.

This year I’ve finished my third slot machine game and I’m currently working on implementing Google Play services for online saved games, high scores, achievements and IAPs.

It’s been a great experience, I’ve been a featured developer on the Google Admob site, been invited as a top developer to the Google offices in London, I’ve been listed as one of the UK’s top 100 gaming startups in Develop magazine and I’ve spoken in front of 150 delegates at Apps World at Earls Court.

I’m an occasional blogger and keep a dev journal on my web site here: http://www.exobyte.net/development-journal

7 Likes

I still play Cherry Chaser whenever I have to hop a bus. My ex at one point had managed to bank something like $5000 on the game! I could never get anywhere near that.

Any plans to look into Project Astoria and porting the games to Windows 10?

2 Likes

I’ve not got plans in that direction at the moment, I’m feeling burnt by the amount of time I’ve spent porting to Apple and battling their developer tools. The fragmentation issue is hilariously backward as I can use one set of assets for any Android phone out there, but I have to create distinct sets of assets for each IOS device screen resolution.

Project Astoria sounds like it could make things easy to port code to Windows 10, but I’d need to have the game library I use (LibGDX) ported over first. If somebody does that then there’s a good chance I’ll give it a go. I still see potential in the Windows Phone sector.

2 Likes

The small Android fanboy in me is giggling at this statement.

I just finished moving into a new apartment for my last year at uni. It came with an in the wall AC unit that has a fancy remote control.

I’ve decided that it would be a good idea to be able to automagically control when my AC goes on and off, because its stock “energy saver” is dumb. I plan to use an arduino and today I’m just reading in the IR codes the remote sends off. While doing this I wanted to test “On” and so I needed to make the IR led work. In order to get the right voltage I need a 200 Ohm resistor which I don’t have :frowning:

Through the magic of electronics I’m using 2 1k’s that are in parallel to give me 500, then in series with another 1k, giving me 1500 ohms, which is then in parallel with a 470 giving me around 200. Good 'nuff for me. I’m breadboarding it out right now but I just thought I’d share. It’s been awhile since I’ve done electronics and I forgot how (for lack of a better word…) fun it is.

The end goal is to have all commands on the remote inputted and then control the arduino via serial port from my PC or the server we have setup(Roommate is a huge CS nerd, it’s fun) in addition with setting up our own temp sensors around the Apt and get it to turn on and off when we need it to. And to turn it on from any computer without having to find the remote - because lazy…

We just ordered some LED lights that are controlled via IR so our lighting will also be able to controlled from the server which will be pretty cool too.

3 Likes

To take that a step further, assuming you’ll run it on a ‘clean’ computer (read: no confidential files or personal details you don’t want Google to have access to), Chrome Desktop will let you control it without even having to find your computer (there’s at least an Android app). Might come in handy if you forget to turn it off properly before leaving on holiday.

If you do have anything on your computer that you wont thrust Google with, ignore this post. Well, first encrypt it or switch to a hacking-proof OS, then ignore this post.

I thought I might as well make something quick and easy with a few days of work using the Procedural City Generator code as the base, made quiet a few optimizations to make it run on Android and here is the result.

1 Like

That’s super cool Crayfish ! But a lot of those installs seem to be for the free versions of your games. The paying ones have a couple thousands at most. Does that mean that’s still not enough to make a living from it ?

@Crayfish is one of those success stories that everyone talks about and wishes that they had that fortune, right time, right place story.

Google Play right now is such a shithole for developers that the only reason for publishing games there is for “fun”. I mean if you search for “City Wreck Ball” in parentheses, my little game is not even gonna be on games displayed as a search result. Google is so full of themselves that they think their algorithms are better at reading your mind than you are at understanding what you want. Not to mention that half the world still can’t sell apps on the Play Store.

Anyway, rant over. There is a glimmer of hope as Google has announced that developers will be able to purchase installs directly from Google sometime soon.

The paid versions of the apps only really exist to serve the people who don’t like seeing adverts. The revenue from those is less than a tenth of the earnings from the free versions. I get about $0.02 in advertising revenue per active user of the free version per month. With over 200k active users that is an amount I could live off, especially if I were younger with less commitments. I’m currently saving up to get a bit of financial security before I think about going full time.

There is a certain amount of risk in going alone, 90% of Exobyte’s revenue comes from Google and there is no guarantee that tap will keep flowing. It’s not usually a good business strategy to be dependent upon one customer so I’ve tried a bit of ad network mediation, but not had much success yet. The long term plan is still to become a full time games developer, I just need to release one or two more games and diversify my revenue stream a bit first.

I already have teamviewer on all of my PC’s and my phone, so that I can access any of them from anywhere as long as they are on. It’s a nicer way of doing it without letting google everywhere. Good idea though!

My roommate has a server box that is running practically 24/7 so I think eventually we’ll have it running on there and should be accessible over ssh from anywhere.

@Skyentist

Cool project! You might consider getting a WIFI shield / radio (or even looking into a Raspberry Pi) so your temperature sensors could talk to the device directly instead of via the PC. Although to directly control the device you’d still need a UI… perhaps a simple android app? Anyhow, necessity ain’t just the mother of invention - laziness is a wonderful muse. Nice work :smile:

My latest arduino project is a display latency tester to determine the lag time between when software pushes data to the screen (single-buffered) and when the pixels actually flip color. FPS gamers often use this metric when buying new screens, as delays above 15ms can be ‘felt’ by most people. Anyhow, I just bought a new laptop and have ordered a replacement screen for it for this very reason, and while I wait for its arrival decided to build something that could quantitatively test the difference between the two screens.

The implementation is a little less straightforward than one might imagine. Detecting when the screen flips from dark to light is easy (I’m simply drawing a quad to the screen using OpenGL in direct mode, and flip it from black to white a couple times per second) - using an arduino and a TAOS TSL252R-LF phototransistor on one of the analog pins I can detect when the value increases above a threshold value, and I know the clock value on the arduino when that happens.

The problem is, the time it takes for the arduino to communicate to the PC (over serial/usb) that it’s received a ‘flash’ is ~15 milliseconds, which varies fairly widely (+/- 6ms) from message to message. So direct recording of the timestamp is not an option.

The solution was heavily inspired by these guys: http://lagtest.org/lagtestino/. In fact, I’m using bits of their arduino firmware almost line-for-line. But their PC-side software is written in python and built for linux, using several linux-only dependencies, so I decided to do a total re-write in Java after coming to understand their process,

Basically, the PC repeatedly sends the arduino a request for it’s clock value, and the arduino responds. Once the PC receives a response, it assumes that the back-and-forth serial transmission was symmetric, so divides the round-trip delay time (from when the clock request was sent to when the response was received, in System.nanoTime()) by two, and assumes that that’s the time the arduino actually received the request. So each of these back-and-forths give you a single data point - a correlation between the PC’s nanoTime, and the arduino’s internal clock.

After collecting 50 of these samples, I perform a linear regression against the dataset which yields a direct relationship between the arduino clock time and the PC’s system time, allowing you to convert any arduino clock time into a PC nanoTime. With this information, when the PC receives a message from the arduino saying that it received a flash ( which includes the arduino’s clock time when ithappened), I can convert that arduino time to the PC’s time, and compare that to the known PC time for when it produced the last flash. A simple subtraction and voila, display latency measured. Apparently this technique, after sufficient sampling, can produce microsecond-accurate results (and I continuously update the linear regression, so everything becomes more accurate as time goes on).

Anyhow, got it finished up last night, and it’s actually working quite well! There is some drift measured that I’m trying to track down, but I think that has more to do with Windows 7’s DWM (aero theme) messing with the frame updates than an error in the implementation. As a point of reference, my flat panel 23" acer monitor has a response time of about 22 ms. My M17xr3 alienware display has a latency of 45 ms! (thin laptop screens are typically much more laggy, so it’s important to do your research when buying a gaming laptop!) The screen on my new laptop has a latency of about 45ms as well (according to spec sheets), which I’ll be replacing for a screen rated at 16ms. I look forward to confirming these numbers myself!

^ Also, I have no idea if that will be enjoyable to read. :slight_smile: Good luck

4 Likes

It sure was! That’s very cool!

Microseconds you say? I’m not sure what exactly you’d need to detect on the order of microseconds but that’s incredible.

I haven’t given much thought about how exactly I’m going to wire/program up the temp sensors yet. I’m still working on writing(IE: Learning) the python that can take commands and send them to the arduino over serial. I do have a PI and thought about using it to control the Arduino while being able to talk to the pi over wifi. Depending on where we need to place it, I may have to do that. Unfortunately I’ve been traveling a lot lately and left my laptop at my parents house so I’m unable to work on it for a few days :frowning:. I have all the hex commands that the code I stole from some arduinoIR site(I’d link, but it’s on my laptop) uses and turns into IR signals. I was surprised at how simple it is setup the receiving/transmission of signals once I had the correct hardware setup on a breadboard.

As far as a UI goes, I’m just planning to send it commands like “on” “fanup” or whatever through the command line for now. I have close to zero programming experience aside from messing around with simple scripts in Arduinos, Pis, and in Matlab.

I did have one “Well that’s interesting” moment when I left the IR receiver running. I would randomly get a blast of IR signals detected with no consistent signal. My phone is the Moto X(2nd gen) and it has this feature where you can wave your hand over it and it’ll pop up the time/any messages and detects that via IR. So when I put my phone in front of the detector when it’s locked it just blasts the hell out of the thing and I can detect it all. I feel like I could find a use for that but I haven’t figured one out yet. It’s pretty sure range and has some limitations because the IR shuts off when it actually detects movement and displays the time(or unlocked in general).

Hah, that’s great. I can picture the look on your face (what the…) when you started receiving random IR signals. Watch out for that light pollution :smile: [I also have a 2014 Moto X, btw, love the IR feature].

You may want to take a look at www.processing.org. At it’s core, It’s Java, but wrapped very nicely in a library and a custom IDE designed to make things really really easy. I use it frequently for rapid prototyping, in fact. Very potent.

For example, here’s a basic Serial comms example which reads a value from your arduino (i.e. the value of a potentiometer or phototransistor) and then ‘displays’ that value to the screen by changing the color of the window’s background. Credit for the program in the code below, although I’ve tweaked it a bit and added several comments to help demo how simple the language/library is.

    // Learning Processing
    // http://www.learningprocessing.com
    
    import processing.serial.*;

    int val = 0; // Used store data from serial port
    Serial port; // The serial port object

    //This function is called once at program start
    void setup() {
      //create a 200x200 window
      size(200,200);
  
      // In case you want to see the list of available ports
      // println(Serial.list());
  
      //get the 1st available serial port, which is typically the arduino (not always!)
      String portName = Serial.list()[0];

      // Opens a connection to the arduino at 9600 baud
      port = new Serial(this, portName, 9600); 
    }
    
    //this function is called repeatedly (typically 60fps, although adjustable)
    void draw() {
      //Clears the screen with the background color, based upon data from the arduino
      //Note: equivalent to background(val, val, val)
      //Each parameter ranges from 0-255 and controls red green and blue, respectively 
      //So this creates a grayscale background from 0(black) to 255(white)
      background(val); 
    }
    
    //This fn is called whenever there is something available to read on the serial port
    void serialEvent(Serial thePort) {
      
      //read a single byte from the serial port
      val = thePort.read();
      
      // For debugging
      // println( "Raw Input:" + val);
    }

Getting processing up and running is incredibly simple, since it comes with its own custom-built IDE (editor). Can’t recommend it enough (and I’d be happy to help get you started if you’re interested!).

-Navy

Edit: Looking at the above code with all the comments, and this forum’s crappy code block support, the whole program looks massive and ungainly. With comments stripped, here’s the same exact code:

import processing.serial.*;

int val = 0;
Serial port;

void setup() 
{
    size(200,200);
  
    String portName = Serial.list()[0];

    port = new Serial(this, portName, 9600); 
    }
    
    void draw() 
    {
        background(val); 
    }
    
    void serialEvent(Serial thePort)
    {
        val = thePort.read();
    }

Yeah. 5 lines, and you’re continuously reading data from the arduino and dumping it to the screen.

import processing.serial.*;

int val = 0;
Serial port;

void setup() 
{
    size(200,200);
    String portName = Serial.list()[0];
    port = new Serial(this, portName, 9600); 
}

void draw() 
{
    background(val); 
}

void serialEvent(Serial thePort)
{
    val = thePort.read();
}

Syntax highlighting can be done via markdown: add three ``` with the language name afterwards, so for processing (which is a sub form of java) do:

```java
code here
```

EDIT: From here.

4 Likes

Oh, cool! Thanks!

1 Like

Spent a few days fiddling with my Planet Generator…

3 Likes

Nice lim (I have no idea how to spell that) most people ignore that.

1 Like

I’ve been helping to host/develop the Rogue Nexus.

http://roguenex.us

We currently have Angband, Poschenband, ADOM, Brogue, Catacylsm:dark days ahead, and the slimy lichmummy.

It’s trying to be a community hub for roguelike games, all playable and spectatable through the interface. We’re on ##roguenexus on freenode. Coma_Ranger does most of the work (all the menu development is his, as well as making non-networked roguelikes play nice) but I’ve assisted somewhat with maintenance and I pay the bills.

My main use of time has been getting certified and better at my job as an IT Security Auditor.

1 Like

I know this is a few months old, but wow, this sounds really great. I’m a Bach fanatic, and I love your use of counterpoint. Amazing polyphony as well.

1 Like