> For the complete documentation index, see [llms.txt](https://lados-organization.gitbook.io/goku/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://lados-organization.gitbook.io/goku/goku-game-engine_fr/chapitre-18-rendu-dun-arriere-plan-parallaxe.md).

# Chapitre 18 : Rendu d'un Arrière-Plan Parallaxe

Dans ce chapitre, nous abordons la mise en œuvre d'un arrière-plan parallaxe, une technique utilisée dans les jeux en 2D pour donner un sentiment de profondeur.&#x20;

La structure `ParallaxLayer` représente une seule couche dans notre arrière-plan parallaxe. Chaque couche a sa propre texture et sa vitesse, créant un sentiment de profondeur en se déplaçant plus lentement plus loin du spectateur. La structure `ParallaxBackground` gère plusieurs couches, en rendant et en mettant à jour chaque couche.&#x20;

La méthode `render` d'une `ParallaxLayer` gère le dessin de la texture de la couche à l'écran, en tenant compte du décalage de la couche et de la position de la caméra. La méthode `update` ajuste le décalage de la couche en fonction de sa vitesse et du temps écoulé.&#x20;

Les méthodes `render` et `update` de `ParallaxBackground` appellent simplement les méthodes correspondantes de chacune de ses couches.


---

# 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://lados-organization.gitbook.io/goku/goku-game-engine_fr/chapitre-18-rendu-dun-arriere-plan-parallaxe.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.
