Showing posts with label game development. Show all posts
Showing posts with label game development. Show all posts

Tuesday, 2 June 2020

Hello again, World...

I've neglected this little corner of the web for nearly three years, shame on me!

A lot has happened in that time. I was promoted at work (Yay!)... Then I was made redundant when the company folded (Boo? Hiss? Maybe, maybe not, I'm undecided...). Our children celebrated some birthdays - our eldest is now 6, and our youngest is 3. I suppose we got a little older too, but the less said about that the better! I've taken care of some real world projects - mostly satisfying physical work involving wood and concrete and hand tools and sweat. Oh yeah, and the whole goddamn world has been turned upside down thanks to a global pandemic. Fun times!

When I've not been homeschooling the girls, hiking in the amazing countryside that is rather conveniently situated right at my doorstep, completing practical projects around the house, reading all the things, and vegetating in front of netflix, I have been pratting around with my fingers on a keyboard tinkering with various software projects.

Absolute emphasis on TINKERING.

There has been little in the way of reasoning behind what I've been messing with other than "I am currently the master of my own destiny, I have some technology on hand, a brain that needs exercise, and although the libraries are sadly shut we do have an amazing resource called t'interwebs on hand these days, so why not just have some fun". Sure, keeping my brain active and tinkering with Java/Go/JavaScript might have some practical benefits when it’s time to find a new job, but that's as far as it goes. My mindset is firmly back to that of my 10 year old self, hacking away on a ZX Spectrum programming Sinclair Basic just for fun :D

So, what software projects have I been fiddling with, you might ask... Well, there are a great many, but here's the top ten (ok, ok, it’s less a top ten and more a list of things I've worked on most recently and/or not already forgotten about). In no particular order:

1) I started (well, nearly finished) working on my very own retro style minimal Simple RPG. I don't really know why I've not finished it if I'm honest. Developers and their goldfish-like attention spans eh? I'll probably blog about this project separately and add a link (or maybe forget to add a link) here when I do.


2) I rewrote theinvader360.com in Go. Almost entirely pointless, it could quite happily be a static site, but I wanted to so I did :) Yes, you *will* see a pattern emerge in my justification of how I choose to spend my limited time on this planet...

http://www.theinvader360.com

3) I actually released something on Google Play! Don't get too excited, it's just a Maths Quiz ;) Our eldest loves a maths challenge, and she responds massively well to gamification - anything where she can score 10 out of 10 is a winner. This app was built with her firmly in mind, no countdown clocks or pressure to "guess" the answer, just a simple ten randomly generated questions and taking your sweet time to answer correctly kind of deal. She's consistently scoring 10/10 on each challenge type now, so maybe something with a bit of hazard/risk is called for next... Although it’s a fairly boring "game" to look at, it was actually quite good fun to write. I might write more about it sometime, and maybe try to remember to link to it here...

https://play.google.com/store/apps/details?id=com.theinvader360.quiz.maths

4) I wrote a procedural maze generator and cobbled together a basic maze game. I never got round to polishing and releasing the app, but it’s installed on the living room fire stick and the girls like playing it every now and then :)


5) I fiddled about with PyGame and built a Lunar Lander game. This project was kicked off at a local nerd club gathering back when such things were possible, great fun! Oh how I miss being quiet and antisocial in a room full of grown adults, it’s just not the same being quiet and antisocial in the comfort of your own home.


6) My six year old and I collaborated on designing a rule set for a pen and paper tabletop game (SiTTeRS). I had originally planned to turn this into an app, but figured we liked it as it was - a low tech, two players in the same room, real time, physical pen and paper and a dice kinda deal, so I dropped the computer simulation aspect and kept it strictly low tech.

https://github.com/TheInvader360/SiTTeRS

7) Nothing at all to do with games, but I wrote an extremely minimal headless Go application fronted by an equally minimal Vue.js frontend. Not particularly useful - you can achieve the end result as it stands in vue alone, but I liked getting the two parts to work together.

https://github.com/TheInvader360/checklist-frontend-vuejs

8) I built a very simple Memory game using Go and the Ebiten library. I’ve built an executable to run on my laptop, and an apk to install on our various android touch screen devices. This isn’t destined for proper app store release, but feel free to grab it from GitHub!

https://github.com/TheInvader360/simple-memory-game

9) I started building a small Dungeon Sweeper game. No idea why I didn’t finish this, I probably should at some point, the scope is super tiny compared to the Simple RPG mentioned up top. It would also make a nice little fantasy console game. I might come back to this at some point...


10) I read about the Pico-8 a while ago and found the whole subject of fantasy consoles to be quite fascinating. I’d have killed for that kind of dev environment back in my Spectrum days! Then a couple of days ago I discovered the TIC-80... It’s free as in beer, free as in speech, and it supports JavaScript... Sold! I ported a nice Pico-8 tutorial to the TIC-80, and in a single day I had a crappy “game” that could be played on the living room TV using an Xbox One controller, and via the web using keyboard controls (cursor and “z” keys replacing the d-pad and “a” button). I can see myself spending a lot more time tinkering with these fantasy consoles :)

