> For the complete documentation index, see [llms.txt](https://jeremy-yeh.gitbook.io/carno-run/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://jeremy-yeh.gitbook.io/carno-run/production/game-mechanics/difficulty-scaling.md).

# Difficulty Scaling

Difficulty comes in the form of movement speed only in this game. I could have introduced other methods of increasing difficulty such as a narrower margin for error, different types of or dynamic obstacles, but I decided to keep it simple for this project.

Movement speed scales up exponentially against level, which means that with each level piece spawned, movement speed will increase.

An exponential scale is chosen as it increases the movement speed by a large amount in the beginning, which takes the player out of the "early-game" warm-up fairly quickly, but gives sufficient time for the player to get used to the game. Another benefit to it was that the scale plateaus as it reaches an asymptote, which means the game cannot get to a point of impossible or unplayable.

<figure><img src="/files/711quCK55LekLUhzs2ek" alt=""><figcaption><p>Expnential model for speed scaling</p></figcaption></figure>

The maximum playable movement speed was determined through [prototyping](/carno-run/pre-production/greyboxing.md) and normalized to 1.

I set the starting speed at 0.6, which was a comfortable but slow pace to the game, and as seen in the graph above, it moved rapidly upwards towards the asymptote of 1 as the number of levels increases.

The equation used was: $$speed = -0.4e^{-0.5levels}+1$$


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://jeremy-yeh.gitbook.io/carno-run/production/game-mechanics/difficulty-scaling.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
