• Register

Wheelless is a super fast 2D racing game featuring a futuristic sci-fi universe!

Post news Report RSS Devblog #2 - Design post: Ship stats

Learn more about the gameplay of Wheelless! In this Design post I'll explain what makes the spaceships differents to play from each others.

Posted by on

Hi!

For today we made a small video explaining the in depth gameplay for spaceships: stats.


What are thoses?

The spaceships in Wheelless uses the basics of the Unity engine physics called Rigidbody2D (because it's 2D physics). But there wouldn't be diversity with just mass and linear drag tweaking: that's why we came up with differents stats.

Each stat is supposed to change a little bit of the gameplay without monopolizing it. It is also working together with the others stats: that's the first step toward balance.

Note: We will not discuss health, armor and shield here because it will be adressed in another blog post.

We have currently six main gameplay changing stats:

  1. Top speed
  2. Acceleration
  3. Torque speed
  4. Handle
  5. Off road
  6. Fuel

And one secondary stat that manages every main stats and two hidden: Mass.

The ship stats looks like that in Unity
The ship stats looks like that in Unity

Mass

Mass is the weight of the spaceships. The heavier, the bullier! Mass also affect the boost power (aka the speed multiplier when boosting) and the fuel consumption (aka the fuel per seconds burned when boosting).

The medium mass unit is 50, and can differs by ~40, meaning a ship can be between 10 and 90 mass units.

Mass also changes (by really not much) every other stats.

Top Speed

Top speed is an arbitrary speed limit that spaceship can't exceed at normal situations. We use the TopSpeed variable to calculate the boost speed, off-road speed, turbo speed etc.

The speed indicator on the HUD goes up to a total maximum top speed, which is the turbo speed. You only approach it when in turbo (obviously).

Wheelless__IngameScreenshot-SpeedIndicator-A


For the technical part, Unity don't actually apply a forceshowed on the speed indicator to the object. If we'd do that, the ship won't go any faster than a rolling potato! Why? Because of Mass and linear drag (which is by the way the Handle). You see, in engine, if you apply a force of 88 on an object weighting 50 MassUnit, and have a linear drag of say 1.25, you would go at a incredible 0,01408 m/s speed!

That's why we have an intermediary variable, called linearSpeed, it manages the real in-engine speed. After all, 88 is only an arbitrary target number, nothing much!

Our calculations goes like that, in simple words:

XSpeed = ((TopSpeed /2) * Mass) * 100; 
linearSpeed = XSpeed * Handle;

Now with an example:

//Let's calculate the most balanced spaceship:
[Mass = 50]
[TopSpeed = 45]
[Handle = 2.25]

//We'll do:
XSpeed = ((45 /2) * 50) * 100;
XSpeed = (22.5 * 50) * 100;
XSpeed = 1125 * 100;
XSpeed = 112500;

linearSpeed = 112500 * 2.25;
linearSpeed = 253125;
Yep, in engine, our most balanced spaceship goes to a whopping 253125 units per seconds.

I hope I didn't lost you there. Did I mentionned that I am firstly a programmer?

Acceleration

Acceleration came, in fact, in last. At the beggining, there was only top speed, torque and handle, and that was the handle, or linear drag, that controlled the pseudo-acceleration. But that wasn't enough; the engine didn't quite achieved to manage acceleration like I wanted (I needed the ship to lose some speed during turns, but they were recovering too fast!).

There is not much to say about it: it's the time between 0 and the TopSpeed value. When you have an Acceleration of 2 and a Top Speed of 50, it will takes exactly 2 seconds (on an ideal terrain type) to reach 50 m/s.

For the technical part, Acceleration is working like a damper for the linearSpeed. Depending on which % we are of the acceleration (if we thrust during 1 sec with an Acceleration of 2, we would be at 50% at this exact moment), we will be at a % of our linearSpeed.

Torque Speed

Wheelless - torque demonstration

In Wheelless, the spaceships turns automatically toward the cursor at a certain speed. Unlike the TopSpeed, which is the linear speed, the torque, or angular speed, is not totally managed by the physics of Unity.

As Quaternions (the way Unity handles rotations) are really, really complicated, I'll just say that the ship turns at a rate of some angle degrees amount per frames.

Handle

I know you were eager to know more about that little one.

Well, speaking of little, handle is litteraly the linear drag of the Rigidbody2D of Unity.

Yep.

Just a copy/paste of an arbitrary number.

In this tiny little box over there:

Handle-peekaboo
I'm not even sorry

Off Road

This one is also pretty simple. When your ship enter a certain area (called OffRoad Zones), it will lose a certain % of its speed, based partly by its Off Road value, and also by the terrain type under it. For instance, dirt will slow you down by 35% if you have a high Off Road value, or more than 50% if you have a bad Off Road value.

Offroad zones (here in green) are usually located near stripped bandsOffroad zones (here in green) are usually located near stripped bands

There is a lot more to talk about off roads, zones and terrain types, but that will also be in another blog post.

Fuel

The fuel is a certain amount that is used when boosting. When you are boosting, the fuel will go down by a certain amount per second, called consumptionRate. It is one of the hidden stat that changes with the mass of the ship. In a nutshell: you can use less fuel per seconds when you are lighter.

At the beggining of a race you start with an empty reservoir. You can only recharge your fuel bar by moving: it is explained in lore by intakes. Or something like that.

When you press the Boost key/button (assuming you have fuel left), you'll boost at a certain speed* and burn your fuel at the consumption rate.

When you're done, you will have a 1 second cooldown before the gauge start going up again, even if you're moving.

*the boosting speed, also used on boost pad (without using any fuel in this case), is the second hidden stat affected by Mass. It is roughly 125% of your Top Speed.

Equipments

Equipments are another way to manipulate ship specs. BUT, I am currently reworking the equipment designs, so it will be much different than the current equipment system (as per the Alpha 1.0.1), but also a lot more balanced, enjoyable and pratical! I will also do a blog post when it's ready.


Thank you so much for reading, I watch the visit counter on our website and here on IndieDB & itch.io everyday. By the time that article is written, we had 29 followers on twitter, 11 followers and more than 1189 visits here (75 on itch.io) and a total of 68 downloads (28 on itch.io). Thats a lot more than expected, and I'm really happy to see this project coming along.

See you next week for another blog post!

Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: