Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 [Tutorial] Sprites
Index -> Programming, Turing -> Turing Tutorials
Goto page Previous  1, 2, 3
View previous topic Printable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
sarm2005




PostPosted: Mon Mar 10, 2008 6:32 pm   Post subject: Re: [Tutorial] Sprites

Is there anyway to rotate a sprite?
Sponsor
Sponsor
Sponsor
sponsor
riveryu




PostPosted: Wed Mar 12, 2008 9:56 pm   Post subject: RE:[Tutorial] Sprites

I dont think there is a way to rotate a sprite.
You would have to rotate the picture used to create that sprite and redisplay it...
Maybe you can rotate the background instead in a game but thats cheating...
Sean




PostPosted: Thu Mar 13, 2008 7:02 am   Post subject: Re: [Tutorial] Sprites

We've already answered this before. There is no way to rotate spirtes, you would have to use Pic.Rotate.
Mackie




PostPosted: Thu Mar 13, 2008 10:56 am   Post subject: RE:[Tutorial] Sprites

No Vilament, this is a sprite. Not an image.
CreatedByGabe




PostPosted: Sun Jun 28, 2015 7:40 pm   Post subject: RE:[Tutorial] Sprites

WOW! Thanks bro! Im making a video-game with turing and this will really help!
CreatedByGabe




PostPosted: Sun Jun 28, 2015 8:02 pm   Post subject: RE:[Tutorial] Sprites

Is the code up top not working??
Use this one:

code:

var pic1 : int := Pic.FileNew ("BossDude.bmp")
var sprite1 : int := Sprite.New (pic1)
var x, y : int := 0
var centered : boolean := false
var characters :string (1)

Sprite.SetHeight (sprite1, 1)

loop
setscreen ("nocursor")
getch (characters)
    if characters = KEY_UP_ARROW then
        y += 10
    end if
    if characters = KEY_DOWN_ARROW then
        y -= 10
    end if
    if characters = KEY_LEFT_ARROW then
        x -= 10
    end if
    if characters = KEY_RIGHT_ARROW then
        x += 10
    end if
    Sprite.SetPosition (sprite1, x, y, centered)
    Sprite.Show (sprite1)

end loop
Display posts from previous:   
   Index -> Programming, Turing -> Turing Tutorials
View previous topic Tell A FriendPrintable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 3 of 3  [ 36 Posts ]
Goto page Previous  1, 2, 3
Jump to:   


Style:  
Search: