Game Editing in a Nutshell. (if the nutshell is Newton’s apple)

by kaminazo

Editing games is a test of your creative problem-solving skills. First you create a problem, then you solve it. Sometimes, any way it’s possible. My recent endeavour is gravity physics.

I’ve tried to tackle the problem before for the Bottomless Pit mod for Skyrim that I made a couple of years ago in the Creation Kit.

Unfortunately, the gravity in the Creation Kit is jacked. It’s an uneditable, constant downward force with acceleration and no terminal velocity.

Imagine a person jumping from an airplane. As they fall they accelerate, reaching blinding speed. Eventually they’re moving so fast that even wind can’t push them. Then the body crashes into the earth with such force that it obliterates the planet.

That’s what the gravity in Skyrim is like.

I solved that problem by using water to slow the player down at certain intervals. That way the player still has enough reaction time to move and avoid obstacles without killing them.

This is my more recent example:

I need to cheat the vanilla gravity in Unity. Why? The baked-in gravity is mono-directional: only down. I need a small planet (sphere) that the player can walk around the surface of. Normally, if the player were standing on a sphere and starts to walk, they’d just slide off the curved slope and plummet into an endless chasm. I need the player to “stick” to the surface by changing the gravitational pull from the vanilla position “down” to the sphere’s “center”. Thus, everything will pull toward a single omnidirectional point and collide with the surface of the sphere as if it were the ground.

The curved surface of a sphere is much more problematic than the standard flat plane with a distant horizon line. Everything operates on elipses and orbits, rather than straight lines. Deviating from the standard will create tons of other problems. Despite the new problems it creates, we’ll start with this one.

One problem at a time…baby steps.

Also, K.I.S.S. (keep it simple, stupid)

Now I have to figure out how to solve the gravity problem by any means before I can move on. I’ll have to get creative. Luckily almost everything has been done before in games. It’s a vastly oversaturated field. That means lots of competition, but lots of help, too.

Google is my best friend. And it didn’t take long (a couple hours) to find a solution.

Unity has ways of creating faux gravity by turning it off completely and applying “force” to objects instead. This is achieved with custom scripts. Once I get the gravity working, I can tackle the camera and player navigation.

These functionality problems/solutions are like branches of a tree that bind a game together. I’m doing the trunk now, which will sprout other mini-problems once i get further along. It’s difficult because, in the end, a game is judged on its look and “fun” factor, which are subjective and largely undefined in the gaming community. What is fun? What looks good? These are impossible questions to answer for everyone.

The function of a game, however, needs to be flawless and inherent from the start. The Japanese have a saying for this: “omotenashi.” It means that everything is already done for you, laid out perfectly like the rails of a train, and you are just along for the ride. The physics, controls, and overall functionality of a game MUST be “omotenashi”. Things like bad rag doll physics, “broken” items, exploitable glitches, server errors, and CTDs are all common examples of a lack of “omotenashi”. When this happens, a game is laughably bad and likely unplayable. (Skate2) It only takes one poorly executed function to ruin a game. When done right, the player doesn’t even know it’s there. (insert “Game of the Year” title here) That means the hard work and perfect execution of game editing usually gets overlooked. Then it’s up to the artists and designers to make or break the game with “fun” and “beauty.” But that’s all in the eye of the be-gamer.

So let’s roll up our sleeves and make Newton’s apple fall correctly…and do it so flawlessly that it’s invisible! Then we can worry about polishing the apple to a shiny, red color that turns into a giant gruesome zombie and rips Newton’s arm off unless the player can shoot it fast enough. Then all the 15-year-old whiteboy gamers can take the rest for granted.

That’s game editing in a nutshell.

Advertisements