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

Username:   Password: 
 RegisterRegister   
 Images
Index -> Programming, Turing -> Turing Help
Goto page Previous  1, 2
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
TheGuardian001




PostPosted: Thu Jan 14, 2010 4:47 pm   Post subject: Re: Images

That's what you should be doing, all the time. you should never have only one variable to hold all of your images. You're better off having multiple variables than constantly loading them in.
Sponsor
Sponsor
Sponsor
sponsor
Turing_Gamer




PostPosted: Thu Jan 14, 2010 6:15 pm   Post subject: Re: Images

Each picture, as far as I know, has to be a different variable but the positioning system has to be the same
iii




PostPosted: Thu Jan 14, 2010 11:38 pm   Post subject: Re: Images

Quote:
View.Update should only ever be called once within a single section of the program.


Is that still true if you're using if else?
Zren




PostPosted: Thu Jan 14, 2010 11:53 pm   Post subject: Re: Images

iii @ Thu Jan 14, 2010 11:38 pm wrote:
Quote:
View.Update should only ever be called once within a single section of the program.


Is that still true if you're using if else?

And putting it after the if/else statement wouldn't work how? After all, both conditions [assumingly] will make you update the screen.
Turing_Gamer




PostPosted: Fri Jan 15, 2010 8:40 am   Post subject: Re: Images

He means like this...
Turing:
loop
    %%%RANDOM CODE%%%
    if leftpunch := true then
        Pic.Draw (left, x, y, picCopy)
    elsif leftpunch := false then
        Pic.Draw (normal, x, y, picCopy)
    end if
    View.Update
end loop
TheGuardian001




PostPosted: Fri Jan 15, 2010 8:47 am   Post subject: Re: Images

iii @ Thu Jan 14, 2010 11:38 pm wrote:

Is that still true if you're using if else?


As others said, you can simply put it after the if statement, however for the record yes, it is still true. The whole point of double buffering (offscreenonly) is that you only ever draw one thing to the screen, meaning you avoid the flickering caused by drawing being done at different times.

If you use View.Update more than once per section of code, you're defeating the purpose of using it at all, since you will be drawing multiple times and, if you do it often enough, flickering again.
VietUnity




PostPosted: Wed Jan 20, 2010 9:38 pm   Post subject: RE:Images

Would it be possible for me to use the Sprite commands? for example use Sprite.Hide to hide the standing picture during the actions and hide the action pictures when the character is standing.
apomb




PostPosted: Thu Jan 21, 2010 9:38 am   Post subject: RE:Images

Just as a side note, Chrome doesnt like me viewing this thread because one of the previous poster's avtars is hosted on ********.ca which is known to host malware.
Sponsor
Sponsor
Sponsor
sponsor
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

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


Style:  
Search: