Wednesday, 30 November 2011

Success! Well, kind of? :)

The month is over and while I am far from having what would be called a complete (as in publishable) game, I am gonna declare NaGaDeMon won (at least more than lost ;))

All the basic features for core game play is done: The player is controlled by rotating the device (sometimes violently), there is a goal that needs to be reached before time runs out, there are enemies that eat some of your remaining time, and boosts that give you more time. The player also dies if losing control and bumping the head against the ground.

I have successfully deployed and played my game from start to end today, all five levels, dying sometimes, winning sometimes. Success!

But the main reason it's such a raging success is that I managed to do this, without spending insane amounts of time, and still: there's a big part of a game done, I've learnt a new environment and a new platform, I've re-learnt a lot of horrible trigonometry, made new friends and most importantly: remembered how fun it is to make games! There will be more.


Here, have some screenshots, and then I'm gonna talk a bit about what more there is and what is missing:

Super simple intro level, meant to teach the absolute basics.

Suddenly, the goal is... where?

And tricksier still.

So, like I said, all the core features are there and it works. So what needs to be added?

Graphics


Obviously! All of it is ugly placeholder graphics, with programmer's animations. The player needs to be interesting and make cool moves, and everything else needs an artist's touch.

Sound


Also placeholders, though I start to like what Dennis has done for the soundtrack (the sound effects is all my fault!)

Fail


The game needs to taunt the failing player and there needs to be a death screen.

Win and Highscores


The game is designed so that you are supposed  reach the goal with as much time left as possible, meaning that avoiding the enemies and collecting a strategic amount of candles at the same time as reaching the goal will net you bigger scores. This should also be tied to a server, of course!

For the obsessive-compulsive player, a big hit! ;)

Levels!


These are just placeholders, although the first two-three levels now are at least sketches on how to ease a player that don't know what to expect into how to play the game (hopefully). The level editing works so the process is fast, but it still would take quite some tweaking and testing to make good levels, as usual.

Level select


Select level screen, and unlock levels.

Replays


Haven't tried this, but should be possible to save each game and have replays, thanks to Box2D being deterministic, meaning that the physics will repeat the same things given the same input - which is current gravity each frame. They could be played on the start screen, they could be replayed from a menu - and other players could download and watch your speed runs! (Much like N does it).

Tweak and optimize


Make everything better and faster. :) There should be a lot to do on that front.

Other polish


Such as a help screen, menu system, real splash screen, fonts and so on.

Conclusion


I think this could very well be turned into a real game, but then I would need to enlist some help with graphics and sound. I'd also say that taking some time making maybe 15 good levels with nice rounded corners is very doable. So, am I? Definitely maybe. ;) I'd like to see this game in a completed form, and at the very least I'm going to spend some more time tying it together.

Thank you NaGaDeMon! And thank you Bjarne for making me do it... See you again next year!

Tuesday, 22 November 2011

Terrible pace

I've had such a terribly slow progress lately that this blog looks like it belongs to Stoffe. So terrible in fact that I just had to post for the most minuscule of triumphs. After battling with the Bitmap class for way too long and finally realizing that I was a terrible programmer, not that the Bitmap class was terribly implemented: I finally managed to create the pixel-upscale that I wanted.
The tiles in the image here are 16*16 with a pixel-size of 5*5. It is a bit too big naturally, but I thought it would make a better screenshot. I guess a typical pixel size for the final game would probably be 3*3 on a mid range screen.
The image is a bit crushed in this post, so click it to see the original if you want to see a more realistic view of the scaling in action.

Monday, 21 November 2011

Refactor, bugfix, implement, blog, rinse, repeat

New version: http://dl.dropbox.com/u/14713777/GhoulsnWheels.apk

See below for info on what's new.

A fair bit of Sunday's hacking went into restructuring poorly thought through structure. Not perfect now, but better, and a bit easier to work with.

Also got my first real bug report, Mr BZR (if that is indeed your real name) discovered that a part of the world was invisible but still had collision. Since the visuals and collisions are drawn from the same dataset, there should be something wrong in my code... a quick look in Inkscape confirmed that the collisions were correct, so something about the level drawing code then...

Sure enough, and thankfully easy to find (this time). An Obi-Wan error causing the code to ignore the second point in each polygon was a bit odd though, but oh well. :) Slipped past me earlier because most edges are pretty short and so doesn't affect the layout much. Good catch there!

So, some new stuff as well:

Time - it will run out. There's a countdown going on in the corners and when it's down to zero, well so are you. Would be nice to see how this looks on other devices because I'm pretty certain my values are off and therefore hard-coded to my device at the moment.

My First Enemy - a playset suitable for all ages. Not only will the countdown bring death and destruction, there's also a winged demon loose that steals some time from the player given the chance! (What actually happens will be made more visually clear, right now you need to know it to notice it I think).






Saturday, 19 November 2011

Let There Be Rock

Some small updates, same URL as before: http://dl.dropbox.com/u/14713777/GhoulsnWheels.apk (remove old first and install this instead).

Changes in this version:

Programmer. Composer. Lebemann.
Sound

  • an initial sketch of in-game music by the multi-talented Dennis Saarela. If I wanted to have this game made quickly, should have contracted him. ;)
  • kicking off the game with a skateboarding sound
  • death sound, one part inspired by the awesome shattering sound in old Wizball (though mine is nowhere near as shattering) and for the other part I added the Wilhelm Scream for fun (or lulz).
  • winning sound is just a classic sounding victory fanfare
All the sounds temporary/subject to change. Will see if it's reasonable to add some skateboard landing sounds as well, need to take into account time between contacts.

(think I might have had a crash in the sound playing when testing, not debugged yet, so don't be afraid if that happens :))

Can not fall off the world

Spent way too much time trying to have barriers around the world where the player would die if travelling too far away, but wasn't satisfied with gameplay nor how to visualize this. So now instead, the level has its own "gravity" of sorts and will return the player to the playing field if going too far away. Please let me know how this feels, both as concept in itself and the speed/distance etc.

Zoom out

It's now possible to see the whole level by putting two fingers on the screen at the same time (mostly useful on levels the size of the third one or bigger. Need to take into account even bigger levels and make it possible to scroll as well, perhaps. Currently freezes the action, that may well change.


The rest/the next

No changes to graphics or levels (sadly). Need to find someone to do the graphics. And the levels? :)

Next up should be:

  • timer countdown and objects to pick up and gain more time (this will also be the (high)score)
  • enemies, thinking two kinds for now:
    • flying demon that semi-hunts the player (goes in general direction but not homing directy) and that probably do not cause death, but is more annoying by pushing the player (if that works nicely) which in turn may cause death of course
    • gravity-affected objects such as rocks that will cause death, adding to the puzzle since they will roll and fall according to the changed gravity

After that it's time to start tying things together properly with start/death/win screens and also design some actual levels. 11 days to go, hopefully doable. Now it's time for a beak with some drumming and some (many) beers!

Wednesday, 16 November 2011

Testing time time time is fall in love time

fall in love time is testing time time

For those with an Android Device, here's a little APK: http://dl.dropbox.com/u/14713777/GhoulsnWheels.apk

Not gonna say much (no preconceptions) other than that if it works, you should be able to play three levels that will then loop.

At this point I'd be interested in hearing ANY and ALL feedback, no matter how obvious it must be that I can see it, no matter how big or small - anything. Please. Thank you!



Tuesday, 15 November 2011

Damn you Android pixels!

In a week my progress is this: I can now draw pixels. <tired Monthy Python cheering>Yay</ tired Monthy Python cheering>... Naturally I could draw pixels from square one(arf arf) but the problem is that any attempt to draw into a Bitmap and get a 1:1 relation between the bitmap pixels and the physical screen pixels seemed to be beyond me. OK, I did not work for a week before solving this, it was more like 3 hours but as I had to leave the problem unsolved for a couple of days to get on with life, it kind of felt like a week.

So how hard can it be? Well it was a bit trickier than expected. What I wanted was to load a PNG containing some 16x16 tiles of mountains, lakes, plains and so on and to draw a map. But Android is very helpful and re-sizes stuff automatically to fit your screen size and your screen density. This is normally very helpful unless you want to do the exact thing I wanted. That is: complete control on the pixel level. So after a lot of googling I found that the following 2 things fixed my problems:
  1. In the manifest XML file, add the following:

    <supports-screens android:anyDensity="true" />

    (this is a really bad idea for most apps as it turns off a lot of automagic "under the hood" stuff that is designed to make your life simpler in most cases. Read the anyDensity documentation here)
  2. When loading the PNG (even from the "drawable-nodpi" folder) the Bitmap was scaled after load was completed(24x24 instead of the expected 16x16). To correct this I had to pass in an extra parameter to the BitmapFactory:

    BitmapFactory.Options opts = new BitmapFactory.Options();
    opts.inScaled = false;
    Bitmap tiles = BitmapFactory.decodeResource(res, R.raw.tiles, opts);
And so now my pixels are ending up where they're supposed to.

And before I create the "Pixel re-size" functionality, everything will be reeeeally small(this image on a recent phone is reeeeally small as the DPI is a lot higher than on a laptop/desktop computer).

Halftime updates

15 days down, 15 days to go - pretty happy with progress since stuff is happening even though I haven't stayed at home on weekends or otherwise rescheduled much - meaning I could of course have had a lot more stuff already, but also meaning that I've probably cut down on my pointless internet surfing rather than important/fun stuff. All good?

Managed quite quickly to get a pretty good feel when skating along in all sorts of impossible angles, but could use some more play testing and edge-case tweaking. I'm not entirely happy, but perfect is hard and also the enemy of good. Not having anybody else doing testing is, of course, a really bad idea, so really should prepare some test levels and get some external feedback.

Prompted by some people on the internets who also wanted this tool, I spent this Sunday on cleaning up my level converter tool and releasing it to the world instead of working on the game - on the other hand, it now works generically and does all the things I need, so faster turnaround time for me as well. Plus, good karma? :)