Artemos

Making a Mistborn Video Game in Unity – Invested 1.2

10 posts in this topic

uFQ1ZhR.png

Last year, I began working on a game/simulation implementing the magic system of Allomancy. I made a thread several months ago to document the initial state of the game and discuss different ways to mathematically model Pushing and Pulling. I establish a lot of the physics of the game there, so I recommend you read it if you haven't already.

I've worked on the project a lot over the past few months. This post will be separated into three main sections: the first, focusing on the physics; the second, focusing on the game (with an interlude for more physics); and my plans for the future. Here is the second update on the progress of Invested.

The Physics

In Pagerunner's famous thread, I made several simulations comparing different models of Pushing and Pulling, showing off how Pushing duels could work as well as what happens when the coin you're Pushing suddenly hits a solid wall/ground. Those simulations can be all viewed in-game, so feel free to examine them yourself and experiment with the Allomancy settings.

If we assume anchors do nothing special for your Pushes, Allomancy behaves like an undamped spring. If you push off of a coin into the air, you'll oscillate up to your max height, then fall all the way back down to the ground, then back up, and so on. Changing the relationship between distance and strength doesn’t change the behavior of the system.

Spoiler

 

Pushing duels work in a similar way. The 10 cubes are allomancers, anchored to the ground. Without any dampening, you get a boring spring.

Spoiler

 

The only model I could find that solved both of these problems was the infamous theory that the strength of Pushes is a function of velocity. In case you haven't been following those conversations, this theory (in its most basic form) claims "the higher the relative velocity between the Allomancer and target, the weaker the Allomantic force." Pushes on anchored coins will be stronger than Pushes on unanchored coins because anchored coins are completely stationary (that is, the relative velocity between the Allomancer and target is much smaller). The flavor of this theory that works best in the game (in my opinion) reverses the effect when the relative velocity is negative, i.e. when the Allomancer and target are moving towards each other. This means that Pushes on targets flying towards you are even more stronger than Pushes on targets flying away from you. When you're falling and throw a coin down, your Push will be weak until the coin hits the ground. Then, your relative velocity will be negative, and the Allomantic force will increase significantly, giving you a "jolt" as soon as the coin hits. This is the effect we see in the books, so it's what I have enabled by default in the game.

With this model, Allomancers stabilize near their maximum height, rather than oscillate about it:

Spoiler

 

Changing the constant used in the calculation of this velocity factor makes the system more critically/under-damped:

Spoiler

 

 

Watch how duels play out. I've also unanchored the Allomancers, and this looks a lot more like how I envision Pushing duels in the books. The strength of the Allomancer is important, but weight determines who will move in the end.

Spoiler

 

Again, you can experiment with these settings at any moment.

Spoiler

yI3eTWH.png

 


The Game

The player is a "primer sphere" - an Allomechanical construct or fabrial. It is an experimental device designed to test the limits of Scadrian magic.

AjOtmIk.png

The sphere's mechanical nature gives it full control of its body and moment, allowing it to roll across surfaces and jump. This is enhanced by the first metal the sphere can burn: pewter. This is used for sprinting and pewter-jumping. By passively burning pewter, the sphere exerts a greater force while moving, allowing it to better anchor itself or move while Pushing and Pulling. While burning pewter and jumping, the sphere jumps further in that direction and can jump off or up walls or kick away small objects.

Spoiler

VxvhfrM.png

Secondly, the primer sphere can burn iron and steel. Passively burning either of these metals reveals all nearby sources of metals. The wider the line, the heavier the source. The brighter the line, the stronger the potential Push on that metal.

Spoiler

mz9QVlC.png

The sphere can "Pull-target" and "Push-target" one or more metals at once. When a metal is Pull-targeted, it can be Pulled on - likewise for Push-targets and Pushing.

Spoiler

bKp4991.png

(Interlude: physics)

After all the calculations are done, the player has some Allomantic Force they exert on the target. The mass of iron or steel burned is directly proportional to the net force they exert. If you're pushing with 1000N of force, you're burning 1000mg, or 1g, of iron every second. There's actually a WoB that mildly contradicts this: according to Brandon, metal burning speed is proportional to power drawn, not force.

