Yet another thing for Fungus

Okay, now I made something that modifies the Fungus Say Dialog to work more like it’s a text messaging system, where it shows a series of bubbles of what characters have said, instead of just the most recent Say.

bubblesExample

You can download the files you need here but of course you’ll also need Fungus.

I’ve got an example scene and a prefab called TextDialog. To use it you just drag the TextDialog into your scene. The colour and alignment of the text bubbles are set according to the Name Color and Portraits Face values for whichever character is talking. The left and right on the text bubbles are kind of cheated by putting offsets into the background images. So you’ll need to make your own images to adjust that.

Tagged , , | Comments Off on Yet another thing for Fungus

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