Gaming Your Way

May contain nuts.

The bad gains respect through imitation, the good loses it especially in art.

Friedrich Nietzsche.

I doubt good ol' Fritz had "kings" in mind when writing this, but such is life (though, respect for "kings" seem to fall apart lately...) .


Changing from MonoBehaviour to PanelSettings as base class ...

I've started a first refactoring pass today, one of many, as always. I like doing that every time I have a set of working functionalities that I can group together to make things easier to use / handle.

The code above is a part of the class that handles the tooltips in my current prototype game. The PanelSettings class is basically a wrapper for NGUI panels, adding a name and two methods: Show and Hide (which allow for no-brain fade in / fade out).

Together with the PanelManager singleton it makes things incredibly easy. Instead of creating connections via the Unity editor (read: linking panels to objects who might control them), Panels register themselves in the PanelManager to allow for easy access.

To fade in a panel it's simply:

PaneleManager.Show("mypanel");

// or, if you need a callback:
PanelManager.Show("mypanel", CallbackMethod);

As the tooltips need to be faded in out it was a good idea to use what the PanelSettings class has to offer and remove duplicated code from the ActionTooltip class.

... and with this I continue my refactoring saga and have some candy along the way.

-- Oliver / nGFX

I AM NOT YOUR F1 BUTTON!

Code won the game.

This only makes sense if you've read last week's post about FSMs. At some time during clicking and dragging states and trying to fit my idea into the corset of the FSM, I figured I need to write my own actions to make things worthwhile. So I started to write my own action. The problem is once you start writing your own, you need to find a point to stop and expose values to the FSM (that can then fetch these and pass to the next action ...).