There are two reasons for why I make burn rate proportional to force. First, I can't be sure if Brandon is talking about "power" with the definition used in physics (i.e. a change in energy over time). If not, then there's nothing to worry about; the novels are wobbly enough to not be sure how precisely metals are burned. Still, in the future, I might shift things around to have all calculations work around power/energy rather than force, but the former is harder to calculate than the latter. My college-level textbook only talks about power in regards to applying a force to an object such that it moves at a constant velocity, so the math would get… difficult. I'm working on a model called "Distributed Power" based off of Pagerunner's model 3 that does something similar to this, but it's a work in progress. The main difference between force and power (in this context) is that power is a function of velocity; but, if we're using the Exponential with Velocity model, force still changes with velocity, just with a different relationship. There's potential for a fair bit of discussion in regards to this.

The second, more important reason for making burn rate a function of force is reduce obfuscation - if you're consistently Pushing with 1000N, you know you're losing exactly 1g of steel every second. If you have only 10g of steel left, your intelligent lizard brain can figure out how long you can keep up that push. This relationship is more intuitive for the player, and changing this to power would lose that clarity.

(end interlude)

It wouldn't be Mistborn if you couldn't throw coins.

H4GcIDe.png

  • You can toss coins. If you Push while doing this, you'll fire coins directly towards the crosshair.
  • Holding "jump" while tossing a coin will throw it downward, useful for cruising above the ground or a smooth landing.
  • There's also a "Coinshot mode." With this, holding down Push (right-click) and pressing Pull (left-click) will instead throw a coin. This makes throwing coins work more like a conventional FPS where the LMB fires bullets. This (along with all of the controls, I guess) is a WIP.

There are a few scenes for the player to play around in: a tutorial and several sandboxes (as well as the Sandbox, which has some fun zero-gravity targets).

cracks knuckles cries in GTX 965M Turns On Motion Blur it's gamer time (recorded back when I only had my laptop at school)

There is an assortment of other videos here.

The Future

We've talked a lot about Newton's third law a lot, but let's take a look at Sanderson's third law: "Expand on what you have already, before you add something new."

  • Better ways of throwing coins
    • Changing between semi-automatic and fully-automatic coin-throwing
    • Throwing multiple coins in different patterns
      • Oftentimes in the books, you see Mistborn throwing a "spray" of coins at an enemy like a shotgun blast.
  • Pewter
    • From the start, my plan with pewter was for it to work like a shield in other games, where burning it will prevent you directly losing health. Once health actually becomes a thing, pewter will serve this purpose.
  • HUD
    • General polish is needed. It should be more clear when metal reserves are refilled, coins are picked up, on-screen text changes, etc.
  • Sound
    • The game's completely mute at the moment. I have little experience with sound design and production, so having a meaningful sound system is still a ways away.
  • Controls
    • I've been living in my own bubble, so I've grown accustomed my choice in keybinds. I am absolutely certain think that they're not the most intuitive. If you play the game, please let me know which controls make sense and which ones don't.
    • Argent threw in the idea of using bullet time (or, perhaps, Feruchemical zinc time) for steel and iron. It would help a lot to make Pushing, Pulling, and target selection easier.
    • In general, make target selection better. When you're surrounded by metal objects, there is a lot of visual clutter on the screen. I need to make a better system of prioritizing target selection so that you can say "I want to choose this target" and not accidentally select a target in front of or behind it.
    • I definitely plan on adding macros/techniques for Pushing and Pulling. Vin's Horseshoe Wheel is one example. What I call the "centrifuge" is another - Pulling an object such that it orbits around your body, then releasing it such that it flies in the targeted direction. Lurchers never got their fair share of offensive combat in the books, so I want to show how formidable they can be, with a spicy little feedback loop or two.
  • Other Allomantic metals
    • Tin: zooming in, informative HUD elements about the environment, dispelling mists/visible stars in Luthadel.
    • Bronze: see nearby sources of kinetic Investiture, such as puzzle elements or enemies that would try to Push on you.
Spoiler

 

My requests for you:

  • Play the game! You can download it from my GitHub.
    • What controls make the most sense for you?
    • What bugs and physics kinks do you find?
  • Sanderson's 0th law says to err on the side of awesome. What should I add that would be fun? Mistborn is a fantasy novel, after all - so what are your fantasies for Allomancy in a game?
10

Share this post


Link to post
Share on other sites

Ok, this is absolutely, irrefutably awesome. The moment I first heard of the Metallic Arts, I wanted to be able to play a videogame that used them. Seeing all the stuff you've got so far is only heightening my excitement for this. I'm not good at math, nor game development, but I can say that I'm excited to see what effects you translate the various allomantic metals to (and I can't wait to see if there are obstacles that only a Duralumin Steelpush/ironpull could overcome, just to enhance the sense of power Duralumin feels like it offers in the books). I'm most curious about something like allomantic zinc/brass... How would that work? Changing enemy aggression to target each other/not you, depending on what metals you use? I dunno, I'm just trying to express my hype for this and it's turned into a ramble, I'll shut up now :P

1

Share this post


Link to post
Share on other sites

Wow. It's amazing how much you've done so far. I'll have to try the game out. One question I have is if you ever see yourself attempting to make the player a human avatar rather than a ball? It sounds like it would be preposterously difficult to get the animation looking correct while the character flies through the air. There's just so many different movements and directions. 

1

Share this post


Link to post
Share on other sites
7 minutes ago, ILuvHats said:

Wow. It's amazing how much you've done so far. I'll have to try the game out. One question I have is if you ever see yourself attempting to make the player a human avatar rather than a ball? It sounds like it would be preposterously difficult to get the animation looking correct while the character flies through the air. There's just so many different movements and directions. 

Indeed. I would have to put more important aspects of the game - physics and level design - on the backburner for a long time. The ball's physics are very straightforward, and the ball make sense in-world as an entity made to test the physics of magic. Rolling up walls/ceilings, navigating around objects, and cresting ledges take infinitely fewer hours to animate. For the foreseeable future, you're a ball.

1

Share this post


Link to post
Share on other sites
12 minutes ago, Artemos said:

For the foreseeable future, you're a ball.

I always wanted to be a ball.

2

Share this post


Link to post
Share on other sites

Posted (edited)

This is amazing. Also, doesn't everyone secretly want to be a ball with allomantic powers?

As a side note, you did a really good job making this. I don't actually know how much effort it takes to do this kind of thing, but it looks like a LOT. It is really cool!

Edited by Mushroom Catalog
1

Share this post


Link to post
Share on other sites
16 hours ago, Artemos said:

Argent threw in the idea of using bullet time (or, perhaps, Feruchemical zinc time) for steel and iron. It would help a lot to make Pushing, Pulling, and target selection easier.

Why not a clever application of Allomantic Bendalloy for "bullet time"? Then again, you wouldn't be slow when swinging from anchor to anchor from your perspective... And the bubble wouldn't follow you (unless these are "quirks of the Primer Sphere")

0

Share this post


Link to post
Share on other sites
14 minutes ago, Halyo_Alex said:

Why not a clever application of Allomantic Bendalloy for "bullet time"? Then again, you wouldn't be slow when swinging from anchor to anchor from your perspective... And the bubble wouldn't follow you (unless these are "quirks of the Primer Sphere")

For those exact reasons you said. Feruchemical zinc does exactly what bullet time is supposed to do, with no more hoops to Push through. The Era 2 primer cubes are able to use feruchemy (when they used iron to decrease the weight of the airship), so it's within the realm of possibility.

1

Share this post


Link to post
Share on other sites

Welp, foiled myself there :P

And I'm glad they can, because that opens up the possibility for iron Feruchemy for some Wax-style steelpushes and ironpulls. Maybe some heavy-metal (hah) obstacle crushing via high mass steelpushes?

1

Share this post


Link to post
Share on other sites
21 minutes ago, Halyo_Alex said:

Welp, foiled myself there :P

And I'm glad they can, because that opens up the possibility for iron Feruchemy for some Wax-style steelpushes and ironpulls. Maybe some heavy-metal (hah) obstacle crushing via high mass steelpushes?

Very good idea. Being able to manipulate your own mass with Feruchemical iron makes waaay too much sense in this game to not be put on the to-do list.

1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.