Versus in a coop game

With Brook released and loved by the community, I believe it’s time to try something new. I made a VMF viewer which everyone seemed to like, but there were also things I made that the exact opposite happened with.

Arcade

For example, I released Arcade as proof that Alien Swarm didn’t have to stay in the same genre of shooting the bad guys. Arcade took Alien Swarm and turned it into a shoot-em-up arcade game with a twist – the punishment for losing is death. Apparently, people don’t take time to look at the pretty scenery. They just want to win and be done with it.

Sarge's Party

8e8 had an idea for a game mode called Sarge’s Party. In this mode, instead of working as a team to kill aliens, the players split up into two teams and race each other to complete a series of obstacles. I took this idea and tweaked it. Instead of a portal for everyone to jump into, I made three side-by-side rooms. The middle room is neutral – everyone starts here. The left and right rooms are the red and blue team start points.

Sarge's Party

Once a room is full – 1 person if there are two people playing, 2 people if 3 or 4 people are playing – the door closes and locks. I’ve tested this with friends from the Swarm Armory IRC and it works well enough to avoid all race conditions caused by two people running into a room that can only hold one more person.

Sarge's Party

When both rooms are full, the barrier preventing access to weapons breaks and the three doors leading to the lanes open. Players can move between any of the rooms in their lane, provided that they complete the challenge in the previous rooms. The outer lanes are identical other than light color.

The center lane is only accessible if there are an odd number of people playing. It allows the “odd man out” to spring traps on either team, but only on one team per set of rooms. The middle lane has no access to weapons and does not spawn enemies.

Sarge's Party

The team that finishes an obstacle second gets an additional challenge in the next room. For example, the first room adds a shieldbug to the second room, the second room sets the third room on fire, and so forth. I’ve built three rooms so far – clearing biomass, killing a series of drones, and destroying a set of rocks with a mining laser – and am working on a fourth – a tattered bridge. If you have any ideas for rooms, I’d be glad to hear them!

Posted in Technology | Tagged , , | Leave a comment

A peaceful Alien Swarm map? Are you crazy?

How many people play Alien Swarm for a few minutes and then quit because it’s too fast-paced for them? There’s probably a high number of people that tried the “insane” difficulty setting on their first game that fit that description. I’ve played Alien Swarm as well, but from a different perspective. I’m not usually the one inside the imaginary world killing alien bugs. Instead, I’m the person who creates that imaginary world so you can play in it. In fact, I’ve spent over 100 hours in its development tools in the 2 weeks I’ve had it.

And now, back to the purpose of this post. Violence isn’t the only thing possible on a game like Alien Swarm. Sure, most of the game’s items are weapons, and most of the weapons hurt whatever you shoot them at, but the game’s backend, the Source engine, allows for much more than that.

Take this picture as an example. It’s the start of a map I made, codename “Brook”. If you’ve played Alien Swarm, you know that this picture looks bland in comparison to most of the good maps out there. This is where the Source engine really shines. I can add a cheap effect called color_correction to the map using a file I created specifically for this map using the game’s tools, and this is what I get:

If you can’t see the difference, try zooming in on each of the images. They have exactly the same camera angle, lighting, terrain, and props. The only thing that has changed is the addition of a color_correction entity.

See that stream over there? Let’s go into it. I can’t show the awesomeness of the stream on this blog because the water is animated and I’m too lazy to make an animation right now, but I can tell you that it looks very real.

You may still think Bastille (that’s the name of the marine in the picture) is just squatting in a shadow. Let’s try another angle. This is something that wouldn’t normally happen in the game, but through the magic of camera movement, this is a closeup.

If you ignore the lack of anything resembling a sky – I’ll add that later – this looks like a nice little stream, doesn’t it?

If you thought of complaining that this map only has a stream and some grass, look here:

Hills! And look on the other side of the stream:

A cliff!

And now, it’s back to work for me. See ‘ya!

Posted in Technology | Tagged | 2 Comments

FrontPress: Users, Meta, and an Installer

It’s now simple to add users, an installer, and meta to your FrontPress-powered application. Plus, FrontPress won’t query as aggressively, so you’ll save on database queries per page.

