Tuesday, 19 February 2013

Mid Feb '13 Update


Yep, it is another one of those rambling posts about what is going on in my programming life.

First up I decided to flip to a different simpler game. Why well not having used libgdx for a while I thought it would be nice to do something simpler to get a feel for it again  I am now working on a simple "chain reaction" game. Yep it is another clone :)

If I am being totally honest there is another reason for flipping. The game I was designing would be a lot easier to make if the Tiled support in libgdx was a lot better, This is being worked on at this very moment. It sort of makes sense to delay making that game until it lands in the code base. It is not like I am short of ideas for games.

I have been trying Eclim a little bit. I really wanted it to work out as I like living inside vim. It is almost there for me. It makes me a little sad to say it but it is not as smooth as using the default editor in eclipse.

I wrote a couple more paragraphs of complaints but sort of realised as I wrote them it is more likely that it is me who is at fault. I just don't know enough about vim/Eclim to have a rant about it.

I was sort of hoping it would work out of the box and have some commands like RunLastProject to make it really easy to use. Alas not what I could find. I am probably going to keep chipping away at it on and off and see if I can get something that resembles and good work flow.

There are stability problems with the embed vim in eclipse so I may wait for a newer version of Eclim. For now when I code in Java it will be in pure Eclipse, just as someone on google plus suggested to me when I mentioned Eclim.

I am still happily working on a little html5 sprite editor. I got to the stage of actually being able to draw on the screen. It is a fun little project and a nice distraction, when needed, from anything else going one :) Progress is very slow.

I also signed up to BitBucket. It is something I have been meaning to do for ages. No longer will my home projects be dumped on dropbox with not version control. BitBucket is free to individuals even for private repositories. My very limited use gives it five stars.

Friday, 15 February 2013

Wow it has been a little while since I posted.


To be honest it has been a bit of a slow period in terms of getting stuff done. Some family stuff popped up that derailed my productivity and I have not quite got back into the rhythm of things.

There has been a bit of progress but not much. For my next game I decided to jump ship in terms of technology and return to Java. Using Libgdx and Java will let me target a wider range of android devices and still partially target the web. I say partially as it uses webGL and there is a browser that holds out from implementing it.

The game has not progressed very far. The time I have had has gone mostly towards re-learning the api's that Libgdx provides. I admit some geekery as I have experimented with eclim, a sort of vim-eclipse bridge. I am not sure if I am that productive with it yet although I think this is more down to my vim set up not have had time to evolve to where I would like it to be.

I have not even installed NerdTree and that will probably be quite a nice thing to have installed when attempting use use eclim.

My other, usually lunchtime, project is I have sort of returned to the idea of an online sprite editor/pixel editor. When I say returned it really just started out as me trying to figure out how to get a simple application style layout working in html. That is a header, main display and a panel on the right. When the window is re-sized the main display absorbs the extra area.

Perhaps my brain is not working too well but that actually took a while to get right. I also wanted the side panel to be able to slide in and out. It now all looks quite smooth and before I knew it I was adding a canvas layer and thinking about making a pixel editor - again.

I attempted something similar last year but decided it was not worth the hassle when I realized I was going to have to transport the image up to a server just so you could download it. At that time I was not that interested in dealing with servers but now I suspect it would not be a big deal. Plus I think chrome and Firefox support a downloadable tag of some kind where you can specify the name of the file to be save without having to do a round trip.

For now this is kind of my part time project that is really just a learning exercise in trying to push as much as possible into css and html rather than relying of CoffeeScript and JQuery.

As an aside I have noticed that the more I blog the more productive I am. Is it causal or is it just a case of when I get productive I want to write about it? Either way I am starting to attach more importance to blogging as a tool to productivity. I guess this is the reason many people write a diary.

Wednesday, 30 January 2013

Postmortum


While I have blogged about my latest game Onion Vs Wheeles  a number of times I figured it was time to do a bit of a postmortem on it.

Onions Vs Wheelies is a very simple 'Dalek' clone straight out of the eighties.The goal was not to produce an outstanding game but to iterate on my slowly growing gaming library, get a better grip on whether I like the
entity/component style of programming and go through the process of actually releasing a little game on to the web as it had been a while.

I decided to have a go at porting the game to android.

What when right:

As it was a clone there was no need for a design so to speak. Initially I just opened up Inkscape and drew some art, The I started coding. It is a small game and I wanted to see if the entity/component architecture would hold up to me just coding on the fly.

The whole game was coded in CoffeeScript and my editor was GVim that had been tweaked a bit to compile CoffeeScript on saving and report any errors.

CoffeeScript is pretty concise meaning when I created a component they looked pretty good without any. Components lend themselves to only doing one thing almost by design. This keeps them simple although it may shift complexity upwards in the way they interact with each other. I didn't experience this but could imagine it on a larger code base.

I am still in the process of learning vim (does it ever stop) but have attained enough skill in it that it now keeps out of my way. The CoffeeScript compiled quickly resulting in very fast iterations. Perhaps not as fast as using LibGdx and Hot swapping but Coffeescript is less verbose compared with Java. Trade off
are always fun and one of the reason I flip between technologies.

My engine grew a little bit in terms of functionality and hit "no oh dear I am going to have to rewrite the engine" moments.

What went wrong:

Given it was a fairly small game done over a short period of time that is not much that can go wrong in a big extent.

The biggest issue I had was porting to android. I took the route of wrapping the generated JavaScript and html code in a WebView and then producing an android APK that could be put on the play market. This was is my first experience in doing this sort of thing for games.

I hit a number of problems that were trivial to fix but revealed my lack of experience with my tools. I had no idea how to remotely debug websites being displayed on chrome. Discovering the desktop Chrome can simulate touch event was new to me as well. Next time round I will be a lot better prepared.

