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

Username:   Password: 
 RegisterRegister   
 View.Update isn't working (Full Program Attached)
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Pearse




PostPosted: Tue Jan 19, 2010 2:11 pm   Post subject: View.Update isn't working (Full Program Attached)

What is it you are trying to achieve?
Be able to move around my character without leaving a trace of him behind.


What is the problem you are having?
The characer is leaving a trace in the second area. It works fine in the first area though. To get to the second area just go past the bridge and go up. I am aware of the collision issues on the bridge but theres a small area you can still get through on the bridge (left side).

Describe what you have tried to solve this problem
Putting View.Update 's everywhere


Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)
the program is attached


Please specify what version of Turing you are using
4.1.1



SummativeRPG.zip
 Description:

Download
 Filename:  SummativeRPG.zip
 Filesize:  230.89 KB
 Downloaded:  59 Time(s)

Sponsor
Sponsor
Sponsor
sponsor
TerranceN




PostPosted: Tue Jan 19, 2010 4:50 pm   Post subject: RE:View.Update isn\'t working (Full Program Attached)

First of all, thank you for including the pictures. It makes it much easier to help you when we can run the program. Now on to your problem.

You are not clearing the screen, so the image never gets removed unless it is drawn over, like in the first area.

Also, Instead of putting a View.Update after each time drawing something, put it after drawing everything.
TerranceN




PostPosted: Tue Jan 19, 2010 4:56 pm   Post subject: RE:View.Update isn\'t working (Full Program Attached)

First of all, thank you for including the pictures. It makes it much easier to help you when we can run the program. Now on to your problem.

You are not redrawing the background every frame, like you did in area1, therefore the previous image of the player can still be seen, which creates that trail.

Also, Instead of putting a View.Update after each time drawing something, put it after drawing everything.

EDIT : oops, I tried to post the first reply, then compsci was not responding and I made a mistake, so I changed and tried to post again, and it ended up sending two posts, sorry
Pearse




PostPosted: Tue Jan 19, 2010 8:32 pm   Post subject: RE:View.Update isn\'t working (Full Program Attached)

If and when i clear the screen at the beginning of the loop, an intense flicker occurs, even if i put View.Update after it. Thank you for your reply but i still need help.

I hope this isn't asking for too much, but if you can, test your suggestion inside my code and see how it goes, but i would still rather you give me a reply that hasn't been tested then no reply at all...

And if you would be so kind to even explain it to me.
TheGuardian001




PostPosted: Tue Jan 19, 2010 8:47 pm   Post subject: Re: RE:View.Update isn\'t working (Full Program Attached)

Pearse @ Tue Jan 19, 2010 8:32 pm wrote:
If and when i clear the screen at the beginning of the loop, an intense flicker occurs, even if i put View.Update after it. Thank you for your reply but i still need help.


This is where the second part of their advice comes in. you should only be calling View.Update once, after you have completed all of the drawing. Instead of having a View.Update in every single if, don't have any View.Updates inside of the ifs, and have one at the very end of the loop, followed by a cls.
Pearse




PostPosted: Tue Jan 19, 2010 9:24 pm   Post subject: Re: View.Update isn't working (Full Program Attached)

Ohhh.. thanks a lot to both of you.
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 1 of 1  [ 6 Posts ]
Jump to:   


Style:  
Search: