Sunday, October 27, 2013

Blobby Volley for Android - Progress Report 1


It's been a week since I started working on a Blobby Volley clone for Android. Here's what happened during that time.

I managed to work for around 17h (give or take 2h). I used Toggl to track my work time, but I sometimes forgot to turn it off or turn it on, and thus the slight inaccuracy. I'll try to be more diligent in the future. I chose the tool almost at random, taking the first one suggested by Google. It could be more user friendly, but it does the job, so I guess I'll stick with it for now. If you have a better suggestion, I'll be grateful to hear it.

So, I learned the basics of AndEngine and managed to code a playable (although not too enjoyable yet) version of the game. You can donwload the apk and try it out yourself. I'll be publishing the current version of the app every week, so you can keep track of what's been improved.
Right now you control both players at once (no AI yet), by using the buttons in the bottom (the one on the left for movement and the one on the right for jumping). The player who won the last point gets to serve. I actually count the points, but I don't display them yet. I don't like the way the physics works right now, but I'll be working on it this week.

As you can see, I borrowed the background and some of the resources from the original game. I found it on SourceForge. I'm not sure, if I'll be able to keep it in the future for legal reasons, but they'll have to serve for now. If anybody knows if I can use graphics from a game that uses the GPL license in my app without publishing it on the same license, please let me know.

The biggest problem that I had so far was creating complex bodies in the physics engine. I managed to do it eventually following a post on the official forum, but I'm still not sure how the positioning of composite bodies work. Also, what's been bothering me the whole time is the lack of an official documentation of any kind. The code examples are excellent, but browsing them every time you need to use some functionality is not convenient and you have to spend time fishing for the fragments that interest you in the sea of boilerplate code.

Another obstacle appeared when I wanted to export the apk file. I was getting "Conversion to Dalvik format failed with error 1". I think it's a quite common issue, since you get a lot of results when you type it in Google. Unfortunately, none of the suggestions worked for me. Finally, I managed to produce the apk... but I'm still not sure what helped. It must have been a combination of changing the project's properties, cleaning it, removing duplicate libraries, closing Eclipse, removing the gen and bin folders and some other actions. I hope I can do it more smoothly next week.

What helped me immensely was the AndEngine Debug Draw Extension which shows all the physics engine bodies in the scene (take a look at the screenshot on the right). Without it, it would be virtually impossible to track physics bugs. It should definitely become a standard feature. I wasted a ton of time trying to figure out why my blob was moving in a spiraling fashion and when I finally saw the body drawn, I came up with a solution immediately.
What was useful as well was the AndEngine Tutorials site. I haven't read it all, but quite surprisingly, whenever I got myself in trouble and used Google to find an answer, it always showed up as one of the top results. I might give it more attention this week and go through some, if not all, of the tutorials.

What's my plan for this week? I want to show the points, make the physics work better, improve the controls and perhaps implement some basic AI. I'm not sure if I can complete all this, but I'll try to do as much as I can. On Friday I'm going to the mountains for three days, so the next progress report might get published on Monday. I'll also not have as much time to work on the game, but I should be able to commit at least 10h.

I hope you like what I've made so far. Let me know what you think and come back next week for new updates.

P.S. A new interview is going to pop up this week as well.



No comments:

Post a Comment