While the game appeared snappy on my Nexus 7 it crawled on my HTC One V. The One V is a lower spec-ed phone running android 4.0. Given the simplicity of the game it is looking like just simply wrapping up the game is really really a good approach if I actually want people to play it.

I am pretty sure the WebView in 4.2 is powered by chrome whereas in 4.0 it is the older WebView. This may be the reason for the slowness of the game as the hardware in the HTC One V is not that bad.

It would certainly be a shame to limit my ports to 4.2 or above, well at least for the next year or so.

A lack of promotion.
I decided early to not promote this game but it did occur to me that I should be learning about the preferred size of displays and at least generating a list of HTML5 portals to submit to. While just coding games and putting them on my website is fun learning the whole process is what I really want to do. Making
an effort early on and learning from my attempts is very important. Deciding to not promote other than blogging is not really a good start to this. Not promoting is a mistake.

Art Skills
Not being able to draw is a limiting factor and something I should work on


Conclusions
Overall I am happy with my results looking at it from a technology stand point. Obviously the game is quite limited. As my goal is to iterate through a few games to learn more it is a good start particularly given it has been quite a while.

Having written this postmortem has given me clarity on what I need to do next in terms of improving things. Given most improvements are outside my comfort zone if should mean I am in for a period of growth.


Wednesday, 23 January 2013

Webgen is Now Being Used


Tonight I ported marblemice.com over to use webgen. webgen is a static site generator that while not that actively developed seems to fit all my requirements. marblemice is now a little bit more maintainable.

Given the number of pages that marblemice has this was really just a bit of geek-ing around for an evening or two. I did this on the pretense that I would write some articles and that marblemice will grow over the coming months into some sort of large website.

Obviously this is not really going to happen, it is only going to grow slowly but hey it gave me a reason to mess around with it a bit and get it out of my system.

I am not sure what to think of webgen to be honest. It does what it sets out to with a minimum fuss and does it in a snappy way, for a website of my size.

Tuesday, 22 January 2013

Onion Vs Wheelies Ported to Android


Over the last couple of days I have had my head down coding. Well that and and doing some sledging and we get our yearly couple of inches of snow.

For the most part I have been fixing up posting to facebook in the app. I can not see on the developer section of facebook people are using my app. Of course I can't see what people are posting just that people are using my app.

This is a good things as it means I fixed the issues.

I also found another bug in Onion Vs Wheelies that was making the title screen slow down to a crawl when using it on android and playing through a few games. I put a fix into the online web version as well.

I am guilty of not having promoted my web version at all. I really should if I want to build up the number of visitors to marblemice.com.

I finally feel like I have cleared some of the back log that has been lingering in my mind.

What next?

Well starting work on the next game is a good idea. I also have a simple web app I created with JQueryMobile that I would like to publish and get it up on the chrome web store. It is really simple and consists of less than a 100 lines of CoffeeScript.

Having also recently moved marblemice.com to a different host I sort of come to the conclusion it really needs a bit of an overhaul  I kind of like the design but it is not really maintainable. I prefer to keep it as a static site so will probably look at nanoc as a way of making it more maintainable.

All this will be done in dead time when I am either in need of a break from coding or just outright tired.

Sunday, 20 January 2013

Side tracked into android app update

I have been a little side tracked into updating on of my apps I have for android. Posting to Facebook has not been working.

As Facebook recently published version 3 of their library I thought it was time to upgrade to that. It does look like that have put quite a bit of work into it which is nice. However for someone who just wants to send a bit of text to the user wall it is a bit of an overkill. If only they support the share some text intent.

The SDK is very much geared up to having the user log in and use that as their id in the app. If that is the sort of thing you want then the SDK is a huge improvement.

Anyway I eventually arrived at a solution that I was happy with and so will be putting out an update fairly soon. The funny thing is I think I had mis-configured something server side and with that fixed I think users will be able to post without the update. I am not 100% hence deciding to continue to do the update.

Dropping back into eclipse was a bit of an experience. When I was flipping between the debugger and the Java work-spaces I seemed to end up in .class files. Eclipse displays them as source files so you don't realise until you try to type and nothing happen as they are read only. I got caught by this a few times.

My eclipse Fu had definitely gone backwards in the past few months although some of the speed drop should be attributed to my new laptop with its slightly eclipse un-friendly keyboard layout. It is of course fine with vim. There is a vim plug in that uses a headless version of eclipse that I very nearly downloaded.

I am hoping get the updates published this week so I can refocus on releasing my latest little game to android. The porting part is done I just need to sit down draw some art and produce the APK.

My expectation is I start game 2 just before February. I am pretty much have the outline of the game sorted.

Sunday, 13 January 2013

Link To Game 1.



The weekend has turned out quite well, I got to the bottom of my of my problems in game one and I called it Onion Vs Wheelies. A simple clone of the game Dalek clone that involves an onion that is being chased by wheelie bins!

I am glad I started back with a small project as going through the whole process of design to release in a very short period of time has let me spot lots of things that need streamlining and also spot bugs in my slowly developing game library. The game does play reasonably well on my nexus 7 this means I will probably try to embed it into a simple java wrapper and see how it runs there. That's on the to-do list for this week, There will be a number of art assets I have to create if the game does embed well so it will take a little while before I get it published. Thankfully the controls seem ok so I probably won't need to do further work with them.

Spare moments I get tend to be spent on the design ideas for the next game. I am starting prefer one game idea over all the rest, It will be slightly larger in concept and design than "game 1" of the year but still draws on old 8/16 bit game ideas. I will probably stick with CoffeeScript again. However first things first, an android port of Onions Vs Wheelies.