Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Rotating a tiled background?

Author
Message
TheGroggyOne
17
Years of Service
User Offline
Joined: 11th Apr 2009
Location:
Posted: 29th Jan 2011 13:31
How would I go about rotating a tiled background?

The player object sits in the middle of the screen and faces the top. I need the 'world' and objects to rotate around the center of the screen as the player object moves through it.

I started with a 5000x5000 background sprite and it worked well enough. Rotating it under the player object. The problem with this method is I'll eventually need a larger map and hand drawing a map that size is cumbersome.

I tried tiling dynamically and using 8 directions, which works too, but I have to rotate the player object and it ruins the feel of the game.

I've been experiment with individual tiles, the problem I can't get around is lining the tiles up correctly. I've been using an arc and offsetting to the center of the tile and rotating it. I can get 1 tile to go around the player object correctly, but the second tile keeps overlapping the first tile.

thanks for any help
Pincho Paxton
23
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 29th Jan 2011 14:34 Edited at: 29th Jan 2011 14:35
It would be easier to rotate the camera surely? If you turn your player with the camera it will just look like the background is rotating.

Login to post a reply

Server time is: 2026-07-16 14:59:12
Your offset time is: 2026-07-16 14:59:12