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

Username:   Password: 
 RegisterRegister   
 View.Update 'Lag' issues
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Frost35




PostPosted: Tue Apr 25, 2006 10:00 pm   Post subject: View.Update 'Lag' issues

I'm trying to make the animations smooth, and to stop the flickering, but when I add in the View.Update, it causes everything to go slower. Am I doing something wrong? :S

Thanks.



paint 1.1VU.t
 Description:

Download
 Filename:  paint 1.1VU.t
 Filesize:  15.81 KB
 Downloaded:  76 Time(s)

Sponsor
Sponsor
Sponsor
sponsor
[Gandalf]




PostPosted: Wed Apr 26, 2006 12:11 am   Post subject: (No subject)

From a 10 second glance (don't have Turing installed here), it doesn't look like it. You should note that View.Update causes your program to slow down no matter what, there's no getting around it.

Also, something you should consider is that you don't need to have your procedures near the end of your program, using the forward keyword. Just put them near the beginning, as is common practice and as is convenient.
codemage




PostPosted: Wed Apr 26, 2006 8:12 am   Post subject: (No subject)

I don't find it slow at all - are you on an older system?

Oh - looks fantastic, by the way!
Frost35




PostPosted: Wed Apr 26, 2006 10:35 am   Post subject: (No subject)

ya... I just ran it on another comp, and its working fine. how... odd

this comp has a P4 2.4, and 256MB of ram (I think).

My comp at home has 3.0 P4, and 768 MB of ram. So its very odd. I guess I have to clean my comp again Razz

I have 2 copies of it, so when this gets marked Ill make sure to put both in.. just incase.

Could it be that my turing version at home is 4.0.3, and this one is 4.0.5 ?

very weird, because I suspect this comp (school comp) to have more spyware and garbage on it...

btw, I was using the forward procedures so I could sort all my procedures properly and clean my code up (it was 650 lines, so I did pretty good). Took your advice and removed the forwards.

Thx guys.
neufelni




PostPosted: Wed Apr 26, 2006 10:49 am   Post subject: (No subject)

Great program. It is so much better than the paint program that I once made.
Andy




PostPosted: Wed Apr 26, 2006 10:56 am   Post subject: (No subject)

a copule of things

make the drawline function previewable

your drawfill isnt doing what it's supposed to go
http://www.compsci.ca/v2/viewtopic.php?t=8001&highlight=drawfill

the spraypaint is supposed to be a circle
http://www.compsci.ca/v2/viewtopic.php?t=3036

and yoru pencil program is supposed to draw continuous lines... i'll let you figure that one out yourself
TokenHerbz




PostPosted: Wed Apr 26, 2006 3:28 pm   Post subject: (No subject)

sooooooooooo slowwwwwwwwww
Clayton




PostPosted: Wed Apr 26, 2006 4:18 pm   Post subject: (No subject)

something you could look into, is View.UpdateArea, this will allow you to update the parts of the screen that something is happening
code:

var x, y : int:=0
loop
    cls
    Draw.FillBox (x, y, x + 10, y + 10, black)
    View.UpdateArea (x - 2, y - 2, x + 12, y + 12)
    delay (20)
    x += 1
    y += 1
end loop

what this does move the box im drawing, and updates the screen around it, making the program run much faster, try it and see if that speeds it up (it should!)
Sponsor
Sponsor
Sponsor
sponsor
Frost35




PostPosted: Wed Apr 26, 2006 5:13 pm   Post subject: (No subject)

Thx SuperFreak82. Yeah I saw something on the earlier, but as it stands I can't implement that yet, because at my house I'm only running 4.0.3, have to get the newer version first.
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  [ 9 Posts ]
Jump to:   


Style:  
Search: