Arbitrary buttons in Fungus

I’ve made another little thing in Fungus. This time, it allows you to use any UI Button in place of the Menu Dialogs.

So you can set up UI buttons in your scene, and then in the Fungus Block, you can make it go to another block when clicked, same as the Menu Dialogs do.

It relies on extending the MenuDialog class into ButtonMenuDialog. So you have to add a MenuDialog to your scene and then attach the ButtonMenuDialog script to it instead.

I’ve made a small example that uses it for North East South and West buttons, to allow you to navigate a maze, and for a couple interactable things in the maze. DungeonExample.zip If you drop these files into a Unity project that also has Fungus included, it should show how it works.

Tagged , | Comments Off on Arbitrary buttons in Fungus

Fungus animation in Unity

Okay, so the basic Animator in Unity can be intimidating to someone just learning.

A lot of the tutorials for animation in Unity start right into creating transitions between states and using variables to trigger transitions, and sometimes that’s overkill for what you want to do.

There is a function for the Animator class, it’s called Animator.Play. It’s often overlooked, (even that script reference I just linked doesn’t describe it) but it’s pretty nice if you want to cut to the chase and don’t want to use anything fancy.

I’ve been playing a little with the Fungus engine, which is designed for making visual novels, and have node-based flow control.

For the built-in animation commands in Fungus, there are Set Anim Trigger, Set Anim Float, etc. These are all ways to set variables on the animator, and then if you’ve got transitions that activate based on those variables, then the transitions change the state of the animator. So using them requires you set up variables and transitions for whatever you’re doing.

So I figure, sometimes you want to cut out the middleman, and just change states directly. So I made my own Fungus command that lets you directly change state.

Here’s what it looks like in action:
Display of Unity Animator and Fungus command

In the Animator, you can just add states by dragging in animations. You don’t need to make any transitions between states. In the Fungus command, the State Name parameter should be the name of the state that appears in that Animator flowchart. I’ve included Layer parameter in the command, though if you do want to keep it simple, just leave it with the default -1 and leave your animator with the default base layer. The time parameter lets you start the animation part-way through the clip, so 0 will play from the beginning, 0.5 will start half-way through, etc.

You can download the script for this command here.

Tagged , | Comments Off on Fungus animation in Unity

Actually fact

So in this video from LambHoot, he says this: “This isn’t just my opinion, this is actually fact.” This is him saying the quality of Five Nights at Freddies is poor. And then he qualifies his statement by saying the game has got a lot of attention for its lore and story, but “this has nothing to do with the actual gameplay.”

Not to pick on Mr. Hoot, he does do some other very intelligent things in his analysis. (I certainly approve of him making graphs to help analyze the game.) And the supremacy of “actual gameplay” over absolutely everything else can be a useful lens through which to analyze games. (Lenses being the subject of my previous post.)

But I think sometimes this is taken to justify dismissing other aspects of a game that should not be dismissed.

Another quote: “You should never buy a game (and also a game should never be made) because of a story. Novels and films cover stories!”

There’s an idea in soviet montage theory which argues that editing is the only element of film that is unique to film. If you want a story, you can read a novel. If you want to look at pictures, you can look at a painting or a photograph. If you want acting, you can watch a play. If you want choreographed movement, you can watch a ballet. And I would say this is a useful lens to consider film through, and soviet montage theory led to some very good artistic development. But if you used this to dismiss the value of story or acting in films I’d call that dogmatic.

Imagine if I were to say “Never buy a movie because of acting. Plays cover acting!” or “A movie shouldn’t be made because of a story. Novels cover stories!”

Just because an aspect of a game is something done well in other media doesn’t mean it has no value in games.

Emotionally, it’s tempting to feel like you have a superior appreciation of games that those other people who have let themselves be distracted by things like story or graphics. And there are people who are fixated on the idea of “objective” video game reviews, who will latch onto something like this if it aligns with their own priorities for what they value in games. (A major element of my game Gator’s Secrets is that what the Gator deems “objective” is really what aligns with the Gator’s priorities. The criteria he uses for defining True Games is random and arbitrary, but he insists everyone else follow the same criteria.) But if we want to consider games as art it’s very limiting to designate one lens as the only valid way to value games. Art will not be so easy to pin down.

Again going back to my previous post, Ian Bogost argued in favour of systems over characters in games, because systems are what games are uniquely good at. I won’t deny that. It’s just a mistake to think there’s no value in everything else.

Tagged , , | Comments Off on Actually fact

Models of game development, or lenses

Okay, I’m spinning off three articles here:

Against Flow by Lana Polansky.
The Cult of the Peacock by Brendan Vance
Video Games are Better Without Characters by Ian Bogost

What do they have in common? Pointing out something they think is taken for granted in discussions about games. And I think sometimes people who read these are too quick to get into a mentality of “Either A is the Right Way or it’s the Wrong Way.” I try to read these things more in frames of “Here’s something you might find useful.” Now Bogost’s article went a little further into, “This is the superior one-and-only true framework.” But I don’t need the author’s permission to interpret it in the way that I find useful.

Here’s a quote from The Art of Game Design: A Book of Lenses by Jesse Schell which matches my attitude here:

Good game design happens when you view your game from as many perspectives as possible. I refer to these perspectives as lenses, because each one is a way of viewing your design. … None of the lenses are perfect, and none are complete, but each is useful in one context or another, for each gives a unique perspective on your design.

In Jesse’s book, Flow is just one lens of many. It is useful in one context or another. If it gets to be too unchallenged in discussion of game design, I think it’s healthy for people to start focusing on its limitations.

This an image I grabbed from the Wikipedia entry on Flow:
300px-Challenge_vs_skill.svg[1]

Once you start making charts and graphs of people’s emotions, it should be obvious you’re simplifying things. And there are going to be contexts where it’s not a useful model. Flow may be more important for some genres of game than others. Or as Polansky’s article says, it’s good at achieving a certain “desired affective experience” but there are other experiences that are worthwhile and might be more desirable, in some cases.

Bogost’s article, he argues the virtues of making games that emphasize the systems rather than a character the player is supposed to identify as. He has also defined what he called ‘procedural rhetoric” as rhetoric that is uniquely achievable through games. Soviet montage theory proposed that the one element of film unique to film was the edit. Acting is shared with theatre. Visual composition is shared with painting or photography. The story is shared with theatre or with novels. And that is a useful lens to examine film through, but it doesn’t mean there’s no value to be found in these other elements.

For any lens, you need to be open to the exceptions. Maybe you can have meta-lenses that help decide when to make an exception, but sometimes you just have to go by your gut.

Tagged , | Comments Off on Models of game development, or lenses

Barger Tim

Also, I did my 16th game jam, with a game called Barger Tim.

I’m mostly pleased with the graphics, except for the generic cube for the burger dispenser. I might be repeating myself a little, since it uses the “throw food into people’s mouths” shtick that I used once before in Launch Turkey. I completely disregarded the Game Jam advice to get a playable version as quickly as possible, and spent my first day just making the little animated chef model and animations. This is the second game where I’ve made all my animations in Blender instead of animating in Unity. (The first is The Spider Who Would Only Eat Candy.)

Jupiter Hadley did a play video. (Along with hundreds of other games from the same jam.) It demonstrates the comment I’ve got from some other people that they tried to grab burgers by standing under the dispenser, and also shows how easy it is to overlook the “hold the throw button to throw harder” mechanic. I so often make game jam games with absolutely no play-testing and this sort of “assume the controls are more obvious than they are” is a mistake I really should have had drilled out of my head by now.

If I make changes to this, I’ll try to make those controls more obvious, either by trying alternate control schemes, or by just providing instruction. I’ll also play with the head movement; instead of moving a constant speed, they’ll zip up to a starting line, and zip away from a exit line. I think this will help make losing a life feel better, the delay between “This head is out of range for you to hit” and “This head has actually docked you a life” is kind of bad.

Tagged , | Comments Off on Barger Tim

Pirate Jammers, again

I did a Pirate Jammers post-mortem presentation as part of a Winnipeg game-jam event, writing it further solidified my thoughts about the game. Some of the presentation incorporated my thoughts from earlier.

Some additional thoughts that I think are good:

I compared the appeal of controlling multiple ships to juggling. And the reason why it wasn’t working well in this case was there isn’t enough brink-of-disaster circumstances for you to pull back from.

During the jam, I dropped the outer edge, thinking that because there is an incentive to stay close to the island anyway, and failed to consider how this impacted play. As you can see here, there is punishment for going too far away from the island, it just takes longer to lap the island. But it’s a linear punishment.
lap times graphed vs distance from island. The lap time increases linearly with distance.

I’m going to try out bringing back the outer ring of the race track, and making that an area where you will be chased by a sea monster until you return to the safe zone. This would return that element of “pulling back from the brink of disaster” that is necessary for that “juggling” feel.

During the game jam, I tried out the idea of the ships going in a straight line. During the playtesting of that, unfortunately I was too fixated on the question of whether they should go in a straight line or naturally curve around the island, and neglected other ways I could improve the feel of the game.

Comments Off on Pirate Jammers, again

Pirate Jammers thought process

So I just made Pirate Jammers during a game jam on the weekend. It’s compatible with the Winnitron arcade machine.

I’m going to go through the thought process a little bit.

First inkling of an idea was roller derby with boats going around an island. And since it’s a two-player game, you’d have to control multiple boats, by switching between them. I had been thinking about roller derby for a while as something to bring into a game, but as a scoring method that would allow for team play. With only two players, and the switching between boats, it would be a different take from what I was thinking, but it’s still the inspiration for it.

I briefly considered frogs as an alternate theme, plus then you could have parts of the track on land and parts on water, with different movement in each, but the physics of boats accelerating & decelerating was too enticing. I also had first planned to use a turn-based timer mechanic, like you’d have five seconds to adjust your direction of movement for all four ships, then they’d move for a round, then repeat. I had seen a turn-based cart racer that did something like this. But I decided that real-time worked better for an arcade setting.

I got the basic control scheme working pretty quick. I first tried a version where every ship went straight from the direction you last set them. I thought that might have potential to work with the frantic “switching between ships” thing, make you constantly grab whichever ship is getting off course. But it didn’t feel right, so I tried a version where they automatically followed the track, but you could steer them inwards or outwards. That’s basically what the final game uses, with some minor tweaks, like it will gradually straighten back into the path if you leave it alone.

Initially because of the basis on roller derby, I started all the ships on the same side of the island, but in practice it gave too much of an advantage to whoever was on the inside track, so I put them on opposite sides of the island to make it more even.

Scoring in roller derby is based on the jammer passing an opposing player, and in retrospect this is probably something I should have dropped. I spent a good chunk of time on Saturday trying to get the lapping mechanism working. I succeeded, but this scoring mechanism combined with how the game controls, made it very difficult to score any points at all, especially in the short time they would be playing the game. And if one side pulled ahead, it was incredibly difficult for the player behind to catch up.

To address this first problem, I introduced a turtle that randomly pops up and a large tanker ship, to act as obstacles that could throw the game out of a deadlock.

The other problem was that players were often confused about how the scoring worked.

Maybe I should have just dropped that method of scoring entirely and gone with something more basic like count how many laps you’ve done.

Shortly after the jam, I started considering what if I just did a version where instead of lapping a single island like this, you were racing down a long path filled with obstacles, and if your ship fell too far behind, it was lost. It might get more mileage out of the frantic-switching element.

And actually while writing this, I’m wondering if I should have done more with the outer bounds of the track. Basically, as it is, the penalty for going too far from the island is fairly minor, it just means you’re lapping a little slower than everyone else. If being outside the track meant you were chased by a kraken, or there were many more obstacles out there, then I think that would both help emphasize the frantic ship switching, and would create a new way the player in the lead could accidentally lose the lead. This wouldn’t address the players being confused about scoring, which may be a problem I’m importing from roller derby.

Tagged , | Comments Off on Pirate Jammers thought process

Stop the Goblin Army

For the latest Ludum Dare the theme was Unconventional Weapon. I made a game where you ran over bowling-pin-shaped goblins with a car. This was my 15th game jam.

I had been interested in bowling variants lately.

At the start, I thought maybe you would set the direction of path of the car, more of a puzzle to get it around some obstacles, but I decided just steering it was more fun.

Compared to my car in Trampoline Cop, I tried to make this proportioned more like a real car, and I also relied more on the pixel illustration for details instead of mesh geometry. Also unlike Trampoline Cop, I relied on the Standard Asset vehicle in Unity. There are some things like stabilizer bars that made it easier to rely on the pre-existing script.

What I ended up spending the most time on was two things, both because they were prone to be buggy:
1) The camera movement
2) How to test whether the pins were finished falling over.

I think I will return to this, clean it up, expand on it.

The things I wanted to get to but ran out of time:
1) The scoring isn’t all there.
2) There’s a major bug if you manage to spin the car around, the frame never ends.
3) I want to try out bumpy lanes, or lanes with slight curves, to mix it up a little

Tagged , | Comments Off on Stop the Goblin Army

360 display in Unity w/ Blender

This is just a collection of things I found and thought were interesting while playing with the idea of 360 panoramic views in Unity.

Youtube has support for panoramic video, and I figured that would be a good way to see what mappings are widely supported. They don’t outright specify it, though from looking at the videos that are up, they look like an equirectangular projection

I’ve implemented something in Unity that works with those videos. Essentially it comes down to putting a sphere around the Unity camera that has UV mapping to match that projection. For some testing I used an image from here. I also tried out the video here.

One thing I used is from the Unity Asset store Project UVs from Camera. It can project flat or it can project as a sphere. I think it has its uses, though it ran into limitations with the sphere going entirely around the camera. There would be a vertical stripe where the UVs reached one edge of the map and wrapped around to the other, kind of like this:
seam

Essentially, the problem is it’s calculating the UV per vertex, but one row of triangles ends up with vertices that wrap from 360 back to 0, so they span the whole texture backwards. I wrote my own UV sphere projecting script, where I looped through each triangle, and if a triangle had one vertex on one far side and two on the other, it would shift the one over.

I ended up using this Youtube tutorial as the basis for unwrapping the sphere in Blender. It uses as the applied texture a Mercator-projection map of the world, which would be the same kind of mapping we’re looking for. A good point there is that he marks a vertical seam on the sphere, which fixes the wrapping problem I mentioned.

That tutorial was linked from this demonstration of Unity + Oculus Rift + 360 panorama video on Vimeo. The creator of that followed up with his own tutorial. He gets at pretty much what I was doing. He UV maps a sphere, places the viewer in the center and plays the video on it. Exactly how to map the sphere was the crucial part to me.

The down-side is these still have some distortion on the two poles of the sphere. This might be inherent to using the equirectangular projection. I think that projection is popular because it still looks but it’s kind of a compromise if you just want something to use in-game.

poledistortion

I could just make up any arbitrary projection and use that, but I want a way to produce the video for it, so finding established standards would be preferable. One stitching software for creating panorama video is called Autopano and lists the supported projections here. Hammer projection and “little planet” might be nice alternatives if I want at least one pole not distorted.

John Carmack mentioned cube map support for Gear VR. Autopano doesn’t seem to list that as an option, but according to this tutorial, software called Pano2VR includes some cube-based formats.

I also used this post as an example to render a panoramic image in Blender, and using that as the sphere texture seems to work out.

This is slightly on a tangent, but this is a camera on the Unity Asset Store that renders a 360 view from within Unity. You could potentially render that to a texture on the sphere and have a sort of crystal ball. I haven’t tried it yet, but it’s interesting.

Tagged | Comments Off on 360 display in Unity w/ Blender

Folk art, clones, genres, and N-likes for any value of N

Some things I’ve read relevant to the thoughts percolating in my head:

The creator of Threes shows the email discussion behind the design of the game. To show that even though it’s a very simple game, it can still take a lot of thought to arrive at that configuration. But he’s frustrated that people can then imitate that result for a fraction of the effort.

After playing a handful of games with similarities, I posted on TIG asking whether there was a name for this genre and got the answer “Galcon clones.”

There was discussion of what exactly was a Rogue-like and since the imitators were pushing the boundaries of that, people started saying “Rogue-like-likes.”

There are so many Five Nights at Freddy’s fan games now.

Or look at pool and billiards. There’s English billiards, eight ball, nine ball, snooker, so many variants. And I became fascinated by these old engravings of the early billiards and the idea that it was originally a table-top version of a lawn game like croquet.

1674_illustration-The_Billiard_Table[3]

That summarizes the context for these things. What questions do these lead to?

I’m old enough that I remember when a lot of people called First-Person Shooters “Doom Clones.” So I’m wondering, at what point do the imitators of a game turn into a full-fledged genre?

I myself have made a Threes-like by trying it out in three dimensions. Though I was more influenced by 2048 than Threes. Does that make it a Threes-like-like? The creator of 2048 said he was copying 1024, so 2048 was itself already a Threes-like-like, and mine would be four generations removed from Threes.

If we go back further, Tetris spawned imitators because of its success. Wikipedia of course has a Tile-matching video game article, which attempts to tie together a history of these games. It mentions a contemporary of Tetris called SameGame which could also be an influence on the genre. But this is kind of neat: Columns was a lot like Tetris but introduced match-three instead of filling solid horizontal rows. Later, Tetris Attack come out, using that match-three mechanic, but you no longer control the falling block, you swap adjacent blocks already on the play field. From there, Bejeweled introduces the restriction that you can’t swap any two adjacent blocks, but only allows swaps that result in a new match-three. Plus, instead of the Tetris legacy where you lose when the screen gets filled to the top, in Bejeweled you lose if you have no valid moves.

Things like Tic-Tac-Toe and Connect Four pre-date Tetris, so you could see Columns as influenced by both them and Tetris. And there could be other intermediate games I’m not aware of. But I think it’s a great illustration of a current game being a gradual evolution of games that come before. And is it also a demonstration of going from “making a game like Tetris” to “making a game in this genre.” You might of been able to argue Columns was just ripping off Tetris, but the connection to

Threes

Threes was invented in a world where Bejeweled already existed. Where all the various Tetris imitators already existed. Is it also a slight evolution of what came before, or is it enough of an innovation to say something else is going on here?

A Threes game is over when you run out of valid moves, kind of like the Bejeweled standard, but what is a valid move is different. Instead of match three you get match two, but more importantly, instead of scoring as soon as the matching tiles are touching, you only score when you merge them. And after you score, both tiles aren’t removed, rather the two tiles are replaced with one tile, which in turn can be merged with matching tiles.

I’m describing these as three changes, but they are kind of interconnected. Bejeweled that let you match-two would be incredibly easy. Threes that required you get three tiles in a row for a merge would be incredibly difficult.

The SameGame lineage I mentioned also has the extra stage for a match. (The first variant on that I remember playing is this Ferry Halim game.) But the method of choosing a match is very different. Threes-likes will do all matches in the same direction, while SameGame-likes do matches of the same colour that touch.

The progression element feels very important. In Bejeweled you have 7 different colours of tiles to match, but every colour is equal to the others. In Threes, merging a 1 and a 2 makes a 3, merging two 3s makes a 6 and two 6s make a 12, and so on. So the merging mechanic gives all the tile types an order; the higher-numbered tile types are worth more points but are harder to complete. So maybe that’s the biggest change from the Tetris lineage. In Tetris the two progressions were: the score went up if you did well, and the blocks piled higher if you didn’t. Threes creates a progression that naturally gets more difficult without tacking on a speed increase or something like that. None of the whole lineage from Tetris to Bejeweled had that.

Folk Games

I find this idea of games with family trees interesting. You see it a lot in folk games as well, where there wasn’t the same tendency to make a game someone’s intellectual property and sell the whole thing as one package.

Bowling includes 10 pin, 5 pin, 9-pin, Duckpin, and Candlepin bowling. (I’ve only played the first two, but I shall now endeavour to try the others.) And there is evidence that ancient Romans and Egyptians played similar games. Plus there are some more distantly-related games like bocce. They’re often regional variations.

And as I said above, I’m fascinated by the early pool/billiards and the idea of it being a sort of “table croquet” in the same sense as “table tennis.” They used clubs instead of cues, which would make the similarity to lawn games like croquet more obvious.

Also, when you look at for example the Nine-ball page on Wikipedia, there are so many slight variants possible with the same equipment by racking different balls or using different rules.

Card games are the same, if you have a deck of cards, there are a lot of different card games you could play with that. If you add a cribbage board, you can play cribbage. ( Technically, the board is only for keeping score, which could be done a number of ways. The predecessor to cribbage was called Noddy and there are references to using “counters” which I like to imagine were themselves a substitute for gambling, but I’m not a historian. )

But video games tend to exist as a whole package. So you don’t see as much of that sort of thing where the same equipment is re-purposed with some rule changes. There are people who will mod video games, but the technical requirements are higher. (You could make an argument for speed runs, but this post is long enough already.) Even board games like Monopoly, though everything you need is sold in one box, people still regularly play variant rules like the lottery on Free Parking.

I can understand why it’s frustrating if you’ve done something significantly innovative like Threes that people come along and imitate it with a fraction of the effort. But from the view of games as folk-games I find it fascinating how quickly Threes got mutated into 2048 and how many people are imitating 2048 without knowing Threes even existed. And is this going to result in a whole new genre of games once the imitators can diversify a little more?

Which is I guess why I was considering the innovations of Threes separately. The more you can consider each on its own rather than adopt the whole package, the more your Threes-like can start diversifying that field.

Tagged , | Comments Off on Folk art, clones, genres, and N-likes for any value of N