Author Archives: Lachlan

Upcoming stuff

Not much game dev here, too busy with other things BUT I have the following things appearing soon.

  • Article about marshalling and saving using Flixel
  • Article about multi-user collisions in speed crucial systems. Much more complex than it sounds.
  • Twine game Awaken.
  • Also trying to design something that should take me about 5 weeks to make. Longest project ever!

Yep.

EDIT: My review of Metro: Last Light is out on Player Attack.

Speed is nice

Made a game with AS3 and Flixel in about 2 hours.
It’s nothing special but it comes from an idea I got last week when a student mentioned how the Adelaide CBD layout resembles a pacman-esque structure.

Give it a while.

Since I spent all that time making Spring Of Life in Flixel and AS3, it has now become a super quick way to deploy ideas.

Pause

Due to the events of yesterday, things might be slow for a few more days. The game I had planned is now on hiatus.

A problem

I’ve noticed that every game I’ve done or am planning to-do take me no more than 11 days (if you remove the non-working days, it probably turns into about 8.)

When I speak to other game-devs they always talk about long running projects that they’re working on. Long running being greater than a month (or at least have enough work planned out.) This annoys me.

Why?

Partially, it makes me realise that my ideas either aren’t good or detailed enough to require that much work.
The bulk of it feels as if I’m doing something wrong. Maybe I’m not comfortable enough with a language/library to really try something wacky. I’m not really sure, but hell, it couldn’t hurt to (sorry to reiterate the last post here) focus on one language and just make games in that. Again, I’m not sure.

I have an idea I want to get done this weekend and then I’m FINALLY going to get stuck into C++ and SDL. Yep.

Ideas (a.k.a distractions)

I’m somewhat tempted to abandon my participation in #1GAM to focus on C++ learning. My next project was going to be in JS (which I’ve used maybe once) so I would have to set aside a bit of time learning that. I could easily remove that and learn C++ instead.

Why C++?

It’s really a personal thing. I’ve barely had a chance to learn it at uni (maybe for 2 weeks back in 2011). Heck, I’ve done MUCH more C in my life. Yep. Entirely personal. Alternatively, I continue as normal.

This was pointless.

In other news, Spring Of Life now has two new plants, Tomatoes and Pumpkins! AMAZING!…
I really want to get it done so I can detach myself from it (mentally.)

So…Spring Of Life

Spring Of Life screenshot

I never really talked about Spring Of Life properly, so here we go.

When the option theme for #1GAM April came up, someone mentioned making an unabashed Harvest Moon clone. I liked this idea but cutting it back to it’s basics: managing crops. I then designed something but it was super bland, there was very little point to it. I realised that you can view Harvest Moon as a farming simulator or a farmer simulator. I liked the idea of the farmer simulator, but a farmer whose farm existed a long way from any town. Also if you are simulating a farmer, they must have some form of life-force.

Blah blah blah. I used about 10 pages designing something that might resemble a farming simulator where you have to manage both the farm and the farmer.
After I finally had something down that I liked, I then decided to pick what language to make it in. This was both a smart and stupid idea since I made some design decisions that did not work nicely with my chosen language.
Which was ActionScript.

I’ve been looking at AS3 for a little while now mainly because it seems like a way to go from an idea to a working prototype extremely quickly. It is.
The other big decision I made was to use a 3rd party library. Everything I have made has been built from as low as possible. I thought it might be time to stop being so unbelievably stubborn and just use a library. So I did and what a wonder that was. I chose to use Flixel and the Flixel Power Tools. Made life much, much easier.

Especially as I had never coded a line of ActionScript before…

Yep, I made a game with a language I had never used (or really looked at.) Stupid but ActionScript is a super easy language especially coming from the land of Java with little bits of C#. Considering the amount of time it took between starting the game and releasing it was a bit absurd.

The first line of code committed for Spring Of Life was at 16/04/2013. This was after I had spent a day learning ActionScript and Flixel. The tag v1.0 was on the 27/4/2013. 11 days. That’s rather quick. Although v1.0 was missing some crucial things, it could be played without too many problems. The latest tag is v1.011 which includes some of these missing features, but not all.

The biggest challenge of all this was the dropbox system. In my original design I had three inventories: the farmers “bag”, the farm stock and the dropbox contents. I coded this up only to get heavily confused (even when I simulated stuff of paper.) I cut it down and went for a single inventory. This still has some issues because the single inventory contains special items that are made up of items from a “nursery” and amounts. (A traditional inventory would contain items and their amounts directly.) This was because of an earlier issue I ran into when I realised that most things in ActionScript are passed by reference.
I spent a solid 5-6 hours working on the dropbox system alone.

The economy seemed like a horrendous task at first but after 20 minutes I managed to code something that resembles a produce economy. Unfortunately, you can have negative money. I will fix that soon!

This project not only marked the first time using a 3rd party library, but also the first time I used art that wasn’t made by me. SHOCKING! The only things actually made by me in Spring Of Life are the farmer, the house, the dropbox and the action icons. Everything else are modified versions of stuff from opengameart.org.
Unfortunately, I still haven’t added any sound or music to it, but hopefully this weekend I get around to it.

The next feature I’ll be adding is the ability to save your progress (GASP!) A somewhat useful feature. I will hopefully get around to adding more content, that’ll make the game much more enjoyable! I have version notes on the Spring Of Life page which will contain stuff about updates (obviously.) I have to rejigger the page it’s on a little bit, I’ll get to that a bit later.

Welp, it’s May now so a new #1GAM has begun. The optional theme is “grow” which is hilarious considering I just made a farming simulator. I have an idea brewing, I wrote some design notes yesterday but this now heavily depends on the language I use. Hint: It’s very esoteric and will be multiplayer!

Welp.

Didn’t get the job. Back to game dev (and soon to be research.)

Things…

Ooops, haven’t updated this in 20 or so days.
So:

  • Released Spring Of Life as part of #1GAM April. More content will appear over time along with a nicer economy.
  • I have a second (& final) interview with Microsoft tomorrow. Will know by tomorrow night whether I have the job or not.
  • Not getting the job wouldn’t be disastrous. I have quite a back-up plan in place.
  • Have two Twine projects in the works at the moment (as well as continuing Fibres). One is for Uni, as such it shall be released after the marks come back for it.

Yep.
Spring Of Life was written in AS3. My first time using the language. Not bad, the styling conventions don’t seem to be definite though, so the code is a mix of egyptian bracketing and not as well as some capitalised variables and not. Oh well, I might clean it up one day.

The hardest part was sorting out the player’s ability to sell produce they have acquired. At one point I had a master inventory, a selling box inventory and a player inventory. In the end the master inventory is the only one that exists. There are also some really bad calculations that eat a bit of CPU. These are easy to fix but alas my time (until Wednesday night) is limited.

Been a while

Yep, it’s been a while since I updated. Have been focused on uni & the upcoming interview.
Also managed to start work on another Twine game. I also started designing an entry for this months #1GAM using the optional word: spring. It’s pretty close to an unabashed Harvest Moon knock-off but with some very key differences. Hopefully I can get it done in two weeks.

I was heavily inspired after reading/playing Porpentine’s howling dogs. So I started writing…
It’s called -~stream~)

Heavy sci-fi philosophical thingy. Also heavily inspired by Moon & Black Boned Angel’s “Verdun” (a fantastic example of stupidly epic drone doom).
Will post obviously one it is done.

Interview on Friday. Still scared as hell. But then holidays which means more game dev, recording some music and (maybe) playing some games.

Developments are happening here.

So, I have a job interview coming up for a very large software company. Apart from being elated, I’m scared as hell. It didn’t help that I looked this particular position up and the interview in question is surrounded with horror stories. But the main takeaway from them all is: PRACTICE. As such, that is what I am doing.
I’m digging through all the sorting & searching algorithms, boning up on a certain language and relearning everything there is to know about many data structures.

As I am a (somewhat) altruistic person, I though I would post some solutions to some problems.

In this post, we have permutations! The kind of permutation that allows doubles (if they exist in the original string.)

static void Main()
        {
            String oldStr = "I AM A STRING";                      
            String newStr = "";
            int position = 0;
            int length  = oldStr.Length;
            newStr = oldStr;
            List<String> outStrs = new List<String>();
            do
            {
                outStrs.Add(newStr);
                //Move pivot right until position = length-1;
                newStr = moveRight(newStr, position);
                if (position < length - 2)
                    position++;
                else
                    position = 0;

            } while (newStr != oldStr);

            //Print ordered permutations. First line should be equal to
            //(String length)!
            Console.WriteLine(outStrs.Count);
            for (int i = 0; i < outStrs.Count; i++)
            {
                Console.WriteLine(outStrs[i]);
            }
            //Halt Console
            Console.Read();
        }

        //Simple swapper that moves char at position in string to the right.
        public static String moveRight(String str, int position)
        {
	        //Moves char at position position right one unless it cannot be done
            char[] newStr = str.ToCharArray();
	        char temp = newStr[position+1];
	        newStr[position+1] = newStr[position];
	        newStr[position] = temp;

            return new String(newStr);
        }

Simple enough. (This is in C#.)
It will perform (String.Length)! iterations.

This is what I came up with quickly. There is an equivalent recursive procedure, but I’ll leave that to another day.

Up next time, the joys all things related to linked lists. Single, double, circular. Fun!