https://github.com/TheInvader360/explore-tic80-js

It strikes me that most of the projects I've enjoyed playing with recently have been quite small and short lived. I've aimed to spend only a day or two's worth of spare time on each, with the aim of getting something minimal and functional finished in that time. Pretty much the Ludum Dare rules really. This has been the case with pretty much everything other than the unfinished simple RPG game (no matter how “simple”, it’s still nowhere near a weekend project!).

I have lots of ideas for future projects. I’d like to finish the Simple RPG and Dungeon Sweep games at some point. I might write a completely pointless static blog/CMS engine, just because (add it to the heap of others out there that nobody wants or needs) :D I’d like to write some Spectrum / NES / Game Boy ROMs (maybe some remakes or demakes). I’d also like to see if there’s anything fun I can do with some of the old hardware we have lying around (Spectrum, Game Boy, DS, PS2, PSP, Wii, etc). I have a Raspberry Pi 3 that is pretty much a dedicated RetroPie machine - it gets played with more than the Xbox One, but maybe I should do more with it. If I’m feeling particularly masochistic I might spend some time on lower level stuff than I’m used to, maybe some assembly is in order :) I’d also like to spend some more time playing with fantasy consoles like the TIC-80, just because it’s fun...

Then there’s the huge subject of moving on from teaching our children traditional languages, science, and maths, and sprinkling in a little bit of computer science. There will be some Scratch and Python in my future for sure, and I can’t imagine any better teaching method than making games. It’s gonna be fun! :D

So yeah, I’m still alive, I’m not really focused on publishing new games to Google Play any more, but I do still love making and playing games and little educational doodads and thingermawotzits.

Until next time, au revoir!

Thursday, 26 October 2017

Greedy Caterpillar - a snake game for touchscreen and TV


Snake

Little by little, TheInvaderOne is growing up. She is now three and a half years old 😮

Her little sister, TheInvaderOneX 👶, is eight months old, and is now very interested in the Sensory app. She's also interested in whatever her sister happens to be up to at the time, crawling at light speed, making valiant attempts at walking, and trying her damnedest to "eat all the things".

Big sister has smashed it on the numeracy front, and has left the Count 1 to 10 app for dust. We're in the big leagues now - she has 1 to 100 cracked, addition and subtraction of small numbers sorted, and is starting to get to grips with simple multiplication and division. Of course, we're not drilling numbers, letters, languages, etc 24/7. She loves absorbing knowledge - she's like a sponge, but we don't want her to burn out before she even hits school - being bored at school from day one due to them not teaching her anything new would likely be a disaster! No, there needs to be plenty of downtime... Sure there's loads of toys to play with, and imaginative play, and creative crafts, and baking, and stories, and a bit of tv (if you have kids around this age and want to combine cartoon time with learning, check out Go Jetters and Numberblocks, both big hits in our home at the moment), and seemingly endless unrelenting viewings of Frozen, but she's also seen what Daddy does to unwind - play and make games, and she wants in!

Ok, so making games may be a way off yet, but playing them was definitely on the cards. My other half bought me a Raspberry Pi 3 starter kit as a birthday surprise, it's now a dedicated emulation machine, with a lovingly curated list of games on there. It's pretty much a NES Mini, and a SNES Mini and a "Many Other Platforms Mini", all rolled into one. My eldest has particularly enjoyed playing Centipede and Barney's Hide & Seek. She loves the arcade action aspect of Centipede, but the move from touchscreen puzzle games to a joypad controlled action game was a pretty big step, and before she truly "got it", it was game over. Over and over again. The Barney game is actually a fantastic game for first getting to grips with the concept of pressing buttons or moving a joystick to control an onscreen character (since you can't really lose), but it seems the controller we were using (a truly excellent bluetooth one by Moga) was a bit overwhelming, and the game itself requires no real skill or engagement (drop the controller and it will complete itself on autoplay - once you realise that, what's the point in playing anymore?).

I got to thinking about what would make a good game for three year old, one who so far has only been exposed to touchscreen "jigsaw puzzles" and "smash bugs at a picnic" type games.

Here's what I came up with:
  • The control scheme should be simple and intuitive
  • Rules governing gameplay should be fairly straightforward and logical
  • Threat should be absent, or extremely mild
  • It should look and sound reasonably appealing
  • You shouldn't be able to lose too quickly i.e. before you get a handle on what you're actually meant to do
I realised that we already owned the perfect game controller for a small child. It's not really a game controller at all. It's an Amazon Fire TV Remote. I mean, just look at this thing:


It's a wonderfully simple controller, and that circle up top covers all the basic actions that should be required in a simple child friendly game: up, down, left, right, and a single fire/action/select button.

I started out with an Atari 2600 myself, nearly 30 years ago. All the games I had were controlled by one of these bad boys:
Let's all take a moment to bask in the glory of its simplicity... Up, down, left, right, and a fire/action/select button. Yes, using the Fire TV Remote looked like a winner. If it was good enough for Atari in the 80's, it's good enough for me today.

Ok, control scheme and physical controller sorted, on to the next item, a relatively simple game idea. A lot of the best simple game ideas have already been done, but I'm cool with rehashing a tried and tested mechanic, not everything has to be innovative or ground breaking ☺ Thinking about simple games, I realised very few are actually forgiving enough to meet my requirements. Pong and breakout are actually quite tough games, especially if you've never played them or handled a game controller before. Miss the ball a few times and it's game over. A game of breakout could easily be over within seconds, and before any blocks were broken. No good, frustration is not fun. What about Pac Man? Space Invaders? Centipede? Same deal. Those old simple games were actually quite challenging, I guess that's what made them so addictive, and why world records exist for acing them! Then it struck me: Snake!
  • Simple control scheme: up/down/left/right, press the relevant button to move in that direction
  • Simple rules: eat as many apples as possible and don't bite yourself - seems like reasonable advice for anyone to lead their life by
  • Minimal threat: bite yourself and you have to start again (no big deal, right?)
  • Aesthetically appealing: Ok, nokia snake wasn't the nicest looking or sounding game, back in those days we didn't have much to work with, the 3310 had a 84x48 monochrome 1.5 inch screen, midi sounds, and a processor and memory to match. Luckily we have HDTVs and even HD mobile devices these days, so we can do something about that... And thanks to awesome people like Kenney and Kevin MacLeod you don't have to be an accomplished artist or composer to pull it off!
  • Impossible to lose too quickly: This is where snake comes into it's own - all the other simple old games I considered were challenging, and you could lose them all immediately. The snake game is challenging, but with certain rules in place (no static obstacles, wrap around scenes, starting length of 4 segments or less) it is actually impossible to lose until you have at least managed a score of 1, and in most cases you're unlikely to lose before the "snake" reaches a length greater than the world height.
I put together a small prototype, and soon had a very simple snake game up and running on our living room TV via the Fire TV Stick. A "snake" comprised of green squares on a black background, a single red square representing the "mouse" or "apple", no score, no sound, nothing other than a very rudimentary snake that could be controlled via the Fire TV Remote that grew each time it "ate" a red square. My daughter loved it. I think she was excited to see that what I had been working on on my laptop had somehow appeared on the TV, and that she could press buttons to make it do stuff ☺

She referred to the snake as a caterpillar, probably due to us having played Atari's centipede on the RPi earlier in the day, and she called that a caterpillar too (I guess she has never actually seen a centipede, but has seen plenty of caterpillars). Maybe the fact we had recently borrowed The Very Hungry Caterpillar from the library had something to do with it too. Anyway, the Hungry Caterpillar name stuck, and that in turn helped me come up with a nice, bold, simple, child friendly, cartoonish skin:
Hungry Caterpillar
I could have stopped right there, as at that point I had achieved what I set out to do - I had made a little game for my three year old to play on the TV using a simple controller. However, I found the whole process of developing for a TV and remote controller quite interesting. If the game had more than a single screen, maybe a game over screen announcing when a high score had been achieved, a menu screen, a help screen, an options screen, how would all that work using the remote as a controller? More interestingly, could I get the app to work well not only on TV's using a remote/game controller, but also on the more traditional touchscreen phones and tablets? If yes, why not release it on Amazon for both Fire TV and Fire Tablet devices? Could I go one step further and release it on Google Play too? I found the answer to all that stuff and managed to build a single apk that works equally well on TV and touchscreen, and that can be uploaded to both the Amazon and Google marketplaces.

I learned a few nifty tricks that I plan to write about in future (this post is already way too long...):
  • How to suppress ads when running on an unsuitable platform (it infuriates me when ads appear in a Fire TV app with no way to avoid them or click through)
  • How to link to the appropriate app store depending on what platform you are running on without resorting to separate builds for each marketplace
  • How to handle a simple menu in LibGdx using either touchscreen or remote/game controllers
  • How to make a game/app that works well and looks good in terms of the 10-foot user interface, and that works equally well and looks equally nice on hand held devices

I also ended up with a game to play with my daughter, something to publish on the Amazon and Google marketplaces (yeah, I've been slacking again), and a reason to post on my blog again :)

Oh, and the game is totally helping TheInvaderOne get to grips with controlling an onscreen character by pressing buttons on a remote controller. She is already hitting double digit scores, which is a huge improvement over what she could manage when she first tried a couple of weeks ago. I expect she will be destroying my own high scores very soon! And if her interest in the Sensory app is anything to go by, TheInvaderOneX will be bringing more competition to the table in two or three years time! ☺

Anyway, the game is free, as always. There are some ads when you play on a mobile device (a small unobtrusive banner, and a single short interstitial plays on game over). There are no ads on Fire TV. No in app purchases or subscriptions or any kind of hidden nasties on any platforms. Just a simple fun game for you to play for free ☺
Hungry Caterpillar
Hungry Caterpillar
Hungry Caterpillar
Don't be afraid to be overly generous with your ratings and reviews, I'm cool with praise, don't worry, you won't make me blush 😙

Until next time, I hope you have fun 😀

Sunday, 9 February 2014

Back with a new game - Little Fish

I've been away from the world of Android Games for a little while, but I do have a couple of good excuses:

  1. My role has changed at work and I am now a developer - this is pretty awesome. Ok so it's dry databases and stuff, not games, but I'm getting paid to do what I enjoy, and am feeling pretty good about that! It does mean more of my spare time being spent on work related learning though, so a little less time for Android Game development.
  2. Even bigger news than career change... We're expecting our first baby!!! TheInvaderOne should be delivered by the stork at the end of next month :-o Preparing for the arrival of a human worm baby takes up a lot of time, though of course nowhere near as much time as once she has actually arrived. Spending time with her will be way higher up the list of priorities than playing with Android, so I either need to drop my hobby, or make it more efficient...

What I have been doing over the past few months (as and when I found a few spare hours here and there) is working on a sort of 'white label' app built on top of LibGdx. It includes a lot of the dull and boring to implement stuff that I end up doing over an over again, highscores, user preferences, ads, facebook integration, google play game services integration, splash screen, etc. In theory I will be able to use this as a quick start platform to speed up the game production process in future. I don't currently have plans to open source this as it's a bit too closely tied to my own stuff, and decoupling would take valuable time that could be better spent making games, but maybe sometime in the future it'll be an option.

I'm hoping that this quick start platform will allow me to continue making Android Games even after baby has arrived. The recent success of Flappy Bird proves that a game doesn't have to be sophisticated to become a runaway success. At its core it's a simple game (basically a reskinned helicopter game), with simple graphics. I'm sure the developer wouldn't mind me saying a similar game could be built in a single weekend, especially when leveraging a quick start platform. I've had some success in the past with my Racing Game and Quack Attack that proves the same point, simple/fun/addictive beats complicated/polished/boring. So, in future I can focus more on game mechanics and less on the surrounding app furniture, this can only be a good thing :)

I've just published my first game that makes use of the white label quick start sausage machine (catchy name) "Little Fish". The gameplay is pretty simple - you control a little fish that eats smaller fish. Bigger fish will eat your little fish, so avoid them! There's the added complication of poison fish that you must avoid at all costs (even if they're tiny). Once you've eaten enough little fishies (empty hunger meter), you progress to the next level where you'll be a bit bigger. Of course the screen is no bigger, so dodging the predators will get harder the more you progress! Simple game, but fun and addictive :)


I've added a couple of new features to Little Fish too. First there's a kids mode, there are no gameovers in this mode (unless you choose to quit) the tradeoff being no global leaderboard score submission. I've seen lots of little children want to play mobile and tablet games recently, but when they are very small it can be frustrating losing quickly, the kids mode will help keep them happy and occupied for longer. It can also double as a training mode, once the child has mastered the more forgiving kids mode, they can try the more challenging normal mode! The other new feature is extended controller support. Not only can you choose to control the Little Fish by touch or tilt, you can also use the dpad of an xperia play (and hopefully any other android device that has a control pad) or a HID compliant external controller. The guys over at Moga recently sent me some awesome free stuff, and it was an absolute breeze to get Little Fish working with the Moga in HID mode. When I've had time to play with the Moga SDK properly I expect I'll write a blog post dedicated to that.


I hope you'll check out Little Fish and of course all my other games. As always, I hope you have fun!

Saturday, 19 October 2013

LibGDX Google Play Game Services Tutorial


Google Play Game Services offers cross platform social leaderboards, achievements, and much more (realtime multiplayer, cloud saves, anti-piracy...). I've started implementing google play game services leaderboards and achievements in my LibGDX Android Games, and the purpose of this blog article is to walk through the process so you can do the same!

  • I've published an example project on Google Play check it out!
  • The example project is freely available on GitHub check that out too!
  • You can also get the complete (free) version of Super Jump a Doodle here!

Continue reading after the jump to find out how to add these features to your own games!


Monday, 10 June 2013

One million installs!


1,066,345+ users have installed my LibGDX Android games :)

Due to reporting lag that number is a few days out of date, and it doesn't include installs from third party scraper style stores, so the real number will be a little higher, but I can safely say I have over a million installs in total. Awesome :)

So, how do the various markets stack up?

Sunday, 26 May 2013

Street Race Swipe LibGDX Scene2D Tutorial



I have been meaning to write a LibGDX Scene2D tutorial for some time now (ever since my Quack Attack FREE Duck Hunt Game got ridiculously popular). The problem has been finding the time, instead of writing blog entries I've been making games!

I had a great idea for a multitasking game, play four independent games at one time to train your brain and test your ability to multitask. The result was my 4 Games 1 Screen FREE Brain Training Game. I built this game as four separate games from the outset, with the intention of possibly building further on each minigame and releasing as standalone apps. The first of these standalone apps is Street Race Swipe Racing Game, which brings us neatly to the point of this article...


Street Race Swipe Racing Game is such a simple game at its heart that it seems like an excellent candidate for a tutorial article :) I remember being massively impressed by the example SimpleApp on the LibGDX wiki when first starting out, there was so little to it but it touched on all the basics of what is needed to make a game. I'm hoping this mini project will be almost as simple and just as helpful to others!

Wednesday, 15 May 2013

4 Games 1 Screen - Musings on mobile game control



So often I hear that players hate onscreen controls on touch devices. No physical button means no tactile feedback to let you know you are 'touching but not pressing' a button. This fundamentally different interface means the traditional joystick / d-pad control scheme can no longer be the de facto standard for gaming controls across all platforms - replicating "up down left right a b start" on a phone or tablet is far from ideal (but an ouya or gamestick is another matter entirely ;)).

In my latest game, 4 Games 1 Screen, I try to make the most of a tricky situation. I've embraced the android mobile platform and the control options it offers. Our phones and tablets have accelerometers and touchscreens, the old nintendo and sega machines did not, it's time to think outside the box and make the most of these features.

4 Games 1 Screen is a challenging brain training game, the aim is to multitask by playing four games at one time, and avoid making too many mistakes. Make too many mistakes and it's game over. Each game is kept relatively simple for two reasons - first the game has to have a single objective and control method, second you have to be able to play four of these things at once so too much complexity would be too distracting for the player.



The mini games are:

  • Asteroid Attack - Tilt to steer your ship, asteroid collisions damage the shields, and when the shields are gone - gameover man, gameover!
  • Tap Jump Cowboy - Classic infinite scroll platform game (like canabalt, and gemserk's excellent vampire runner) tap the screen to jump, save the cowboy from running into the campfires!
  • Speedy Sums Math Master - Fully engage the left side of the brain, evaluate the math problem and mark it as correct or incorrect... You not only lose a life when you get it wrong, but also when you run out of time - so think fast!
  • Street Race Swipe - Swipe up or down to change lanes in this fast and furious racing game, avoid crashing into the other sports cars, too many bumps and your car will explode!


Each game can be played independently (full screen) in practice mode, but the real aim of the game is to play them all at once - the game is called "4 Games 1 Screen" afterall :) I find it fun, addictive, frustrating and challenging. The frustration is what makes it so addictive haha, I see gameover and immediately try again to "do it right this time" :)

