Lachlan's misadventures in games programming

Monday, 24 October 2011

Designing moving mazes is difficult!

10/24/2011 10:44:00 pm Posted by Lachlan , No comments
Today in an unrelated post, I heard it said that the poster hated blog posts that start with 'The Title Says It All' - after all, then there wouldn't need to be the rest of the post accompanying it. But still, as my title says, designing moving mazes is difficult!

For that matter, I'm finding designing puzzles difficult. I am finding it difficult to, without experience, judge the difficulty of the puzzles. What has taken me ages might indeed be a simple puzzle, and what I've been able to think was simple might be prohibitively difficult to actually solve as opposed to design.

But I'm actually struggling with this. Its a map I actually wanted to make - a maze that uses elevators to change the layout as you're going through it. What I've done is make a path, and then attempt to make a map that goes with it. I think the basic design is close - but it might be workable. I think I might try to make a timeline of it and see.

Hmmmm.... Lets see how workable this is

Update - 11.57 PM
I'm pretty sure it's solvable now. There's some changes from above. Questions are a) whether my thoughts that it is solvable is correct, b) whether it is practically solvable in the limited time and c) how difficult it actually is. We'll see once its coded up!

5 Actual Puzzles, 2 Simpler Introduction to mechanic Puzzles
Total 7 Puzzles

Friday, 21 October 2011

An open letter to Cyanide Studio regarding Securom

10/21/2011 03:11:00 pm Posted by Lachlan No comments
I make no secret of the fact I detest SecuROM. I detest intrusive DRM, but I have a special deep loathing for install activation limited games that treat me like a thief. It is a sad thing when a pirated copy ends up being a better copy then the actual purchased product - and a terrible way to encourage people to purchase your product. Its like the masses of unskippable ads and anti-piracy messages at the start of DVDs - I just bought your damn DVD and you're telling me in an unskippable manner that I shouldn't pirate the said video? If I pirated the damn thing, then I could just watch it! I will probably write a more full post on it later.

I bought Blood Bowl on sale late last month. I've finally downloaded it and installed it to discover that it's installed the SecuROM malware on my computer, and will use all of 5 activations with minor changes in my hardware or when I need to reformat after a crash if I lack the forsight to uninstall it (and everything else like it) manually before my computer crashes. It royally pisses me off when I feel treated like a thief when I've purchased a product. I just sent this open letter to Cyanide studio to the only address on their site I could find - . For what it's worth, I'm placing it in the public domain, so you are welcome to copy it when you feel ripped off by SecuROM or other anti-piracy measures, and so Cyanide have the opportunity to respond if they indeed care to.

To Whomsoever at Cyanide Studio this concerns,

I've just finally finished my Steam download and am really disappointed to find the inclusion of an install-limited version of Securom. I know that I should have seen it whilst purchasing the game - or more precisely, preventing me from purchasing the game, but now I feel really very ripped off, and just a little violated.

Given how secure SteamWorks as a non intrusive, account limited DRM is, are there any plans at all to release a DRM removal patch or switch it across to SteamWorks in the future? If not, could I please beg of you to consider it. Blood Bowl is past its peak of sales, and removal of the overly strict DRM in favour of a non-limited one (such as SteamWorks) could only possibly increase future sales - any quick search over the internet quickly reveals people unwilling to even buy the product at 80% off due to the limited activations of Securom.

As somebody who barely plays multiplayer games, I feel like I'm getting a worse quality product then if I pirated it. Which is really disappointing, because it looks like a fascinating game that I'm looking forward to playing - only, with my consistent reformats as a minor game developer myself, it looks like I won't be able to play it long. I understand that there is a de-activation/uninstallation tool, however I don't understand why it is necessary to treat me like a thief when I do the right thing and purchase your game. And I shouldn't have to do a full restart because I'm running some tools I use to develop that happen to be detected by SecuROM - your game isn't the only thing I use my system for.

I've seen various people state that you care about customer feedback - and I beg of you to consider this piece of it. Until you remove SecuROM, I won't be purchasing any more of your games - which is disappointing because you seem to have some original games. I'll simply have to go without.

Yours legally and legitimately

Lachlan Kingsford

Thursday, 20 October 2011

Jack is a Fool - Puzzle Progress - Update on Squish Time!

10/20/2011 09:15:00 am Posted by Lachlan No comments

Turns out yesterday's puzzle wasn't necessarily solvable. I've adjusted the position of each of the platforms, and now it is.

I calculated new positions using a copy of Calc (basically as fancy pen and paper), starting with the final position and backtracked 5 positions.

Next puzzle!

Wednesday, 19 October 2011

Jack is a Fool - Puzzle Progress

10/19/2011 10:46:00 pm Posted by Lachlan No comments

Just a brief update on progress of puzzles.

Turns out one of the puzzle ideas was if not bad, very difficult to execute (as in, fully design). It was an idea for a kind of moving maze. I'll wait until I can think about it more - but I still like the idea.

I've been working on another puzzle inspired by the valves puzzle (with the wheelburrow) in Grim Fandango though its turned out nothing like it. I'm trying to think of a simple thing that a couple of buttons could do to the moving platforms to make it a puzzling and solvable challenge to make them all align. I'm just not quite sure yet. The puzzle as stands is below - though may change totally.
I'll update when I've done just a little more.

---UPDATE - 11:03PM ---

I think I've made my puzzle. 
Please Click for the detail

The idea is that the platforms are going really fairly quickly and hence will squash jack unless they're put in the right order (maybe - 3 in line then 2 in line) - though this isn't so important. I can't test it yet anyway.

You put them in the right order with the Navy, Blue and Green buttons. The navy one pauses A C and E, the blue one B D & E and the green one A C & D. They each pause for everything else to make one quarter of the journey - I've marked out the distance with x.

