Monday, 27 September 2010

Touching your (ShadowNinja)Monkey

So, to follow up on the previous post, what progress have I made with ShadowNinjaMonkey (SNM) so far?

As there is a fair amount to go into, this will be split over several posts.

Control Design
To start with, I focussed on designing the combat in more detail. In the original Game Jam prototype this aspect really wasn't thought about properly. Along with the shadow based hunting/hiding mechanic, this is the other core piece of gameplay, and ultimately the reason why you are hunting/hiding, so it should hold a certain amount of depth.

Although by no means a Soul Calibur-style fighter, I'm still imagining a back and forth attack/parry system within the combat, where timing is key, and where you have the ability to charge your attack (with a negative effect on movement speed).

The ninja's movement is another aspect that needs to be polished. The ability to move with precision when hiding is needed, and also the ability to pounce at the enemy when attacking or when jumping between cover.

Basically, the design principle running through the control design is this: you should feel like a badass all the time. To get this feeling there will have to be a lot of tweaking, play-testing, and fine tuning.

Now, the iPhone/iPad touch interface poses some interesting design opportunities and issues. On the PC it is simple - WASD for movement, and a couple of buttons for pounce and attack. On iOS devices movement isn't too hard - a classic thumbstick can be simulated easily (I'll post about my implementation one of these days).

For jumping and attacking, however, there are a large number of options, including taps, double taps, two-finger taps, combinations of taps and holds, and gestures. From my experiments pretending to control a game on the iPhone, it seems clear that using 2 fingers on one hand is fairly awkward, and at most should only be used for advanced moves. My initial guess as to the controls is as follows:
  • 1 tap - Weak attack
  • Hold - Charge attack. Attack on release.
  • Line Gesture - Jump (not sure whether the direction will have an effect)
  • Line when hitting wall - Wall Jump (reverse direction, speed up)
  • Shapes (zig-zag/circle...) - Different attacks
(For now imagine the thumbstick on the left half of the screen, with the right half empty for gestures - this should be user-definable)

These moves can be combined, if you are dextrous enough, and there could even be some special-move combos. It goes without saying (but I'll say it anyway), all these controls may/will change when there is something to play with.

Enough designing - next step... code.

ShadowNinjaMonkey AWAKES

Long time no post.

This is hopefully the start of a series of posts about my work developing a game for the iPhone. First, some history...

The origins of this game comes from the Global Game Jam 2010 (a great annual event where teams must design and make a game in a weekend - definitely worth getting involved in).

I had pitched the idea the previous year, but we finally got round to making it this year. The title was ShadowNinjaMonkey, and the idea in a nutshell is this: a black and white ninja hunting/battling each other in a black/white world of dynamic shadows, where the white guy is hidden in the light, and the black guy is hidden in the shadow (see Samurai Jack - Black vs White ninjas for the obvious inspiration).

The result of the weekend was both satisfying, and disappointing. The final game was FAR from finished. The player was just a dot, his sword only stuck out sideways, it was very hard to control, the combat wasn't fully thought out, and it would crash if you finished the level. But hunting each other in the dynamic lights and shadows turned out to be a lot of fun, and we ended up winning several jury votes for the best game (resulting in having to make some very confused sleep-deprived speeches - I'm the mumbly longhaired guy at around minutes 7 & 11).

You can try the original version here. It requires the Unity plugin, and another player on your local network (you have to enter their IP) - like I said: FAR from finished.

We agreed as a team to work on this further after the Jam, and although we've separately investigated aspects of it, we haven't focussed together enough to produce anything of note. I'm hoping this will change. I've been working on the control logic on and off (in a variety of languages, including flash and javascript), but have finally started to work on what (I hope) is the final iteration.

As mentioned above, the iPhone is the destination for this game. There are many reasons for this... I am working as a Cocoa developer during the daytime, I want to practice iPhone development, it has proven itself as a game platform that works, and there are more opportunities for making some money on the AppStore than in the browser, desktop or console.

So, what is the purpose of this blog? Well, mostly I'm hoping to motivate myself into seeing this through to the end. Also, if this does lead somewhere it will be an interesting log of my thought processes. I will try to regularly update these pages with my progress, game design ideas, artwork, anything really.

Coming Soon... An engine, some code, and some improved designs.

Wednesday, 8 April 2009

A new project, a piece of code, and crossing the streams

Let's give this blogging thing a go.

I've recently been doing design/development on a band's new website. It's going to be a simple 1-page sound-clip/mailing list sign-up type page, but I am keen on throwing around some of the more interesting/modern (read trendy) web gubbins.

Out of principle i've until recently refused to use twitter, and I still don't 'get it' - but as an incredibly simple method to get band members posting on their own site, without setting up a blogging tool, it's great.

Also, the hosting plan they've bought is html only, which is actually quite invigorating, forcing me to get more into javascript coding, rather than just relying on PHP/MySQL to do a lot of the legwork. This also means that the scope of the site is drastically limited, only allowing me to scrape up the putrid run-offs from other sites content streams.

This seems to be a large part of the (now slightly aging) web2.oohhdeargod ideals - outsource the maintenance/admin/storage tools to other site, and simply collect their streams into one place. The RSS feeds (and more recently the easy to use APIs) these content managers (such as twitter/flickr/youtube etc etc) coat themselves with now mean that even the simplest sites can provide dynamic content with a few lines of code.

Which leads, bizarrely, to the code part of this blog post. Ripped and modified from the great CSSTricks, this simple snippet of JQuery will search for a specified string using Twitter's API, grab up to 100 posts, and randomly pick 2 from those that are available (see the CSSTricks article for the supporting .linkify() function).

var q = 'hot rats';
var i = Math.randomMax(data.results.length-1);
var j = Math.randomMax(data.results.length-1);

(I promise that future code will be more interesting)

The idea behind this was that, even if the band guys never post a single message, there will be random, anarchic content always appearing on the site. In the design it is fairly well scrambled using negative letter-spacing over a b/w silhouette, so that too much isn't taken from the inane twitterings. There is whole bunch of enhancements that could be added to this - such as only picking tweets of a certain length, not picking the same tweet, etc etc.

Note that this is my first look at JQuery code - I have been using Prototype as my JS library of choice up until now. I prefer Prototype simply because of history, but it looks like JQuery is winning the popularity vote, so I've decided to give it a go in new projects.

Despite its flaws, JS seems to be where a lot of the heavy lifting is heading in webdev, and it's been good to get a bit of practice in.

Monday, 6 April 2009

A new blog - what are the odds of me posting to this again?

If we take the need plus desire of others to read my thoughts, multiplied by the actual value it would have to them, divided by my own narcissistic desire to splurge my brain-wanderings all over their eyes, subtract my ability to produce anything remotely readable, entertaining or useful, and then divide the whole mess by 0 (the number of visitors this blog is likely to ever receive), we can see a result that is absolutely meaningless, which demonstrates nothing, and which is of no discernible value to anyone.

Anyway - if I do ever write here it could well turn out to be a mixed bag, mostly snippets of code (PHP/Javascript, mostly), some links I guess (though the internet is full of them, why would you want more?), and maybe some other random thoughts (maybe i'll even go off on a rant about the planetary sized ego of amateur bloggers...)

Bosh. Blog that you blogging bloggos.