No onscreen controls, and a game that would not really be possible on traditional gaming platforms, this is truly a mobile game designed for mobile devices. I hope you go on to check it out (it's FREE, so why not!) and if you also like making your own mobile games that you might consider some of the thought behind the concept - don't lament the lack of physical controls, instead make the most of what is available!



Finally, does this mean that I won't ever release a mobile game with onscreen controls? No. Definitely not. A future project will be a traditional platformer, with android enabled consoles like the ouya and gamestick firmly in mind. I will no doubt make a mobile version of this game with onscreen controls (it would be silly not to). I'm not against onscreen controls, I'm against not thinking up interesting ways to make the most of what the mobile platform offers. I believe a platformer will only work well with traditional controls, but we don't always have to make traditional games :)

Happy gaming boys and girls!

Thursday, 11 April 2013

Try before you buy (or in this case, try before you download for free!)

How awesome is this!? You can now try playing Quack Attack in your browser :)

The game plays a lot faster and smoother on a real android device (I think the slower your internet connection, the worse the appsurfer gadget performs), but I still thought this cool idea was worth sharing here.

Something tells me I'll be using AppSurfer to help promote my next game, the fact that tilt is simulated is especially cool :)


Sunday, 10 March 2013

Scene2D Investigation... Result: Quack Attack Free Duck Hunt Game!


I started looking into LibGDX Scene2D recently. No real reason, other than it looked like it could be something interesting to learn, so why not! :) Best way for me to learn is to just get stuck in, so I got to work on a Duck Hunt tribute, and learned as I went along...

It's clear that Scene2D UI is the way to go for menus and the like, so much cleaner than my past approach. Scene2D UI combined with table-layout makes setting up menus and HUDs a breeze. Even better, tweaking layouts becomes pain free, a real bonus! I'll certainly be using it again in future games.

As for making use of Scene2D in the game itself (over and above the HUD), it was tricky to start with... All the tutorials I've read so far have advocated the MVC approach, and it seems that MVC is not really possible when using Scene2D (the model and view are tightly coupled). Still, I've not been doing this long enough to be stuck in my ways, so I figured I could just ignore some of what I'd learned in my earlier projects and just go with the Scene2D flow.

