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? :)







Monday, 7 November 2011

Possibly related?

King Radical, being Radical
I'd really like to think so!

See: Dr. McNinja

Come to think of it, that could be an alternative theme... :)

Mobility update

A short update on the RPG: I have a rudimentary tile system set up with a player overlay that I can move on step at a time based on touch events. I guess I'll add direction key(and yes Stoffe: Xperia Play controller support eventually).
That's basically it for now. I guess some form of "no, you can not walk on water" check for the movement is up next.
This is starting to smell a lot like "map editor"...
As for mobility: I'm building a mobile game, I'm posting this from a mobile and I'm entertaining the idea of doing the graphics in the phone as well... nah... many not. I just have one month after all. K.I.S.S.


Control issues

I have them. When it comes to games, at least. Really good controls is what makes a game "perfect", in my opinion. It's for good reasons that every time "best games ever" comes up, games like Super Mario Bros, N and Counter-Strike makes it into my list. These games have very well-honed controls and when learnt, it feels like you have a perfect connection to your avatar, and any mistake made in the game is your fault - exactly as it should be.

It's also about removing obstacles to accomplishing the goals and having effective controls in more ways than that - I couldn't play Warcraft 1 because I happened to play Warcraft 2 first - the controls were that much better in #2 so I just got frustrated.


So, obviously, while not hoping or even aiming for perfection, I need to have good controls in my game. I read somewhere that when Nintendo makes a Super Mario game, they build the character first, then run and jump and play with it until it feels perfect - and then they build the game around this great-feeling character. Whether that's true or not, doesn't matter, sounds like a recipe for greatness!


Also, since there's only a short, short month available for the project, and I'm not cutting down on other fun (well maybe in the end...) effectiveness is key. Nowadays everyone knows about fancy-schmancy terms like Extreme Programming, Agile or SCRUM and those are good tools for working with a customer to get the right things done as quickly as possible, as long as it's done right. But if you want to boil it down for really small teams (like my one-man team) and especially with no actual customer, the principle is to look at the project all the time and think about what is the most important next step for having a playable and fun game? Or, "if I have to turn this in tomorrow, what would make the most impact to do today?"

First step might be to have a program running at all, the next maybe to have a player sprite... then steering it, or maybe having some ground for it to interact with? Depends on the goal, of course.

So, good controls. I need a player, and being able to alter gravity to steer the player, and I need an example level to get the good feeling from. If I nail that, level design and goals can come later.

I'm using 2D-physics from Box2D and I've decided to use a simple ball rolling around + lots of smoke and mirrors to make it look like a skateboarding experience instead. But how to setup the test level? First, I was going to plot a level using squares and rectangles at different angles, forming slopes and slides and so on for collisions. But, how to put them on the level and update them? Enter lots of numbers by hand? Build a level editor (DANGER! DANGER!)? Seemed that way, I'd spend a lot of time not focusing on the game. Also, ideally, I would like to be able to be liberal in how the levels should look, preferably hand drawn by good designers.

So, here's where I may or may not have gotten side-tracked - I'm not actually sure myself. Anyway, I used Inkscape to draw some simple example levels, then wrote a tool to convert those paths to collision meshes and export the image as well. I had great help from some example code I found on a blog, so it didn't take almost any time to get it prototype 1 up and running: running on my phone, I could rotate all the way around to control gravity and thereby steer a ball with pretty good control. On top of that, already a good basis for level editing, Inkscape is already available and there's tons of stuff to extract from the drawings, can probably use it to place enemies and goals etc as well.

Very first level in Inkscape

On phone: down in the pit
On phone: successful escape!

Before I can really get down to nailing the feeling though, I need the ball to look like a skateboarder instead, and oh boy here comes trouble! There's a LOT of things going into creating that illusion:
  • Knowing what surface the skater is on
  • On what side of the surface
  • The angle of the surface
  • Maybe merging angles of multiple surfaces
  • Rotating properly a sprite that is irregular and off-center
This really took a long time to get it all right. For the technically interested, I:
  • Skipped triangulation and just use edge shapes (basically lines with collision)
  •  Make sure that only complete polygons are used for the level shapes, and find out if they are clockwise wound or not - this deals with "which side"
  • Precompute angles for all surfaces in level tool
  • Grab the angles from this when the player collides with a surface and rotates the player, whicle at the same time positioning according to where the ball is
Lots of this seems kinda obvious when you know about it and why, but it took me a couple of days of accomplishing nothing until finally it all fell into place. Had some great help in forums and on Google, once I knew what questions to ask.



On phone, held upside down - a sk8er boi!
So. One week done and gone (not that I've worked on the project all the days...) and I can now start tweaking the feeling and also figure out what the key game elements should be. Probably gonna go with running for time, like N, but am unsure about enemies, puzzles etc. Time will tell!