Problem is - whilst I like the idea, I don't know how many moves (or indeed even if - though I stronly suspect so) it will take to be solved. So - I'll solve my puzzle tomorrow to be sure.

I like the idea of the level though - looks challenging.


Saturday, 15 October 2011

Jack is a Fool - Potential use for platform engine

10/15/2011 01:13:00 am Posted by Lachlan , No comments

I've started toying with an idea to use with the Platform Engine. It's called 'Jack is a Fool'.

In Jack is a Fool, you won't control Jack directly at all. Instead, you'll control the machinery around him, to try to successfully get him to the exit. Think something along the lines of lemmings, where you control floating platforms to stop Jack falling in holes, and move doors around to get him through mazes. It will be almost a pure puzzle game - that happens to be with a guy who walks on platforms.

I've started doing some design drawings of levels etc. to figure out how viable this idea is in LibreOffice Draw. So far, I've designed 2 basic non interactive 'levels' (which will be a grand total of being a more entertaining way to write 'Nerdy Gentleman Games Presents' and on the next one 'Jack is a Fool' while introducing the basic start of gameplay). I've designed 1 basic level to demonstrate the moving mechanic.

I've finally so far designed 2 actual puzzles - I don't count the others as puzzles at all. The first involves moving lift doors and a lift to get Jack to the top of the level, and the second moving a series of platforms to get Jack to the other side without crushing him, or allowing him to fall off. Both are just design ideas, and as such don't look like what actual gameplay would. For your benefit, they're included below.
First fully designed level
Second fully designed level
I've got ideas for a couple of other mechanics I could add for puzzles, and a couple of unfleshed ideas I could use for the mechanics already introduced. I want to get to somewhere between 10 and 20 puzzles (probably closer to 10) before focussing on implementing the features they need, and seeing if gameplay is fun. If it is, I may more fully finish the game. If I can't figure out interesting puzzles, I won't bother.


Saturday, 8 October 2011

Platform Progress - Saving and loading levels

10/08/2011 05:45:00 pm Posted by Lachlan No comments
Wow... 3 posts in one day!? But - achievements get posts.

I can now save and load levels! So:
FatController bind_wing_keys K_LEFT "Actor inst 100" K_RIGHT "Actor inst 101" "Actor inst 102"
FatController bind_key_down K_SPACE "Actor inst 103"
FatController bind_key_up K_SPACE "Actor inst 104"
FatController bind_key_down K_ESCAPE "Game quit_signal"
FatController bind_key_down K_BACKQUOTE "Game toggle_console"
FatController bind_key_down K_e "Game toggle_editor"

run "level" "levels"

Game gravity_ddy = 400;
Game gravity_max_dy = 500;
Game gravity_ddx = 0;
Game gravity_max_dx = 0;



Game new_feature "f_1" 
x1 = -20
x2 = 600
y1 = 500
y2 = 550
z = 0
collision_function = 1
visible = 1

Game new_feature "f_2" "f_1"
x1 = 150
x2 = 200
y1 = 450
y2 = 500
z = 0
collision_function = 1
visible = 1

Game new_feature "f_3" "f_1"
x1 = 700
x2 = 1500
y1 = 500
y2 = 550
z = 0
collision_function = 1
visible = 1

Game new_feature "f_4" "f_1"
x1 = 900
x2 = 950
y1 = 400
y2 = 500
z = 0
collision_function = 1
visible = 1

Game new_feature "f_5" "f_1"
x1 = 500
x2 = 800
y1 = 350
y2 = 400
z = 0
collision_function = 1
visible = 1

lead to an end result of:

Note - as well, this script is the actual save file, and was saved from within the game! Boo yeah!

Platform Progress - SLOC

10/08/2011 12:54:00 pm Posted by Lachlan No comments
If its your sort of thing:

Files 70
Lines 5460
Statements 3117
% Branches 21.8
% Comments 3.1
Class Defs 32
Methods/Class 9.44
Avg Stmts/Method 6.1
Max Complexity 46
Max Depth 9+
Avg Depth 1.88
Avg Complexity 2.75
Functions 12

Platform Progress - Scripts Ahoy!

10/08/2011 12:12:00 pm Posted by Lachlan No comments

I've started the process of being able to load scripts from files and (am working towards at the moment), saving them to files. As of Thursday, it loads (most of) the keyboard configuration from a script file. This script file, actually:

FatController bind_wing_keys K_LEFT "Actor inst 100" K_RIGHT "Actor inst 101" "Actor inst 102"
FatController bind_key_down K_SPACE "Actor inst 103"
FatController bind_key_up K_SPACE "Actor inst 104"
FatController bind_key_down K_ESCAPE "Game quit_signal"
FatController bind_key_down K_BACKQUOTE "Game toggle_console"
FatController bind_key_down K_e "Game toggle_editor"

This is important for a couple of reasons. The primary one is that levels are to be saved as a script which contains instructions on building levels - I've got recipe's being generated already, now I'm ensuring that I can save them.

The first step of this project was adjusting the PuppetMaster's Process Command thing to take multiple commands by splitting it by newlines and semicolons (though, in the case of the latter, providing that they're not within double-quote marks). I decided to use the same method I have for actually processing commands -  using an overly complex RegEx command that I barely understand, as processed by boost::regex.  The RegEx function I ended up using is:

The sad thing is, I'm not entirely certain how this works except it does when I run it through "The RegEx Coach" (excellent piece of software btw). In reality though, RegEx seems to me to be a return to the archaic language of APL (see Wikipedia to see why I make this comparison). It's an ol' APL proverb that:
'Tis every programmers goal in life
Before his race is run
To write three lines of APL
And make the damned thing run!'