Jump to content

Mistborn Video Game: Era 2 Platformer


DqwertyC

Recommended Posts

Heyo!

I decided to teach myself how to use Unity over quarantine, and after getting a grasp on the basics started working on a Mistborn video game. I decided to start simple and make a game based on Waxillium Ladrian, mostly because his powers are some of the easiest to translate to a platformer without adding any extra mechanics. Additionally, focusing on a Twinborn keeps the control scheme and HUD simple - no need to switch between metals or show a wide array of metal levels. Overall, I tried to be faithful to the physics as shown in the books, though I did make a few decisions based more on what would be fun to play than existing information on the magic.

Here's a quick run-through of the tutorial level I made, showing off the Allomancy and Feruchemy.

Update: You can now play the demo online here!

Basics:

It's a platformer. You can run, jump, and climb up ledges. You can jump through the bottom or drop through the top of yellow platforms, while blue "glass" platforms have to be shattered to pass through. There is a slight amount of simulated air resistance, but it's only really noticeable when moving very quickly or when storing weight.

I originally wanted to completely remove control while in midair, forcing the player to rely on Allomancy to move around. However, we're so used to being able to nudge characters in midair that this really detracted from the enjoyment of the game. So, while there's not as much control in midair, the player can still move a bit in either direction. This also makes balancing on anchors with Allomancy a bit easier.

The player is damaged when colliding with the ground or other obstacles based on the impulse of the collision. Basically, the lighter you are, the faster you have to be moving before you take damage.

Feruchemy:

There are three discrete levels of storing/tapping mass that the player has access to. The mass at each level is double the previous, and the rate at which mass is stored/tapped in the metalmind is dependent on linear distance from base mass:

Level: | Scale: | Rate:
    -3 |  0.125 | +0.875
    -2 |  0.250 | +0.750
    -1 |  0.500 | +0.500
     0 |  1.000 | +0.000
    +1 |  2.000 | -1.000
    +2 |  4.000 | -3.000
    +3 |  8.000 | -7.000

Like Wax, the player will usually want to be constantly storing, and briefly switch to tapping when they need some extra oomph.

Because of the extra air resistance, and the lower impulse on collisions, someone storing at the max rate can survive falls of an indefinite length. Being lighter also means the player can jump higher, while being heavier makes it easier to break glass panels.

When changing mass, momentum is mostly conserved, but the change in velocity is decreased from what it should be to prevent some game breaking jumps and steel-pushes.

Allomancy:

Allomancy was probably the trickiest part to design, mostly because it's the least consistent. Artemos has talked about those issues in depth here, so I won't repeat what's already been said. My decision was to decouple the force on the metal being pushed and the force on Wax. While this completely breaks Newton's Third Law, it does allow for interactions more in line with the books.

The force in either direction follows the equation A * (pm1 * pm2) / (r^2), where A is some constant, pm1/pm2 are the perceived masses of the character and the target, and r is the distance. For the force on the target, its perceived mass and the character's perceived mass are their current mass. This means that, if the character is tapping weight, their pushes are stronger and coins are shot faster. For the character, the target's perceived mass increases when it's well anchored, with the amount anchored depending on the angle between the push and the slope of the object the target is anchored against. Additionally, the character always perceives their own mass as their base mass. This means that if the character is storing weight, they can push themselves further and faster. 

Next Steps:

If you want to poke at the code or play around with the mechanics, you can check out the current build on github. I've certainly enjoyed working on this, but I don't really have any future plans for this specific project, mostly because I want to create games that I can freely share and distribute. If I were to continue, the entire code base would probably need an overhaul, since it was written as I was still learning. I may reuse and reskin some of the Allomancy mechanics as magnet-based superpowers in a future game, because jumping around on coins is legitimately enjoyable.

Enjoy!

Edited by DqwertyC
Adding link.
Link to comment
Share on other sites

45 minutes ago, Edgedancer_of_spirits said:

How do I download this, @DqwertyC

I've added a branch to the github repository that just has the required files to play the demo: Current Builds

On that page, there will be a green button saying Clone or Download. Select that, then select "Download ZIP". Once this file is downloaded, you'll need to decompress it. In that folder, there will be a file called "Dawnshot.exe," which will launch the demo.

 

Link to comment
Share on other sites

This project looks awesome. I've always wanted a good mistborn game. I just have a few questions. Is there a macOS build for this, and are you willing to post the source code for collaborative purposes? Thanks for putting forth this effort, I look forward to playing it.

Link to comment
Share on other sites

14 hours ago, Mage said:

Is there a macOS build for this, and are you willing to post the source code for collaborative purposes?

I just put a macOS build up on the builds branch on github, but I'm on a PC so it's entirely untested, if there's any issues, let me know and I'll see what I can do. The entire unity project is up on the repository's master branch, so if you install Unity 2018.4.22f1 (which is free for non-commercial use), you should be able to view and mess around with the project.

If you want to look at just my code, that's all under Assets/Scripts. That folder is an absolute mess though, and the main files you'll want to look at are WaxController.cs and MetalObject.cs.

Link to comment
Share on other sites

6 hours ago, DqwertyC said:

I just put a macOS build up on the builds branch on github, but I'm on a PC so it's entirely untested, if there's any issues, let me know and I'll see what I can do. The entire unity project is up on the repository's master branch, so if you install Unity 2018.4.22f1 (which is free for non-commercial use), you should be able to view and mess around with the project.

If you want to look at just my code, that's all under Assets/Scripts. That folder is an absolute mess though, and the main files you'll want to look at are WaxController.cs and MetalObject.cs.

Ok. I’ll check that out. I already have unity, so I’ll probably check out your code. 

Link to comment
Share on other sites

Another question.

I was looking at the project in unity, and for the purpose of creating levels of my own, I was wondering how the tiles object works. Inside its hierarchy there are only a few objects, yet it stores all of the normal blocks. I found where the rest of the blocks with special properties are, but was wondering how to customize the tiles object to create a different level.

Link to comment
Share on other sites

10 minutes ago, Mage said:

I was looking at the project in unity, and for the purpose of creating levels of my own, I was wondering how the tiles object works. Inside its hierarchy there are only a few objects, yet it stores all of the normal blocks. I found where the rest of the blocks with special properties are, but was wondering how to customize the tiles object to create a different level.

That should be under Window>2D>Tile Palette. I'm using Rule Tiles, so each single tile in the palette represents all the different combinations of corners and sides.

The Tile Palette window knows what TileMap objects are active, and has a dropdown menu to choose which one to edit. Choose the tilemap you want to edit, choose a tile type, then choose a drawing mode (paintbrush, fill, rectangle, or erase). Then, just draw in the scene window, and the tilemap will be updated.

Link to comment
Share on other sites

4 minutes ago, DqwertyC said:

That should be under Window>2D>Tile Palette. I'm using Rule Tiles, so each single tile in the palette represents all the different combinations of corners and sides.

The Tile Palette window knows what TileMap objects are active, and has a dropdown menu to choose which one to edit. Choose the tilemap you want to edit, choose a tile type, then choose a drawing mode (paintbrush, fill, rectangle, or erase). Then, just draw in the scene window, and the tilemap will be updated.

okay. Thanks. Hopefully with the help of google I can figure that out.

Link to comment
Share on other sites

16 hours ago, Mage said:

Another consideration I had was to make a webGL build then host it from github pages. That would just give people an easier way to try it out without having to download an .exe

Thanks for the idea, I've updated the original post with a link to the demo!

Link to comment
Share on other sites

  • 3 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...