1
\$\begingroup\$

When I make a sidescroller game and what to move my character do I just offset the background, or is there another better way?

\$\endgroup\$
2
  • \$\begingroup\$ there is a property called viewport, you are better off searching 2D camera class for XNA \$\endgroup\$
    – dimitris93
    Commented Mar 1, 2015 at 0:24
  • \$\begingroup\$ david-gouveia.com/portfolio/… \$\endgroup\$ Commented Mar 2, 2015 at 19:07

1 Answer 1

1
\$\begingroup\$

A sidescroller involves you having 2 background images. When one's position crosses the screen it goes behind the other one and it keeps looping. This involves using the Rectangle struct. Here's a video I have for your problem exactly.

https://www.youtube.com/watch?v=NZEzD0GvImg

\$\endgroup\$

You must log in to answer this question.