Subscribe to:

The Kiwi's TaleWitchBlasterDerelict Blow Stuff Up

Syndicate content

Minor update

Been nearly two months since my last blog post. Where does the time go?

There's only been a couple of minor things I have to show in that time. One is a new raycaster engine, which I'm hoping to eventually use for an HTML5 reboot of Derelict. The primary difference between this one and the last one is it's based on 90 degree angles, tiled floors and features smooth transition into darkness. The current build is here. I'm thinking of changing it to be WebGL based, mainly for performance reasons, also to see if I can get some decent shaders working.

The other is I've had a quick play with Spriter, which is an animation tool that was featured on Kickstarter. I took one of Anthony Lau's mecha drawings and attempted some basic animations with it. I'm clearly not an animator but I could definitely see the massive potential it has for bringing drawings to life.

 

Also, apologies about the crude gestures! I was having way too much fun.

Tags:

Enhanced Joystick support for Monkey: Now supporting HTML5 on Chrome and XNA

Posted a new update to the Monkey Demo collection, now as well as GLFW on Windows the Enhanced Joystick library supports XNA and HTML5 on Chrome (although only with XBox 360 controllers).

(If you've got both Chrome and an XBox controller connected, you can test it here)

Tags:

Global Game Jam 2013 game: Eat Your Heart Out

The Auckland Global Game Jam is over for another year. It's late and I'm sleep deprived so this blog post might be a bit rambly, but I wanted to get it out of the way with before I go to bed.

Proudly presenting my 5th Global Game Jam game: Eat Your Heart Out

Play it on my Dropbox, preferably with as many players as you can find.

It's a multiplayer JavaScript game with Gamepad API support (ie, you can use the XBox 360 controllers for Windows if you're using Chrome. We playtested with four XBox controls to great effect). The theme is Dark Fantasy, and the gameplay involves three players trying to find the fourth before he/she turns into a monster and goes on a rampage.

The gameplay is a little hard to describe since it's asymmetric multiplayer that takes place across several phases, but here goes:

  • The player that is the "Heart Bearer" (chosen at random at the start of the game, but the winner of the previous rounds later in the game) chooses their starting location on the screen. The first button press sets the location under the cursor, the second starts the game (this is necessary to disguse the starting location from the other players).
  • The other three players (the "Seekers") try to capture the Heart Bearer. The one that does becomes the Heart Bearer in the next round. While the Heart Bearer is disguised as an NPC, a number of cues give hints to their location. For instance, the Seekers flash rapidly as they approach the Heart Bearer, and the Heart Bearer itself will flash once a Seeker has almost reached it.
  • If, after a certain amount of time the Heart Bearer has managed to evade capture, the Heart Bearer becomes an enormous monster and can kill the Seekers (killing NPCs gives the Heart Bearer more time to do so). If it manages to kill all of the Seekers, it wins the round and becomes the Heart Bearer again for the following round.
  • However, if the Heart Bearer takes too long to finish the Seekers, it'll die leaving behind it's heart. The seeker that captures it's heart becomes the Heart Bearer for the next round.

The idea was the brainchild of lead designer Barnibus Soon, imagined as kind of a multiplayer variant of Pacman (specifically, the part where Pacman eats the Power Pill to reverse the gameplay). Coding duties were split between myself and Michael Schaeffers (former colleage that I also worked with on Noah More Heroes). We wrote the game in Monkey, specifically for the HTML5 target.

Unfortunately we had to take a lot of shortcuts with the project, there wasn't a single artist or sound engineer on the team (forcing us to look for Creative Commons licenced work to use), and the AI is lackluster, I didn't have as much time to spend on it due to several appointments on Saturday, but otherwise I'm really happy with what we came up with - definitely head and shoulders above my attempt at a game last year!

Gameplay with four players was a riot, there's definitely a lot of replayability to it, even after hours of testing and tweaking we were still having fun honing our skills. The balance between the Heart Bearer and the Seeker Team is reasonably good too, it doesnt' feel as though there's a large advantage to either side which is difficult to achieve when the gameplay style is different. If there are less than four players an AI substitutes, it's still reasonably fun 2-3 players but 1 player is rather easy and only really useful as training for the multiplayer game.

I definitely recommend you check out the games made by the other teams. I think this year's crop was easily amongst the finest to come out of the Auckland Global Game Jam. These are four in particular that took my fancy.

Awkward Adventure RPG

A JRPG type game with a curious and original twist - instead of fighting monsters and trying to rescue the girl, you're a socially inept nerd that tries to shirk out of awkward conversations (generally by trying to weird out the other person). While there's no violence per se, conversations that turn out badly will raise your heart rate to the point where you could suffer a heart attack.

McHearty

A short remake of McPixel (one of my favourites from last year) except that it's a multiplayer game - three players use Keyboard, Mouse and XBox Gamepad - and they have to co-ordinate their actions to prevent disaster. I thought it was a brilliant concept that could definitely work as a full length game.

Heart Beat Box 5: Heart of the City

