Frage

how can I render whats right outside of the screen on the left side? Like in Super Mario Bros for example? I want to move clouds endless over the screen. Here's an example of what I mean: http://image-upload.de/file/nSzNhe/612a71bf0d.png

War es hilfreich?

Lösung

You simply create the entity with coordinates that are offscreen, and have a draw function that draws the entities, and when they move onscreen, they will be drawn. Might also want to make sure they get deleted once the go offscreen again though.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top