« Gameplay | Main | Pics »

Clientside Movement

Posted by Andrew Czarnietzki
Mar 08 2010

A small breakthrough, but I figured its notable enough to get a mention on this blog: I now have network replication working for my physics based pawns! (true, they are still majorly broken, but for the first time the clients can actually move around!). This also gives me hope that I can get multiplayer working – the frustration was mounting steadily after hours were poured into the project with no appreciable result… I’m sure there are more brick walls waiting, but this was the ugly problem that was preventing me from moving forward! (this is a bad week for keepingn and development momentum, but at least this improves my attitude on the project as I go down to GDC – and frees up my subconscious to work on different problems)

Categories: Development, Physics

Gameplay Test!

Posted by Andrew Czarnietzki
Feb 01 2010

In a flurry of inspiration and code this project (which I holds the uninspired working title “disc game”) came to life this weekend. There is still a long way to go, and admittedly the parts are still rough around the edges, but I my instincts say there is a seed of something really interesting here.

So without any more preamble, here is the first video:

Now that you’ve had a chance to watch the video, let me break down a little of what is going on there. The basic idea is that the player is controlling a dist that is hovering a short distance above a surface. You could think of this like a magnet over a superconductor or an air hockey puck. The controls give a small force to the puck (forwards / backwards / turn) and while there are some limits to prevent extreme cases, you essentially coast without friction. The puck also has extremely high restitution, meaning it will have a fairly pronounced kickback against collisions (not unlike an air hockey puck). For all intents and purposes, gravity for this world follows the normal of the playable surface.

The interesting part in all this is that the surface can be any abstract shape (though things like sharp corners would understandably cause problems). This “surface hugging” approach makes what is really a very simple 2d control schema into something rather wild. The system I have here works on a sphere, inside of a tube, all over any sort of wildly twisted geometry… I’m even interested in making a mobius loop at some point!

I don’t want to get to much into the code of how this works – suffice to say it’s a rather odd interpretation of Unreal’s PhysX. Despite quite a few more quaternions than I’d ever like to see again, this implementation is entirely in UScript (which is a real testament to the capability of UDK). I’ll also point out that the system works for not just the player’s disc, but potentially dozens (if not hundreds) of discs active at once. (with only a few minor optimizations, I maintain a solid 60 fps with over 1000 live discs floating about the world).

This brings me to the second half of the video – now that I have a discs on a surface, where is the “game”? My first test involved randomly spawning 100 “coins” onto the surface – which can be physically influenced by the player (or potentially each other, enemies, etc). I see a whole library of possible surface-bound objects that range from small health-style pickups (like the coins in the video) to enemies, pickups, projectiles, weapons, etc. I also see this game as a potential multiplayer experience – so while it could be “hungry hungry hippos on acid” I see I’m seeing something a little more aggressive – with plenty of explosions and particles to go around. (Mario Kart battle on non-rational geometry?)

I also want to incorporate pureLIGHT into the gameplay. As part of this, I have a small object that (through a little development black magic curtsey of my co-worker Jason) reads the current color of the world under the player’s disc. This has performance limitations (I couldn’t sample hundreds of points at the same time) but it does allow me to (with more development black magic) read the pureLIGHT result for the world at the given location… meaning I could have the color or intensity of the light affect the player. One of the original inspirations in all this was a “physics game where light of the color blue was slippery”. I’m not quite sure how to integrate all this yet (the first test where you’re speed / power was based on lighting was confusing to my testers) but an idea is that the light you are in will affect your influence – shown in the video as a white ring around the pawn. I have to do some testing on this still – I’m interested to see where this will go.

(I also have ideas for switching the lighting state for the scene – going from this white light to something high contrast black and red, etc. I love the aesthetic possibilities in this, but I don’t know how this will relate to the gameplay yet – I have to do some more thinking on the subject)

As for the world, this first test has a few notable parts – I really like the distortion when you go around the fold in the world or get close to the sloped ground at the “red” end of the track. I also really like the bounce, but if anything, I find the environment a little constraining – I’m not sure if this is an arena type battle game or a linear puzzle game like Marble Madness. The more I think of it though, I wonder if it’s both – the movement mechanics would make for a very interesting linear game… but a spatially distorted combat game like Geometry Wars could also work. For ease of testing I think I’ll start with more of an arena focus, but I definitely think there is a single player puzzle / navigation aspect to this as well (all based on the same gameplay mechanics). In the short term though, I do think the current world breaks down. While it has some really interesting pieces, I’m not sold on the scale or layout. I have a few thoughts floating around for a more appropriate world test (I may revisit this first one in the future) – I’ll post some screenshots as that one comes together.

Categories: Design, Gameplay, Physics, Video