With this working quite well, I came to the point where I needed to pass more than a single string or float, but my own class with data (or I had to pass a set of values) and suddenly the beauty of this new toy (the FSM and it's supposed easiness) started to fall apart. Years of coding took over the show, brain cells kicked into crunch mode and in an act of fury I deleted the FSMs from the game. A good deal of hours fiddling and working against instinct paid it's price and code once again won the game.

A few hours later the door control was coded and working, multi language ready, too:

 


Tooltips and control hints up and running and talking to each other via SendMessage, so no links in code are needed.

The interface for using the tooltips is unified and based on "Items" that carry a name, a set of actions and "results" (inspired by classic adventure games). So the Control panel right of the door has the "Item" component attached, it is also linked to the door (to request the door's state). In the image above the door's state is "locked" and the action for the control panel is "unlock door". The result is a new door state: "closed" and a changed action on the control panel "open door", plus the control hint is being updated.


I need more time...

Of course opening a door using a code (or hacking it if you don't have the code yet) takes time, this is also handled by the item, allowing to set a time these action needs to be performed - from 1 sec to a few minutes (it also handles if the time should reset if you leave before the task is performed).

Searching items is done as well, so if you search one of the blue boxes you find the key code for the door and can use it.

Next on the list are guards and the security cameras with these in place the map will be more or less playable and can be dressed for a quick game.

But that's for next week's post.

-- Oliver / nGFX

Strangely addictive

I've been toying with playmaker (a visual state machine) for while now and I'm still not quite sure what to think of it. On one hand it can make things incredibly easy, on the other hand it can be a huge pain in the ass to get things done.

Let's take one of the easier examples: a simple door.


Ingame door, developer art :).

All the basic FSM tutorials consist of the same basic parts: a door, a trigger and a set of animations to open/close the door. Of course you could also code the opening/closing animation... I deal with that later. Let's take a look at the FSM for this door (not as basic, though).


Even in this image there's trouble ahead.

The tutorials get along with four states: closed, opening, open, closing. When the state is closed the FSM listens to the trigger and when it is fired it goes to "opening". The "opening" state simply plays the animation and continues to the "open" state. The open state then listens for the trigger and if fired goes to" closing". Viola.

The problem is that in my case I have some more conditions to check and I want to paste some initial values as well. A door can be open, closed or locked. Additionally, if the door is open, it should test if the should stay open, and if the door is looked which key is required.

The FSM above could be done in a way better organized way, but this is the very first working draft...

...and to be honest, will be replaced by code.

I find a strange attraction in the thought to be able to do things visually and it's always worth a try, but at some point one has to admit that it would be easier to just code it the darn thing. The FSM works great, but it took me a good while to get my head into it - and there we have the result of years of coding: I have an idea how to code this right from "I need a door" and for me it is a lot of work to leave this path and break things down into parts I can built as FSM. This time the FSM lost, it may win next time.

Now with "Realistic-looking flames and colors" ...

... now that's the thing you want to read on an artificial fire log.

Prototyping stage.

I've been hammering out tiles over the last couple of days to be used in the prototype of my pet-project game I'v started. This time I'll try something different and do a very basic prototype first (before jumping right in and doing full fledged 3D models before even knowing if the idea is valid)

Though, I must admit that I couldn't resist and make the tiles just a wee bit more pleasing to the eye than plain grey-boxed ones...


Busy building the dummy map ...

As dummy maps go, this is a fairly bigger one than what I would normally do for level 1, but it's also a testbed for all the things to come. Mainly guards, cameras, locked doors and drawers to search through.

Unlike the usual pointless bullshit I write every week I have something helpful in mind for the next post ... something about culling and exporting stuff ...

-- Oliver

Happy Birthday us

7 years ago today Olli and I started this whole GamingYourWay thing, and the internet got that little bit worse.

This has now been my longest relationship, which fills me with equal parts pride and despair.

Anyway here's to another year of stumbling about blindly and swearing when there's no real need.

Squize.

Prototyping the pet project ...

Oh well.

The new year started with a blast and the note that it is over already if I look at my table of deadlines and projects that need doing this year. Most of these are (of course) not game related, but that's where the money comes from.

Anyway, after the sudden and unexpected death of MTR (thank you client legal department, go fuck yourself) it's time to wonder off and play with some ideas and see if they can evolve into a game.


I'll start with a map.

Over the next couple of weeks(/days) this 2d map will be converted into a "tile based" 3d map, although a very grey boxed one (fighting my usual urge to make even these pretty from the beginning). I'll have to see what will follow next ...

And now: I need to continue coding for the e-learning web environment Dry Goods is developing ...

-- Oliver

2013 in words and pictures

Let's stroke our ego, because that's all that this is.

January:

The start of the year meant forgetting about having been off in America the previous November / December and getting back down to O2. This month saw the start of level 4, the water works / sewer level, which just took forever to do ( To put it in perspective, I think we did the last 3 levels in the same amount of time as level 4 took ).

We also celebrated our 6th birthday, and were pleased that both DN8:Pulse and Outpost:Haven got nominated for in the best shooter category in the annual JIG best of comp. Obviously less pleased that with two games in there we still didn't win Jack, but we never really expect to.
I also posted a fairly large post about why Multiplayer is a pain in the nads. Don't believe me ? It's here.

February:

I wrote some stuff about the new node based pathfinding I'd added to O2. I re-wrote it slightly and posted it on Gamasutra. It's a really quick method of doing "Good enough" baddie pathfinding, although it still had some minor issues.

Olli introduced us to his racing game, and the fun of checking a user edited track for errors.

Personally I would let the player make broken tracks, but that's why Olli is better than me.

I also posted a bit of an open debate about re-spawning baddies being a type of game design cheat ( A cheat which I embraced, naturally ).

March:

We pushed out an alpha demo of O2 to the Facebook page. Unbelievable really the gap between that and the finished game.

One of the reasons was the level design, something I really went into with this post ( Which must have the most literal title of any post on the entire blog ).
There was some client work this month, but I honestly couldn't tell you what it was, as it just seems to blur. I think it could have been an additional level to a game did back in December whilst out in the US, but it could just as well have been anything. 

Olli covered off the map / track format for his racing game, and that's all we wrote.

April:

This was a good month. I took a couple of days off to add the hidden game to O2, just as level design was killing me.

It was great just to have two days coding for the sheer joy of it, a pattern for the month actually.

As well as that I added the Trip Wires to O2, which I was really pleased with. I loved the similar mechanic in Bioshock 2 ( Can't remember if they were in the first one ? ).

Also this month the flame thrower got some much needed love. It was far too ugly ( And slow CPU wise ) in Haven, so I re-coded it and it's in my mind the best effect in O2, it looks great.

At the end of the month I entered Ludum Dare for the first time.

The game had some nice aspects, but generally it was flawed. I did originally start using Starling for it as a way to learn it, but soon got pissed off with that.

I enjoyed it, but I doubt I'll do it again. I learned two key things.
a) I didn't have time to vote / play other peoples games as much as I should have, which is just crap.
b) I've done so much crunching over the years spending a weekend doing it isn't fun. That means I didn't spend enough time on it, and yet still missed the deadline.

There's a big old write up of it here with I assume a live link to play it.

May:

Another pretty good month. I think the good months are the ones where I could just get my head down and work on O2 without having to break off to do client work.

Firstly I re-coded the level plotting routines so they were split up over frames, which stopped the feeling of the game hanging the previous approach caused.

The C4 weapon was added, which I really like, it's great when a ton of Owlmen are fighting over it and pushing it along.

I had to re-code the wingman AI to use the new node based pathfinding the baddies did. That wasn't too bad, but like all things it affected a ton of other stuff, mainly the bullet classes which I had to go through, so we could have those human baddies in level 8.

Discovered a bug with Chrome / Pepperpot ( That's Chrome's built in Flash player, which obviously doesn't work exactly the same as the true Flash player ) that still hasn't been fixed.

Aside from that we made a start on level 5, which was the first one Lux laid out. It was so nice being able to put the planet in the background and add parallax, and the lens flare works better than I could have hoped.

June:

I hit the nothingy age of 41 this month. Time just creeps up on you.

Less good month as I took on more client work to help fund O2. BTW I don't often link to the client work as it's usually done under a NDA, where we can't take any credit for it ( And a lot of stuff I've done recently has been for one company, and it's behind a sign-in so I can't even do a cheeky link with implied credit ). It's not that I'm ashamed of client work, my bank account definitely isn't, but most of the time there's nothing we can really show.

Olli did a great post about Unity colliders, which you can read here.

And I added the sentry gun to O2, and made a start on the re-designed console.

July:

Olli teased more images of his racing game, MTR.

I was still stuck in re-structuring hell. O2 isn't a complete re-write from scratch of Haven, but I'd say it's at least 80% new code, possibly more. The hard points were added to Swarm mode, because we just didn't have enough to work to do anyway ( Worth the effort I think though ).

The really big announcement this month was of me going into partnership with Lux under the Garage Collective banner. It was a really huge step for me, only looking to release games under the GC name from now on after working so hard on trying to establish GYW. As you can see, I'm still in the GYW camp with Olli, it's mainly about the game branding rather than a complete clean break ( Olli and I haven't fallen out or anything ).

August:

Olli did some client work, can I just say, I never get jobs like this:

He also posted about another Unity project, which you can read more about here.

As for me, well this is pretty much when the O2 crunch started as Lux had come over full time. Aside from client work it didn't really stop until the game was complete, I was having something like one day off every 5/6 weeks and it sucked like crunch always does.

September:

Big big month. We renamed O2 to the more familiar "Lost Outpost" cause of an existing trade mark. Cheers for that Activision.

The first trailer went out,

And we put the not yet really finished game up on FGL ( Where we got straight 8's in the review on there. Totally fucking pointless ).

Also we ventured to Greenlight, in fact if you've not given us some voting love you can now by clicking this link. Thanks.

Olli did a ton of posts about his Hellstrom project, which was an interesting insight into building a Unity game.

October:

For me this was just fucking hellish client work and trying to sneak some hours to actually try and finish Lost Outpost. Even though the game was up for bidding it was still a constant crunch, it never let up ( Hence only one post from me in October, although to be honest the only other one I could have made was "Reasons why I went on a killing spree" such was my state of mind. I was fucking broken by that stage ).

Olli broke off from Hellstrom to give MTR some love, and what love it was.

November:

Another big month.

On the 16th we finally sold Lost Outpost, to maxgames.com
On the 19th Lost Outpost was officially gold.

And on the 29th if finally went live ( We actually delayed it a week, I jokingly said to our mate PhotonStorm "I bet the new Kingdom Rush comes out on the same day" and lo and behold. Arse. To try and give ourselves a fighting chance of being noticed we bumped it back a week ).

Olli showed some more MTR action, and him unboxing his swanky new day one Xbox One, but this month belonged to Lost Outpost after the forever development time.

December:

For me this was more client work, I'm working on a prototype game for iPad. My first time, and my first time properly working with Starling ( Which is great, I've love to find the time to have a hack of that code as it could be speeded up a lot as it has to be so general for ease of use ).

I'll hopefully write more about that this month, also we've taken on a new html game, which I will actually be able to link to when it's live.

The other big news this month was that we finally retired the proper gamingyourway site, it just redirects here now. We were never updating it so it was time to kill it off.

And I think that's it. Even less output that last year, again. Lost Outpost was the main factor in that, and I really doubt we'll do a game as vast as that again ( In Flash ). The market is still at a crossroads where there isn't the same money there once was in the Flash market ( LO sold for around a third less than Haven ) and the money isn't there yet in the HTML5 one, at least for not for large games. That will change, but it's a case of waiting for the change and paying the bills in the mean time.

I'm really proud of Lost Outpost, it's the best thing I've ever done. We've done ok review wise, got a daily 2nd on NG ( Haven was beaten by a movie on there too, we've never had a daily first on there with any of the three Outpost games ), got a weekly 3rd on Kong which was surprising as our games never do well there, it was more a case of nothing really great coming out at that time rather than our game being adored.
There are still bugs in it, it's just impossible to find the time to fix them, which is such a pity, it really hurts me leaving it like that.

I'd like to thank all the guys who helped out on it, you know who you are, and you were all fucking excellent. Thank you.

Now let's see what 2014 brings... I'm guessing less Flash and more HTML5, which is a real shame. Hopefully some Unity, but I'm sure I've been saying that for the past couple of years.

We both hope you had a great Christmas and a happy New Year, and thanks as always for sticking with us, we're going to strive to be better this year like every other.

Squize.

... oh bummer.

The title says it all. Note to myself: If you sell a client a game based on your own but you're not allowed to credit for the client version, you're also "not quite" allowed to use the same visuals on your own public version. Well at least for the next 12 month.

The point being that I've been told not to "advertise" my own version of the game with the visuals I've produced for the client version. One could argue that *I* have created the visuals, so it is my IP, but hey, I earned quite a nice sum with it being "exclusive" - so I have to swallow the bitter pill and do a complete visual redesign (including menus, cars and track pieces) ... and I'm not quite sure if I could take it ...

Oh well.

I do not fear computers. I fear the lack of them.

... Isaac Asimov.

I'm not sure if I mentioned it, but MTR ("The Client Edition") went live the other day. Well not exactly. It will be delivered on CD-Rom as client give-away. I'd like to post some screenies of that, but we're not allowed to take credits for the game (but then it also uses slightly different graphics). The AI in the client version is - to say the best - quite basic, basically because the game has to get done (and because no one noticed that the enemies driving like being on rails).

This out of the door I can finally overhaul the AI of the public version, adding some new patterns (like flocking, follow the leader and so on) and moving the AI processing away from each car into a central FSM. This may sound like a step backwards, but in reality it makes things a lot easier when adding flocking). Not to mention that this will also remove one component from the cars (the AI controller).

Anyway, there's some reading involved and a lot of client work to do before I can dive into it. One thing I added this morning, though, is the car selection screen. It's not quite done yet (I need to model the "podest" the car will be placed onto) but here's a screenshot. Oh now that I look at it I also should add the track selection sooner or later ...


Oh, I just see next / prev buttons are missing in this shot ...

... Next week then.

-- Oliver / nGFX