As an added bonus, FrontPress takes care of all of your database upgrades. Simply change the database version number whenever you change the schema, and FrontPress will automatically do upgrades for you.

Meta can be enabled with one line of code in any FP_Thing subclass:

static $__has_meta = true;

FP_User combines the simplicity of FP_Thing and the extensibility of BP_User. Want to know if the current user is logged in or if they have a certain capability or if they like bananas?

FP_User::logged_in();
FP_User::can( 'do-whatever' );
FP_User::get_meta( 'likes_bananas' );

What are you waiting for? Get developing!

Posted in Technology | Tagged | Comments Off

First Ever FrontPress Site

FrontPress Site - Home

Home

I’ve been asked whether FrontPress was being designed for frontends, for example, if it was a template system. The answer is a definite yes: Your template code creates a frontend, but FrontPress turns your code itself into a frontend as well. The code I showed in my last post could be fully understood at a glance. My_Fruit::by_color retrieves fruit based on its color. $apple->save(); stores data about an apple in the database.

FrontPress Site - Yellow

Yellow

My incredible amount of appreciation for my own system aside, it is possible to make an entire website from FrontPress. The site is pointless, but it shows the power of FrontPress and a few lines of code. The site is live on my home website, and you can download the source code if you want to see how exactly it works.

FrontPress Site - Yellow Apples

Yellow Apples

Breadcrumbs are my favorite part of this demo. The breadcrumb for the yellow apple page is generated completely by FrontPress. The only code inside the route – routes are how FrontPress’s template system chooses which page to display – related to the breadcrumb is frontpress_breadcrumb( $fruit );. My_Fruit implements two interfaces by way of three one line functions. My_Color implements a single interface by way of two one line functions.

FrontPress is still far from its first official release. I plan to add an easy way to build an installer, some example templates, and maybe more before then.

Posted in Technology | Tagged | Comments Off

FrontPress

<?php

require_once dirname( __FILE__ ) . '/load.php';

// Non-programmers start reading here
$green_apple = My::$fruit->one_by_color_and_type( 'green', 'apple' );

echo '<h1>', $green_apple->color->name, ' apples are called "',
     $green_apple->name, '".</h1>';

If you don’t know how to program, try reading this code. You can read it, right? That’s because the code is written using my newest project, FrontPress. Now, if you do know how to program, you may be wondering how My::$fruit is defined. Here’s the entire definition of My::$fruit:

<?php

class My_Fruit extends FP_Thing {
    var $__table = 'fruit';

    var $id;
    var $name;
    var $color;
    var $type;
}
My::$fruit = new My_Fruit;

Now, you’re probably interested. The class has no functions and only one variable with a value. This is why FrontPress is so awesome. If you want to delete all the yellow fruit from your database, that’s one line of code:

My::$fruit->by_color( 'yellow' )->delete();

Or, maybe you just want to reclassify all yellow fruit as lemons:

My::$fruit->by_color( 'yellow' )->set( 'type', 'lemon' )->save();

You can also do so in three commands:

$yellow_fruit = My::$fruit->by_color( 'yellow' );
$yellow_fruit->type = 'lemon';
$yellow_fruit->save();

What if there’s some new color of apple you’ve never heard of?

$c0ffee = new My_Color( array( 'name' => 'C0FFEE', 'slug' => 'c0ffee',
                               'hex' => 'c0ffee' ) );
$c0ffee_apple = new My_Fruit( array( 'name' => 'C0FFEE Apple',
                                     'color' => $c0ffee,
                                     'type' => 'apple' ) );
$c0ffee_apple->save();

And it’s smart, too:

$lemon = My::$fruit->by_type( 'lemon' );
$lemon->save();
$lemon->save();
$lemon->save();
$lemon->save();
$lemon->save();
$lemon->save();
$lemon->save();
$lemon->save();
$lemon->save();
$lemon->save();
$lemon->save();
$lemon->save();
$lemon->save();
$lemon->save();

This code won’t even attempt to save it once because no changes are made to the object.

Want to try it? Break it? Change it? Go right ahead. This is GPL software, after all! :)

Posted in Technology | Tagged | 1 Comment