Release the Monster Walkthrough

In release the monster you are tasked with finding out which of the minions ruined Dr Destructo's plan.  In a shocking twist, all of them did.
 

General tips:

  • There are two main puzzles in the game that you need to complete to get every minion.  You need to figure out which minion sleeps in which bed, and which minion has which job.  
  • Read all the minion's minds.  You get clues for the puzzles that way.  It records the clues automatically so you don't have to write them down yourself.
  • Talk to every minion and take each option.  
  • If you really don't want to do the puzzles, there is an option to skip them in game.  
  • If you kill a minion but you still need to talk to him, you can use the summon circle to bring back his spirit to talk.

Luxe asset loading and graphics

Note: This applies to Luxe 1.0.0-alpha.2.  This might not be true forever.  

Luxe does some neat things with managing assets and creating animations, but like everything else, it has its own set of quirks that are important to be aware of.  Now that I've got it working I think it will be easy to set up in the future (if I can remember how to properly format the JSON files.  More on that later) but I'm writing this in hopes that it will save someone else an hour or two of frustration and so when I forget later on I can come back later and remind myself...

Playing with Luxe States

One of the things that I'm most excited about Luxe are the way that I think it handles States and Scenes.  As I understand it, States will easily allow me to create Finite State Machines for whatever needs them.  So I can drop a States object in my main class to control the game states (menu, pause, play, whatever) or into a Sprite object like a Guard to control its actions (move, attack, search, etc).  

I got some Luxe State Machines working today which I think is going to be the main way that I'm going to structure my games going forward.  I extended the luxe.State object and made a new object called MyState.

My new State Object

 The code is very simple:

  class MyState extends State

{
	var message:String;
	public function new(name:String, message:String) 
	{
		super( {
			name:name
		});
		this.message = message;
	}

	override public function update(dt:Float)
	{
		trace(message);
		return super.update(dt);
	}
}

Basically it takes two parameters.  The first is the name.  This name is important because Luxe stores the states in a Map<String, State> object so I'll be using the name to retreieve them.  The second is a message that I want to trace when the state is running.  This is just for a test to make sure I can tell what is actually working.

Adding the States to the Main.hx

Next I created a States object in my Main.hx ready() function so it is created as the Luxe game is created.  I named it fsm for Finite State Machine, because that's what it is:

fsm = new States();
fsm.add(new MyState("play", "Main: Play"));
fsm.add(new MyState("menu", "Main: Menu"));

Then I set one of the states to run.  In this case, I'm setting the Play state to run.

fsm.set("play");

Then I need a way to swap between states, so I'm going to map keyboard keys specific actions using Luxe.input.  Luxe natively handles this the way that InputHelper (the helper Object that I created for HaxeFlixel)  does. Luxe has the added bonus of allowing mouse clicks and controller buttons to be mapped also (which is something that I never got to), so that is nice.  I'll have to rewrite my screens that let me assign the keys at runtime.

        Luxe.input.bind_key('select', Key.space);
        Luxe.input.bind_key('left', Key.key_a);
        Luxe.input.bind_key('right', Key.key_d);
        Luxe.input.bind_key('jump', Key.key_w);
        Luxe.input.bind_key('stop', Key.key_s);

Now I set Luxe to swap states when I press the 'select' input (that I mapped to the spacebar) in the update loop.

if(Luxe.input.inputpressed('select')) {
	if (fsm.active_states[0].name == "play")
	fsm.set("menu");
	else
	fsm.set("play");
}

Now when I run the app and hit the ~ key to go into debug mode I see Main: Play repeated over and over again.  When I press space, it swaps to Main: Menu.  Success!

Adding States to a Player Object

Next I wanted to test a Finite State Machine on a Player object.  So I created a Player Object by extending a luxe.Sprite object and gave it a public var fsm:States object.  So far nothing exciting.  Then I added some states to it:

mainSprite = new Player( { name:"player" } );
mainSprite.fsm.add(new MyState("run", "Player: Run"));
mainSprite.fsm.add(new MyState("walk", "Player: walk"));
mainSprite.fsm.add(new MyState("jump", "Player: jump"));

I've got three different states assigned to the mainSprite fsm (which actually won't be a finite state machine when I'm done because it will run multiple states simultaneously, so the name is slightly inaccurate but I don't care).  Now I want to allow some inputs to change them around in my update loop.  

if (Luxe.input.inputpressed("left")) {
	mainSprite.fsm.set("walk");
} 
if (Luxe.input.inputpressed("right")) {
	mainSprite.fsm.set("run");
} 

Now when I run my program and press left I see:

Main: Play
Player: Walk
Main: Play
Player: Walk
Main: Play
Player: Walk

My main state machine is still running, but now my mainState state machine is firing off too.  Pressing right gives me:

Main: Play
Player: Run
Main: Play
Player: Run
Main: Play
Player: Run

Now I want to add the jump state to the player that I already defined above, but I want it to run alongside the existing states that mainSprite fsm is running.  

if (Luxe.input.inputpressed("jump")) 
mainSprite.fsm.enable("jump");
if (Luxe.input.inputpressed("stop")) 
mainSprite.fsm.disable("jump");

Now when I press the up key my mainSprite fsm runs both the jump state and whatever other state it happens to be running already.  

Wrapping it up

I'm excited about this.  I like the flexibility that this state system gives me and that it works across objects.  I'm also excited that if I have a GameEntity object or something I can write generic states like a searchState that I can apply to any game object.  

I'm happy with the way that Luxe is working for this.  It is doing exactly what I was hoping it would.  Next up I think I'm going to play around with Scenes.  I think they are going to be essentially like States but applied to graphical objects.  I'm hoping that I can tie States and Scenes together somehow so when I change game states the grahpics will also change. 

Learning Luxe

I've decided to dabble in a new Framework called Luxe.  Haxeflixel is great and I like using it, but my goal is to get away from Flash and do more of what WebGL offers me.  I find myself wanting to get away from the default ways that HaxeFlixel wnts me to do things.  I can work around them, but I like the flexibility that Luxe offers me.

Or promises to offer me.

See, the problem is that Luxe is Alpha.  Like, very Alpha at the moment.  So there is a really steep learning curve and virtually no documentation.  The community is small and friendly, but this will be quite a challenge.

I'm currently running Luxe 1.0.0 - alpha 1 although I think Alpha 2 was just released, so I should probably go grab that.

The setup was actually pretty easy.  The instructions are fine and worked without any problems.  I'm going to document my progress here, mostly so I can come back and look at it later when I don't remember something...

Quiet around these parts...

Things are still progressing on Death Run.  Actually, there have been a lot of changes so far, but each time I get it somewhere I'm happy with I end up wanting to do something else so I start over.  I've actually just finished up Death Run V9, which has some fun features like the ability to load levels from an image and some other new features.  It is a big update but typing up the post about it takes a long time.  I'm hoping to have it typed up before the Christmas break but we will see.

 

On another note, Ludum Dare 31 is coming up!  I'll be participating this time.  Here's hoping that I can reign myself in and submit something finished this time!