April 16, 2010


Filed under: Uncategorized — wickedworx dev clone 1 @ 12:38 pm

Yesterday I worked on player movement / physics on two games. One is currently going under the title “Stick ‘Em Up 2”, but subject to change if we think of a different name… One of the areas where we got a lot of mixed feedback on Stick ‘Em Up was the controls. We use Box2D.XNA for our physics, so anyone also using Box2D might find this interesting!

So, for SEU2, I have been prototyping improved player movement:

  • Ducking
  • Improved handling of slopes
  • Improved jump handling
  • Wall jumping

One of the strangest complains we got on SEU was that jump was on the left trigger, and not a face button. I really think it’s obvious why jump is on the left trigger…but for those who didn’t understand why: right analogue stick is used for aiming meaning your right thumb is not available to press face buttons.. if jump was on a face button (A X B Y), you’d have to stop aiming while you jumped. In SEU2, I plan to have jump mapped to both left trigger *and* a face button – so people who (for some strange reason) find left trigger awkward, can have it their way. Weirdos.

OK, so the first thing I did to improve the player movement was to ‘reset’ the play velocity every frame, and over-write it with what we felt was correct. This means BOX2D’s world gravity force is not applied to the player (it is still applied to all other world objects), and we have to use our own gravity counter to accelerate the player downwards. The reason for this change is to avoid the ‘mini accidental jump’ the player would do after running up a slope (after running up a slope, your Y velocity is going upwards, the slope ends, and you continue running upwards). Instead of just using an X/Y velocity, we now have the velocity split as “gravity/jump velocity” (Y) and “walk velocity” (not quite X). Walk velocity is then always applied perpendicular to the ground you are currently on (or, if you are in the air – along X). This worked. It was great, and you need no longer fear that mini-accidental jump at the top of slopes (which often meant you couldn’t do a *real* jump because you were already in the air…)

Wall jumping… this was fun, and easy. Firstly, I lowered the amount of control you have of the player in the air – in SEU1 you had as much control in the air as you did on the ground, meaning you didn’t need to take a run up for jumps, and you could completely reverse the direction of a jump once in the air.. This is no longer the case.. while you still have a large amount of control over your jump in the air, it is not on the same level as when you are on the ground (approximately 1/5th the amount of left/right acceleration in the air as on the ground). This means we have much more control over ‘pushing’ the player off walls when they do a wall-jump, even if they are still pressing the stick in to the wall.

Ducking .. in order to do ducking we give the player two physics bodies. Only one is ever enabled, either the ‘standing’ or the ‘ducking’ shape. The properties (position, velocity) of the enabled body are copied in to the disabled one each frame. When the player switches between ducking/standing – we swap which body is enabled. If the player is ducking, we do a raycast check to make sure there is enough space to stand back up, and if not – we make sure the player stays ducking. Actually fairly simple to implement, and so far, appears to work fine!

For Excruciating Guitar Voyage, I’ve been adding extra features which should allow the level design to be more open, despite the game’s 2D limitations.. One of these new additions is LADDERS. I use a ‘sensor’ body for the shape of the ladder, which informs the player whether they can “ladder” or not (on BeginCollision and EndCollision messages are sent).. If the player can “ladder”, and chooses to ladder (by pressing ‘up’ or ‘down’) we simply turn off their gravity, and allow movement in *either* X or Y. This prevents diagonal ladder climbing – you can either go up/down or left/right. If they jump, or leave the ladder area, everything returns to normal. This hasn’t been tested to death, but so far – it seems to have the desired effect. In EGV as there are no other dynamic objects than the player, the world gravity is actually set to (0,0) anyway… one feature I haven’t found in Box2D is the ability to set different gravity values per object (override, for example), so best to not use it altogether in this case.

OK, was gonna write more, but I forgot what while I was eating lunch.


April 10, 2010

continuing on (again)

Filed under: Uncategorized — wickedworx dev clone 1 @ 10:18 am

Stick ‘Em Up has been doing really well in the XBLI charts. Me and Jon are both very pleased. I feel it’s a win for “good gameplay” amongst what can sometimes look like a sea of avatar gimmick. It goes to show, you can just make a good, solid, fun game – and it will be successful on its merits. Party on.

(find out more about Stick ‘Em Up at http://whatevergames.net/ )

Anyway…. it’s time to move on to the next project(s). I’d taken a couple of weeks off after SEU – the first week was very busy, and the second was not. I did some recording with Kieronononon, saw some bands, went to a safari, and even found time to play some games. Either way – right now, it’s looking like I’m going to be very busy for the next couple of months – and I think that’s a good thing..

Here’s a screenshot from Excruciating Guitar Voyage (PC / X360 Indie). You can see here, ‘the EGV sewer band’ – hanging out in the sewers.

Since I last posted about EGV, I’ve pretty much started again…! It may seem wasteful, but now I’ve actually got an idea of how I want the game to play, this restart made a lot of sense. Plus, I’ve brought it up to scratch using all the GameObject/Component management systems we used in SEU (while also bringing over its existing simple scripting system – for cutscenes, game events, etc..). No idea on the timescale for this, as I’m working on another project with Jon – and that will be taking priority.. and I’ll just be working on EGV whenever I get stuck / level design block / etc…

Things should be more efficient on this project, as we actually have a scene editor now! Screenshot below (yes, I realise it still says “form1”.. not all the buttons work yet, either):

I’m also (for a couple of weeks) helping out around the edges on another game project.. it’s starting to come together now – should be really fun! Not sure how much I can write about that, so I’ll keep it minimal for now.

Blog at WordPress.com.