Development Diaries

snapman's picture

Return of Weekly Updating: do that again

Just when you thought I wasn't going to be updating anymore, a new update comes right out of nowhere!

A while ago I read an interesting article about the indie games scene, and the creation of what they referred to as "a new genre of game" that had arisen entirely due to the efforts of independent developers. While I think it can trace its roots to some rather big budget games first, it is an interesting notion: The origin of the time manipulation game genre. While it probably traces directly to the Prince of Persia commercial title "The Sands of Time", the concept has evolved a fair bit past simply rewinding time, fast forwarding time, pausing time, or perhaps the real father of the genre, bullet time. Now games like Cursor 10 and The Misadventures of P.B. Winterbottom have multiple timelines: parallel, intersecting, reversed, accelerated, and slowed all together. It's a very interesting concept, allowing for a lot of creativity on the part of the player, as to how the recorded movements are arranged or manipulated.

Which brings me to tonight's topic: Recording and playing back motion in KnP. The mechanic is something new, but that doesn't mean you can't make it in something old. My first thought on this was a description I read once of sending information between multiplayer game clients. It read something like this: "You don't just send the current location of all the players, you also send their direction and velocity. That way the computer can fill in the space between updates by moving the character according to the most recently sampled velocity and location" While taking a look at the path motion in KnP, it looked a lot like the principle from the motion sampling for multiplayer games I'd read about. But there was no way to manipulate a path object during a game, I saw a way to recreate it. If I could draw a path of objects, and have another object read them one at a time, I could record and play back motions.

Using objects for path nodes was necessary because KnP has no support for arrays of any dimensions (except 0!). But I had to make each object numbered, and store a speed and direction. I finally decided I didn't need to store a direction, since that would be taken care of by the position of the next node in the path. So I used a simple trick to number each objects alterable value A immediately after creation, along with storing the recorded object's current speed. Quickly I had a path of numbered objects with stored speeds. It was just a matter of waiting 5 seconds, and adding an object that would start reading at the beginning of the path, changing its speed as it read. The following object very nearly matched the motion of the recording object, with little difficulty or error.

I chose to destroy the path as it was read, but it would be easy to reuse the path as in TMOPBW, or reverse along the path like in sands of time. Or even record multiple paths, by setting the alterable value C!

Attached is the result of my experimenting. The first stage uses the mouse, which is capable of achieving speeds in excess of the KnP maximum 100, so it's not perfect. The second stage records the movement of a platform movement object, with one-way collision between the player and the echo. Press SPACEBAR to switch between the examples.

(It is important to note that this technique is better than constantly creating objects, and repositioning the trailing object at the oldest one. This trick is much smoother by simulating interpolation between points by the recorded velocity. Also, this technique allows for more complex timeline manipulation that this short example file demonstrates)

Pizza Time's picture

ZSBK test 2

This version features zombies that have health states and magically disappearing torsos because I haven't added the objects for those yet. That's not even half the stuff I had in my list but I really had to release something to make it look like I am actually working on it. There's a fullscreen mode in it though, which makes the game look hella 8-bit, almost like an Atari game. You'd think that was what I was aiming for, what with the stick figure characters and all.

kirkjerk's picture

the revenge of the gods trilogy

VIRTUAL SISYPHUS! Drag the boulder to the top of the mountain!
VIRTUAL TANTALUS! Reach for the delicious grapes, or duck into the pristine water to slake your endless thirst!
VIRTUAL PROMETHUS BOUND! Drag the bound firebringer away from the eagle that seeks to consume his delicious liver

snapman's picture

Weekly Updating 3: Turn, Turn, Turn.

I have an incredibly good excuse to not update this week, but I'm going to go through with an update anyway. It's going to be short.

Last week I got a comment linking me to the KnP tips & tricks thread here on Glorious Trainwrecks. One of the last posts in that thread was about making an object turn towards another object or direction. I remembered asking that very question of the KliK Kommunity a long time ago, and receiving almost the exact same answer: later Clickteam products have the direction calculator, which solves the problem entirely.

Not content with this, I decided to finally solve that problem in KnP. I got out some paper, sketched out the problem, and found a simple solution. I knew there were 4 situations. The first two were obvious: If the target angle is greater than the current angle, add to current angle (and vice versa). The second two were difficult. Under what situation should you subtract to get a larger number, or add to get a smaller number? What was the difference between moving from 12 to 20, and 4 to 28? The difference was, unsurprisingly, the difference. Once the absolute value of the distance between current and target grew greater than half the circle, it made more sense to loop around 0 instead. A bit of figuring, and voila! Turn Towards accomplished in KnP.

Note that this technique alone only works for one object, not a swarm of objects, because direction retrieval doesn't know which object pair to select from and give to. But that's a whole 'nother article. "Object selection" is one of the most confusing aspects of KnP event writing. Sometime I'll talk about that in greater detail. But for now, here is an example of a basic turn towards effect. Enjoy!