I was surprised that there aren't more tutorials available on the subject to be honest, but I muddled through with various bits and pieces I could find. The most valuable resource when getting started was the LibGDX suite of tests, they are always a good starting point when looking at something new. The official wiki was helpful too. It's a bit presumptuous to think that I'm in a position to write tutorials on the subject (due to me being a newbie myself), but I think I'll post a few code snippets in the coming weeks to share some getting started tips, maybe even an open source step-by-step mini game "how to" if I have the time.

I like how Scene2D lets you encapsulate Actor behaviour in its own act() method, it's pretty cool just instantiating an Actor and then just leaving it to its own devices. My first Scene2D game (Quack Attack) has the game logic class spawn a Duck object at various intervals, the Duck class itself keeps track of how it should behave (overridden act() method sets various actions for the duck to perform dependent on its current state), and it also takes care of drawing itself via the overridden draw() method. It's really nice to be able to look at that single Duck class and immediately "get" exactly what a duck will do in the game, without having to look at various other classes. I guess this is one of the main Scene2D strengths, but on the flipside it's what makes MVC impossible...

I'm sure the coupled view and controller will make things difficult on larger more complex games, but for simpler games I don't think it's a big problem. I guess if I were ever to try porting a Scene2D heavy game to a different platform it'd be a problem too, I am pretty sure porting Racing Game or Evil Monkey Touch Defense or Zombie Game to XNA would be pretty straightforward (if we ignore the tilt/touch control issue), but porting Quack Attack to a library without a similar scene graph implementation would not be so straightforward (would probably have to port the whole of Scene2D too!). Again I don't really care about that right now as I'm focusing on Android only, so I think it's quite likely that I'll be using in-game Scene2D in the future.

I've just published my first Scene2D game on Google Play, it's totally free (ad supported), so feel free to install and check it out. If you like it, I always appreciate a nice rating/review :) Check it out here: https://play.google.com/store/apps/details?id=com.theinvader360.duckhunt.quackattackfree




I think it turned out quite well, and am pleased with what was achieved in a relatively short amount of time. Keep an eye out for future blog posts featuring mini Scene2D tutorials if you're interested in that kind of thing :)

Until next time - happy gaming, and happy game developing!


Monday, 17 December 2012

Tower Defence - Slacker's Diary


I've been slacking recently. Between work, Christmas preparations, and home improvements, there's not been a whole lot of time left over to work on Android games. Anyway, that's enough of the excuses, question is - what am I going to do about it?

I've made a little progress on Tower Defence, but the plan is to put it on the back burner for now, keep working on it whenever I have a nice block of time to dedicate to it, but if I only have an hour or so available at a time to work on more trivial projects instead. I love the momentum that builds up when working on really small simple games, and I'm hoping to get a few of these little games started and finished in the next few months, and just keep chipping away at TD as a longer term project.

Here's a video of the tower defence game as it stands:


Most of the basics are there really, but getting the game finished involves quite a few tasks, not all of them trivial - adding enemy waves, turret upgrades, multiple enemy types, multiple turret types, lots of level maps, level unlocking, graphical improvements, game balancing, etc. I might put an early unfinished version of the game up on the market at some point, maybe with rough graphics, just a handful of levels, and not the best balancing, but I worry that if I do that I might never finish the game properly!

On a positive note, keep your eyes peeled for a new project starting soon! :)

Tuesday, 20 November 2012

Tower Defence - First Progress Report


My last post was very wordy. This one should make up for that...

Here's what I've got so far:



It's starting to look a little like a TD game :)

Next up - I think it's time to get them turrets a'shootin!


Saturday, 10 November 2012

Enabling the "Move to SD card" option on your android apps


Here's a quick and easy tip that your android app users will love, especially those with older/cheaper devices that don't have a huge amount of internal memory!

Take your existing android application, and add android:installLocation="auto" to the manifest tag in AndroidManifest.xml.

Example:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
   package="com.mrdt.zombiesurvivalgame"
   android:versionCode="2"
   android:versionName="1.0.1"
   android:installLocation="auto">


  • Setting installLocation to "auto" means the user can choose where to install the application.
  • Setting installLocation to "internalOnly" means the app will install on internal memory only (not ideal in most cases, especially if your app is quite big).
  • Setting installLocation to "preferExternal" means the app will automatically try to install itself of the SD card if it is present and is not full.


You'll also need to ensure that your build target (targetSdkVersion in uses-sdk tag in AndroidManifest.xml) is set to API Level 8 or greater.

Example:
<uses-sdk android:minSdkVersion="5" android:targetSdkVersion="15" />

Save your updated AndroidManifest.xml file, rebuild your app, and deploy to a device or virtual device running Android 2.2 or above. Now if you open Settings > Applications, and select your app, you should be offered the option to "Move to SD card" :)

I've just updated my android games to offer users this option, and it'll be something I'll be doing as standard in all my future apps. If you're an app developer you should consider doing the same... As a user I appreciate being given the option to choose where to install my apps - and I'm sure others do too!


