Super! Today I built my first game for Android on Java! I called it "Balltracker", and you'll see why.
But, first of all, you know what I found? In this project I can compile absolutely single code for Android, and for laptop also! That's why I love Java Libgdx library now so much! Also, seems like it could be built also as HTML and iOS -applications, but I did not try to configure Libgdx for such purposes.
There is the usual pattern MVC applied In the core of this game.
An idea of the game is really simple. You have a 2D checkered field with many blocks, one ball and one exit. The goal of game - to move the ball to exit, but it can go only in one way (4 possible ways) and stops facing block or a border. Piece of cake. I thought to make a collision with borders as criterion defeat, but I'll remember later.
It looks like this:
I'll show printscreens from desktop-version, and on my cellphone it works absolutely likewise. Yeah, I know, design looks like stuff, but my own designer within wasn't born still :)
I was very surprised, trying to debug the app on my phone: I just pushed a button in Eclipse, and my phone USB-connected launched the app! So easy!
You just tap on the screen - and the ball goes to that direction till a first block or border.
OH! I did not say the main thing! This game uses network. Web-sockets. I'm so proud of this fact, really!
A structure is well-known: I launch a server application (built by me also, looks like black window, and gives a debug output if launced from Eclipse) on my laptop, and client application on my phone, connected to my home wi-fi. Riiiiiight, client application should know server's IP. It is hard-coded within (for my home network, of course, meanwhile I don't have a public server and IP :-) )
Then I have two ways (it is a Main-menu-screen:
1) You can create a new level and upload it to the server - Work. (Really, it will save your level topology in external file in JSON-string! So cool!)
2) and you can load a full list of levels, stored in single file on the server and then load it to play! Enjoy!
Oops, it is a list of levels, saved on my laptop acting like a server during a debug :) But it contains a names of levels and their dimensions. Before you create a level in Work-screen, you will enter a name of new level and its dimensions.
Also, if you have not wi-fi or network connection (or the laptop is asleep), my game will suggest you to play a random game! I actually wasted some time making a particular static class, that could make a random logically stable levels! Small secret: it just makes a supposed way for ball, then puts a blocks as stops, and a few other blocks for mess :)
Actually, when I see logs in Eclipse, while I make levels on my phone, upload it, and then can load it back and play, feeling of such cooperation between these two devices does not leave me.
----------------------------------------
I have an idea of some service-application, and I am in definition process of how to do it. So, I'll let you know, when finish. Thanks for attention! :)