A stylish and fantastically well drawn game about a rap battle in "Nega Toyko" in the future(?) year of "20FF". To advance through the rap battle you have to sing the last words of each rhyme. The "game" itself is short and I found the voice recognition awkward (apparently an English accent is required for optimum recognition), but worth checking out for the aesthetic alone.

Pulse Vision

A Puzzle/Stealth game that features an interesting look, feel and mechanic. Your "character" emits a heart beat pulse that lights up the surrounding area. The slower your heart rate the more you can see, but you'll often need to run to escape dangerous situations, which will increase your heart rate. The game is nicely polished and it's already available on Kongregate.

And, that's it! have fun.

(P.S. If you didn't catch it, the theme this year was the Heart Beat. Specifically, the sound a Heart Beat makes.)

(P.P.S Should I do one game a month and count this as my first game?)

Zwai's Space FPS game

Zwai (one of the commentors on my blog) has begun work on an ambitious online Space FPS game with RTS elements. The game starts on a Moonbase colony after the devastation of Earth, but continues into a near infinitely large, procedurally generated universe as you build up an empire of fleets and bases.

It's still in the very early stages, but he's produced some impressive models for it so far:

http://s1.directupload.net/file/d/3137/3u6g784m_jpg.htm

http://s7.directupload.net/file/d/3138/zeu8ckts_jpg.htm

He will be using this thread to discuss the project and post updates, if you're interested in joining the project please leave a comment below.

(Also, this is a standing offer - if you've got a project you want to discuss via my blog, please let me know and I'll set up a new thread for you)

Advanced Raycaster, version 2

Announcing the official release of the new version of my Raycaster! Try it here.

The primary change is now it runs up to 4X faster on top detail, though I've also made it so that the background isn't quite as dark and also there's nine individual detail levels.

I optimised it as far as I possibly could (though I'm sure there's still places here and there where it could get dramatic speed boosts). The main things I did was:

  1. Use Chrome's Javascript profiler to identify functions that were taking up too much CPU time.
  2. Reduce the amount of redundant copying of variables. For instance, Monkey's "WritePixel" function takes the pixel data in an array and copies it to a JavaScript ImageData object (after bitshifting it), I simply bypassed it and wrote to the ImageData object directly (without bitshifting).
  3. Used bitwise operations where possible - Shift-Left for multiplying, Shift-Right for dividing and AND instead of modulus. If you're operating on integers by power-of-2 values it's slightly faster doing it that way.
  4. There were several trigonometry operations where the output was based on an input that was an integer. So instead of calculating that operation again and again, I saw a speed boost when I cached the result inside an array.
  5. Used hard-coded values where possible. If that wasn't possible, then I'd use a variable. And if that wasn't possible, I'd use an array. And finally, if that wasn't possible, then I'd use an object.
  6. Inlining your code as opposed to using functions gives a slight speed boost.
  7. Using Javascript's built in math functions as opposed to Monkey's gave a slight boost. All I had to do in Monkey was:

    #if TARGET="html5"

    Function Abs(value:int) = "Math.abs"
    Function Min(value:float, value2:float) = "Math.min"
    Function Max(value:float, value2:float) = "Math.max"
    #endif

Source is available on the Monkey Demos page.

Windows version of BattleSuit

Just a quick note to say that I am releasing the Windows build of the Battlesuit Alpha version. It's not really any different to the HTML5 version and I have no intention to develop it any further (except for mabye recycling the concepts into an action game), but this build is very malleable - all of the story, stats and levels are editable as plain text files, and the images can be replaced easily.

So if you happened to be planning to make a visual novel and/or tactics game, this might be an OK place to start experimenting!

Download is here.

Tags:

Getter and Setter Properties in Monkey

Monkey has a lot of curious functionality that I'm still discovering.

For instance, recently I discovered that you can do properties by treating Methods as Fields, and even have multiple setters to handle different types of value. For example, this Monkey code:

 

 

Function Main()

 

     'Note that myClass is implicitly typed, similar to C# var keyword.

     Local myClass:= New MyClass

     myClass.MyString = "HELLO WORLD!"

     Print myClass.MyString

     myClass.MyString =["Ignore this", "Print this", "But ignore this too"]

     Print myClass.MyString

     

End

 

Class MyClass

     

     Public

     

     'Getter, returns the value with numbers on the end

     Method MyString:String()

          Return _myString + " 12345"

     End

     

     'First Setter, converts the value to lower case

     Method MyString:Void(value:String)

          _myString = value.ToLower()

     End

     

     'Second Setter, grabs the second element from a string array

     Method MyString:Void(value:String[])

          _myString = value[1]

     End     

     

     Private

     

     'Private field

     Field _myString:String

 

End

Will print:

hello world! 12345

Print this 12345

Tags:

Easy landscape printing in Silverlight

I know this isn't normally what I post about here, but I thought someone on the web might find it useful.

I struggled in vain to find a simple solution to printing landscape view in Silverlight, but I managed to come up with one that only takes a few lines of code:

 

 

            var printDocument = new PrintDocument();

            printDocument.PrintPage += (s, r) =>

                                           {

                                               r.PageVisual = this.LayoutRoot;

                                               var transformGroup = new TransformGroup();

                                               transformGroup.Children.Add(new RotateTransform(){Angle = 90});

                                               transformGroup.Children.Add(new TranslateTransform() {X = r.PrintableArea.Width});

                                               LayoutRoot.RenderTransform = transformGroup;

                                           };

This simple Lamda method, which assumes that you want to print the layout root of the page (Although there shouldn't be a reason why it can't print any element on the page), applies two transforms. The first is simply to rotate the whole layout root 90 degrees. The reason why this alone isn't enough, is that by default the layout root will rotate on it's top left corner, so when you rotate it 90 degrees the body of the page moves left (Imagine rotating a page on a cork board with a pin through the top left corner). The second transform is to correct this by moving the page by the width of the printable area to the right.

After you have finished printing, you will want to move everything back so that it still renders to screen correctly.

 

            printDocument.EndPrint += (s, r) =>

                                          {

                                              var transformGroup = new TransformGroup();

                                              transformGroup.Children.Add(new RotateTransform() { Angle = 0 });

                                              transformGroup.Children.Add(new TranslateTransform() { X = 0});

                                              LayoutRoot.RenderTransform = transformGroup;

                                          };

Hope this helps

 

EDIT: Martin Lottering has offered the suggestion below for resolving an issue where the sides of the page may be cut off:

If you battle to get the landscape printing working properly because it cuts off:

Use a `canvas` container control, and **rotate** the control **inside of the canvas**.

After many hours of pure frustration, I finally decided to put the thing inside of a canvas. Voila!! No more cut off.

Have a look at the following SMALL test application to demonstrate. It is just a page with print button.

 

    using System.Windows;

    using System.Windows.Controls;

    using System.Windows.Media;

    using System.Windows.Printing;

    using System.Windows.Shapes;

 

    namespace SilverlightApplication1 {

 

        public partial class MainPage : UserControl {

 

            public MainPage() {

                InitializeComponent();

            }

 

            private void Button_Click_1(object sender, RoutedEventArgs e) {

                PrintDocument PD = new PrintDocument();

                PD.PrintPage += PD_PrintPage;

                PD.Print("Print Test");

            }

 

            void PD_PrintPage(object sender, PrintPageEventArgs e) {  

                Canvas OuterCanvas = new Canvas();

                /* a container for everything that will print */

                Border OuterBorder = new Border() {

                    BorderThickness = new Thickness(3),

                    BorderBrush = new SolidColorBrush(Colors.Red),

                    Margin = new Thickness(10)

                };   

 

                double Width = e.PrintableArea.Width - OuterBorder.Margin.Left - OuterBorder.Margin.Right;

                double Height = e.PrintableArea.Height - OuterBorder.Margin.Top - OuterBorder.Margin.Bottom;

                /* NOTE: We're trying to force landscape, so swop the width and height */

                OuterBorder.Width = Height;

                OuterBorder.Height = Width;

                /* on portrait, this line goes down (leave the printer settings, we're trying to force landscape) */

                Line Line = new Line() {

                    X1 = OuterBorder.Width / 2,

                    Y1 = 0,

                    X2 = OuterBorder.Width / 2,

                    Y2 = OuterBorder.Height,

                    Stroke = new SolidColorBrush(Colors.Blue),

                    StrokeThickness = 3

                };

                OuterBorder.Child = Line;

                OuterCanvas.Children.Add(OuterBorder);

 

                /* rotate 90 degrees, and move into place */

                var transformGroup = new TransformGroup();

                transformGroup.Children.Add(new RotateTransform() { Angle = 90 });

                transformGroup.Children.Add(new TranslateTransform() { X = e.PrintableArea.Width });

                OuterBorder.RenderTransform = transformGroup;

                e.PageVisual = OuterCanvas;

                e.HasMorePages = false;

            }

        }

    }

If you don't put the border inside of a canvas, it causes the page to appear cut off as if still printing portrait.


Japanese anti-piracy PSA

No more!

Wanted: Collaborators for a game project. ANY game project!

It's been a while since I've worked on a personal game project, and it's something I want to get back into, but I'd like to do so with collaborators with some sort of common vision.

I'm looking for anyone who has the time to contribute anything at this point; audio, art, level design, even coding providing we can come to a mutual agreement on the language and framework to use. (Monkey's my favoured framework for 2D development, Unity for 3D, but I'm fairly flexible and I can pick up other languages reasonably quickly).

At this point I'm not particularly picky about projects, but I'll list a few projects I've been dwelling on:

  1. Another FPS, preferrably something with an early 90s pseudo 3D look. Maybe a remake of Derelict, or something adventure/RPG-ish.
  2. Dusting off "Multiplex", which was to be a game inspired by the C64 classic Lazy Jones. Basically you'd have a series of terrible multiplayer minigames (fake movie tie-ins with titles like Inception 2: Inception and Superman 64 Returns) tied together with a hub system that itself is a mini game.
  3. The WitchBlaster sequel, "WitchBlasters", which was intended to be a metroidvania type game that combined platforming and shoot-em-up scenes. I've been thinking recently about doing it in an isometric style, so it'd be like a weird combination of Head over Heels, Zaxxon and Desert Strike.

If you're keen to collaborate on something, please leave a comment and we'll start planning.