Saturday, 27 October 2012

Zombie Survival - now available free on google play!


The question was - Can I make a game in a weekend? The answer was no. Or yes. Or, well... maybe. Kinda. I don't know...

Last Friday I started work on a totally new game - Zombie Survival. By the end of the day Saturday, I did have a playable "game". Or more accurately I had a working game mechanic. There was a good guy, zombies, an objective, and it was fun to play, it even looked pretty good. I guess that could be called a game. Except, it can't. Not really.



A game is more than just the mechanic and the graphics. The mechanic is what really matters at the end of the day, but there's a lot of additional stuff that you have to pack into your game no matter how simple/casual the market - this stuff isn't really optional anymore.

It took an additional four evenings and nearly a whole Saturday morning and early afternoon of effort before Zombie Game was ready for the marketplace. In that time I added screens for highscores, help, gameover, paused, etc, saved/read settings and highscores to/from persistent memory, improved the look and feel throughout, implemented sound and music, did some refactoring (I'm learning as I go, so tend to clean up / rework as and when I have a lightbulb moment), playtested and tweaked difficulty to get things just right (the fine line between challenging and frustrating is where the fun is found!), carried out lots of testing on multiple devices, and did a little bug fixing.

All in I reckon it took about 45-50 hours effort spread over 8 days to go from nothing to published, and I'm really pleased with that. But 48-ish hours effort is not the same as 48 hours elapsed time (lots of problems solved themselves in my head overnight, the subconscious mind is a wonderful thing!), I guess Ludum Dare will have to wait.

I'm sure my girlfriend will be glad to know that I'll be giving it a rest for at least a week or two now... A full time job plus putting in full time hours on an android game resulted in this being quite the antisocial week! Anyway, the game is up on google play, and it's a free download, so why not give it a go? Cute zombie fun just in time for halloween :)




          

Saturday, 21 July 2012

Focus on “Fun” and “Finished”…


Last week I installed the Java JDK, Eclipse, Andoid SDK, and the ADT Eclipse Plugin. I then followed the LibGDX starter project walkthrough.

That single class project weighing in at just 150 lines of code (including whitespace and proper formatting) does a lot. It uses an OpenGL camera, loads image files, draws them to screen, responds to user input, plays soundfx and music, and has a simple game mechanic that makes it a basic game. Not only that, the game could be played on my dev laptop, and on my Xperia Play with no code changes. I was impressed.

Instead of going on to create LibGDX pong and slowly working up from there (as was my original intention) I decided to play around with the example project a little. The bucket became a spaceship and the raindrops enemy UFOs (each had their own class), nobody had any weapons, the UFOs were kamikaze maniacs and moved at varying speeds, aim of the game – avoid being hit. I added the concept of score and health, for each successful evasion you earned 10 points, for each impact you lost 25 hp. Four hits and it’s game over. Still very simple, and kinda fun.

Next steps would have been to introduce weapons, after that more enemy types, then a highscore table, then animated sprites, then maybe an end of level boss, then lots of levels to work your way through. Before you know it I’d have my very own r-type clone on the marketplace! But that’s not what happened. I started worrying that I was doing it wrong, not following the ‘correct’ path, not making the right design decisions. I read a couple of great tutorials (obviam.net and steigert.blogspot.co.uk) and immediately tried to implement those best practices in my simple app. At this stage, as a beginner, it was overkill. I ended up with a confused mess of files, and when extending I was often unsure if I was putting code in the right place. It was so much more fun when I was freestyling, making it up as I went along. Sure it could end up biting me on the ass later, but maybe I should just deal with it later and focus on making a fun little app for now. That’s when I stumbled across this excellent blog post. Here are a couple of choice excerpts that resounded with me:


  1. Don’t Obsess – your code is your code and I know you love it but how beautifully shaped and how wonderful the architecture is doesn’t matter one bit to the end player, especially if the game doesn’t ever get to be playable. Do not obsess about your code. Make it work. Make it quick enough. Make it pretty. In that order.
  2. More than one way to skin a cat – there are many ways of approaching any problem in software. There are normally a set of “right” ways that are well explained in long tutorials on the web. You go off and read the tutorials and you start implementing… You’re not entirely sure you understand what you’re doing, but you just keep going. WAIT! STOP! How about you just code it the “wrong” way for now, just make it work and if it doesn’t feel right later replace it.

Wise words indeed.

Grand arcade games can wait. I’m going to follow my original plan – I’ll write a LibGDX pong game. Then I could take what I’ve learned and write a breakout game. Baby steps that result in regular releases of small working games. I’ll likely end up using really bad practices, but I’m doing this primarily for fun and the joy of creating a working game others can play, learning is a secondary concern. If and when bad design leaves me in a fix I will learn a first hand lesson and better understand the benefits of a rigid design pattern, but to start with I’m just gonna be jammin – I’m going to let myself make my own mistakes!

Android, a modern day Spectrum for amateur game devs


Way back in the 80's I received an Atari 2600 for Christmas. It was awesome. Let’s forgive and forget the crappy graphics, the dodgy one button joystick, the awful sound processor… None of that mattered. This was a machine that transformed my tv into a damn arcade machine – how could it be anything other than awesome!?

I loved my Atari. I spent hours playing classic games like space invaders, pacman, and centipede. But the following year Santa brought me a Sinclair Spectrum +2A… The Atari’s reign as toy-king was cut short. What can I say, I was a fickle child and this new machine could not only play games – it came with the promise of me creating my own games too!

The Spectrum holds a very special place in my heart. I know many of my generation can say the same. I still have it, it has survived numerous house moves and clearouts, I will probably still have it the day I die. Why? Was it the perfect machine? Blisteringly powerful and immune from Moore’s law? No. But just like the Atari, it was awesome all the same. My time was spent playing Dizzy, Manic Miner, Chaos, Arkanoid, Klax, The Great Escape, Deathchase, Potsworth and Co, Wonderboy, New Zealand Story, Blob the Cop, Wizball, numerous text adventures, and so many other great games that I can’t quite remember right now. There was also the bundle of games that came with the machine, pretty basic games but fun nonetheless, Treasure Island, Oh Mummy, Crazy Golf, Punchy, Disco Dan, etc – poor graphics and sound, but solid game mechanics that made them fun to play regardless. I’ve played worse playstation / wii / 360 games than some of these ugly spectrum games. Sure the modern platforms have the aesthetic upper hand and bags of processing power, but if the game itself is no fun, all it boils down to is an exercise in turd polishing. A fun ugly game beats a rubbish pretty game hands down.

Sinclair did all they could to make writing your own programs pain free. The +2A had a basic parser built in, and a tape deck for saving/loading your work. The manual was mostly dedicated to the basic language, and there were loads of third party books and magazines available that included sample code for you try out. In a pre-internet era I spent a lot of time with that manual, my Your Sinclair and Sinclair User magazines, and anything relevant I could find in the library. As a result I wrote some ugly fun games of my own. Pong, breakout, space invaders, that kind of thing. They didn’t really look much worse than some of the commercially available games, and played just as well, so it was quite a rewarding process! Of course distribution was limited to a very small number of my friends who were still in the least bit interested. The Sega Master System and Nintendo Entertainment System were out by this time, the Spectrum was decidedly uncool to those who were only interested in playing games, not making them. My audience was basically me, my family, and a couple of friends from school. It was a lot of fun creating though, I didn’t really care that the resulting game was pretty much just for me to play!

After the spectrum came the closed platform years. NES, Megadrive, PSX, GBA, PS2, PSP, Wii, Xbox360. Buy a consumer unit, play games on it, nothing more. Well, that’s not completely true, I did hack the wii and write a very simple target shooting demo a couple of years ago, but I felt way out of my depth and didn’t get very far at all. Similarly I started messing about with the kinect and unity, but felt like I was spending my time configuring someone else’s tool and not actually doing anything too interesting myself, so didn’t progress too far with those either. I’d say the nearest I got to writing games since the Spectrum days was either using the Game Maker engine to make some fun platformers, or writing basic Java apps for university assignments. Game Maker is a nice tool if you just want to create something fun to play, but I’d prefer to learn a language and more transferable skills than tying myself to an existing engine. The java assignments taught me some transferable skills (mostly forgotten by now), but weren’t all that fun. There’s another problem with writing desktop games too – trying to get people to play your basic puzzler with graphics the Atari/Spectrum could have achieved when they’re used to playing CoD and Battlefield is going to be an uphill struggle.

Enter Android, the saviour. It ticks all the boxes:

  • Open and free SDK
  • A thriving dev community
  • Chance to learn some transferable skills (java programming, game design, graphics and music creation)
  • Relatively mature LibGDX library – helps developers without reducing the whole process to a game engine config exercise
  • Loads of devices, lots of people already have a ‘console’ capable of playing any game you create
  • Marketplace to easily distribute end product (free after one-time setup fee of about £15)
  • A natural leaning towards casual games – people are more likely to play your basic 2D fun game

So for a grand total of £15 I can create some simple games in my spare time and anyone in the world can download and play them? All the while I’m learning new skills and having fun? I’m in!

I’m going to be approaching this as a complete beginner, I will make mistakes, I will be inefficient, my games will likely look like crap, and I’m certain nobody will want to pay for anything I produce. My games will be open source, and I’m hoping to get them to a “finished enough” state that I can make them available for free on the Google Play marketplace. All the while I’ll be re-learning what little Java I once knew, maybe picking up a few tips on pixel art, and hopefully learning a little about making music. Eventually, I’d like to get to the point where I could enter a game development challenge like Ludum Dare and actually end up with a working game at the end of it. I’ll post what I learn here, but please be aware that any tutorials will probably be as far from best practices as you can get – I’m just gonna be doing things my own way and posting the results!