Screen rotation

Talk about making games.

Screen rotation

Postby uberphear » Mon Apr 17, 2006 7:52 pm

Hi, I have read some topics here about rotating actors, but noticed that they most (all?) suggest that it is necessary to create an animation. My problem is slightly different:

I have a ball, which is "falling" (suffering y velocity -) towards the bottom of the screen. I have an actor which I tile to create a path/maze for the ball, but I wish to rotate the screen (or the actor with the tiles) so it is possible to rotate the screen with left/right arrow keys to allow the ball around a corner. Effectively, it would be like one of those 'tilting maze' games, except 2D and with rotation. I've tried using 'angle' but it doesn't do anything useful - any help would be greatly appreciated :)

If any of you have played On the Ball on the SNES, the effect I'm after is just like that.
uberphear
 
Posts: 1
Joined: Mon Apr 17, 2006 7:48 am
Score: 0 Give a positive score

Postby Game A Gogo » Mon Apr 17, 2006 9:27 pm

screen rotation is not availeble
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score

Postby DilloDude » Tue Apr 18, 2006 2:39 am

You can make an animation for the whole level with frames for each amount of rotation. Create a real variable: ang, and add keydown events to increase it or decrease it. On draw actor:
Code: Select all
if(ang>=360)
{
    ang-=360;
}
if(ang<0)
{
    ang+=360;
}
animpos=(ang/360)*nframes;

The hard part is rotationg around a particular location.
Image
User avatar
DilloDude
 
Posts: 866
Joined: Tue Jan 24, 2006 9:51 am
Location: Nyerellion
Score: 58 Give a positive score


Return to Game Development

Who is online

Users browsing this forum: No registered users and 1 guest