SpindleyQ's picture

Serenade: A Klik & Play Love Poem

I made my wife a Klik & Play Valentine on the bus yesterday. It's like Rod Humble's The Marriage, only the marriage depicted doesn't suck, and there's helicopters. Thought you guys might appreciate it.

captaincabinets's picture


Fellow trainsurfers, I am moving my ass interstate (Sydney, to be precise) in pursuit of the three pillars of society: beaches, bitches and a philosophy major. So, I will be MIA like olivia newton-john's boyfriend until I get my computer working, an internet connection, and a fixed address, and not necessarily in that order. Needless to say I will miss this month's KotMK. Also, needless to say, I'll be back, with a head full o' ideas and salt water.

Until then!

Keep the spirit alive, etc.

Pizza Time's picture

Progress in animation (ZSBK)

I've been beavering away at this for the past few days which explains the week or so between updates.

If cabinets and snapman can impress us with their groundbreaking engine manipulation then I guess I will have to impress through animation.

Beholden to my combo animation concept (which looks funny as she's walking on the spot and there's nothing in the background);

The next thing I will have to do is implement it in a way that positions the player at the coordinates of the final frame of each individual sword swipe so that it won't look like it's instantaneously jumping back to where the animation started. It wouldn't be too bad for the first swipe since the sprite only steps forward a few pixels but for subsequent swipes it's going to look damn amateurish and I'd like to have an air of above-amateurish around this game. Also have to adjust the speed of the animations depending on the frames since there's a bit of that in the gif. Not forgetting fixing inputs so you won't be constantly attacking whilst you hold down the attack key, I'd like some modicum of timing in there.

captaincabinets's picture

Holy freaking rhinocerous on a coke binge, batman, we have a KnP ROGUELIKE

...well, more a proof of concept.

But seriously, I present the first version of Krawl! At this stage, it's just a random maze generator. It takes a little while, but it's kinda mesmerising. Linear searching of a matrix has never been so much fun!

This took me some hours. Though I've gotta say, it is one of my proudest achievements in Klik & Play to date.

Next step is making it look like a mad proppa dunjin with rooms and naturalism and all that bebop, but I'm a little spent.

Edit: For those interested, the algorithm is a slightly modified version of part I of this page . That page, in turn, came from the pretty interesting (for the mechanics-minded of you) 300 mechanics page.

snapman's picture

Weekly Updating 2: The Best Movement

Welcome to part 2 in our ongoing series of weekly updates on my experiments with my old friend, Klik & Play. Last week I discussed linked/paired object chains, and their potential application to swing simulations. While I considered using this week's entry for a further discussion on pairing or the advantages of wait-based simulation, I decided to talk a bit about one of the most overlooked object movements in KnP: The Platform Movement.

The Platform Movement is generally looked down upon. It doesn't function well with sprite animations of irregular height and hotspot combinations, landing a jump zeros horizontal momentum, its rudimentary inertia simulation mirrors momentum when the player tries to switch directions, and the wall jumping bug is well known. But despite all this, the built-in platform movement has great potential.

If you've every tried to make a two-player game with the platform movement, I'm sure you've noticed that the "bounce" condition when applied between two platform movement objects treats the slower/unmoving player as a wall. But a simple trick can change that dynamic. One of my recent experiments was to try transference of inertia between platform objects of different speeds. It's simple. Three events. The first tests collision, and object A moving faster than B. If A is faster, B takes its direction, and both object swap speed. The second tests collision, and object B moving faster than A. If B is faster, A takes B's direction, and both objects swap speed. The third event simply tests collision, and results in a bounce. The effect of this (with tweaking) is the ability to unexpectedly shove the other player off a platform, or into a trap.

But the greatest potential I found came from not using the platform movement as a player movement. Set a number of these object to control by an imaginary player 2, and lock player 2 input at the start of a level. When two of the same collide (from being shoved by a player object), "switch position with another object" and the two appear to transfer inertia from horizontal collisions! I've found a few other tricks with locked platformer objects, but I'll probably save them for the next KOTM. It's coming up in about 11 days, I think?

edit1: fixed a few typing errors. Original post was written under time constraints.

Pizza Time's picture

Zombie Slash Bikini Killers, the list-ening

I've decided to compile a list of stuff for the next release, for shits and giggles. Feel free to print it off and tape it to the side of your monitor so you can add exclamation marks next to the features that I neglect to add.

- Sexy combo animations
- Zombies that change attacks/animations based on how much of their
shit gets messed up
- Use hitboxes for attacks instead of that separate sword-trail object
- Hidden meaning that compares the relationship of the zombies and
the claustrophobic urban setting as some sort of reference to the
mental struggle of humanity and their modern day environments
- Puddles of gore that hang around due to the low amount of on-
screen dead people (so no huge swarms like in Dethbus and
Zombie Invasion: the Body Explosion).
More blood+less zombies=more violence!
- Trash and chaossss!!!!

Syndicate content