Checkpoints and Encryptions

Let’s think about how a checkpoint system works, conceptually. When you first enter a level, the game should recognize where in the level to spawn the player based on the last saved checkpoint. Similarly, when you die the level should be reloaded (since we want all events and enemies to return to their default state) and the same operation should apply.

Now it’s rather easy to save a checkpoint into memory. Simply write a new sequence action like “SeqAct_SaveCheckpoint” that is fired off when you hit a specific Trigger Volume, and takes an integer as an input. For the start of the level the integer would be 0, the first checkpoint 1, the second checkpoint 2, and so on. This sequence action would communicate with your custom gametype to save this integer to file.

Loading a checkpoint, however, is slightly harder. This will require another sequence action, something like “SeqAct_LoadCheckpoint” that has an integer output (grabbing the value out of the loaded profile in MyGame), which is then connected to a Kismet variable to store the data. As far as I can tell, the only way to properly spawn the player at the correct location is to use a series of gates — effectively, If/Then operations. If the variable = 0, output to a PlayerSpawn with the first spawn point as a conditional. If not, go to another gate that tests variable = 1, and so on.

This can obviously get very messy with larger levels that have 10+ checkpoints, but it’s relatively fast in Kismet standards.

In other news, I recently coded a pretty neat encryption for use with config file strings. As an example, it turns UDK is awesome! into LCAWc4MlKC]l`7_L6iC]bLjSB6=t`Y8r_`AO87ejjO9Rk. There is a threefold increase in string length, but with the added benefit that traditional brute-force cracking algorithms won’t work.

I wouldn’t recommend using config files to store ANYTHING, least of all usernames/passwords, but if it’s absolutely necessary you should encrypt the data and decrypt at runtime. If you’re interested in my encryption, just email me or message me on YouTube and we’ll talk about sending you the code.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s