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

Username:   Password: 
 RegisterRegister   
 Can I Use This Picture?
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
SunsFan13




PostPosted: Tue Jun 03, 2008 2:17 pm   Post subject: Can I Use This Picture?

Is there ANY way that I can use this picture?

Posted Image, might have been reduced in size. Click Image to view fullscreen.

Obviously I can't use Pic.ScreenLoad due to the fact that its a GIF, is there another piece of code like screenload that I'm perhaps over looking?
Sponsor
Sponsor
Sponsor
sponsor
apomb




PostPosted: Tue Jun 03, 2008 2:36 pm   Post subject: RE:Can I Use This Picture?

loading screens arent for show, however, if you wanted to make it look the same in turing, set the image (sans moving black oval) as your background, then simply Draw.Filloval and loop it to do the same thing that one is doing.
SunsFan13




PostPosted: Tue Jun 03, 2008 3:39 pm   Post subject: Re: RE:Can I Use This Picture?

apomb @ Tue Jun 03, 2008 2:36 pm wrote:
loading screens arent for show, however, if you wanted to make it look the same in turing, set the image (sans moving black oval) as your background, then simply Draw.Filloval and loop it to do the same thing that one is doing.


Okay, I've got that.. Sort of.
I can make it draw as many ovals as I want, anywhere I want, but how do I get it so theres only ONE "moving"?
Do I have to make the loading bar a single colour so that I can just simply re-draw the oval over top of its self?
apomb




PostPosted: Tue Jun 03, 2008 3:43 pm   Post subject: RE:Can I Use This Picture?

yeah, thats probably the best idea, i didnt really notice that the loading bar was a gradient.

you'll need to draw the black one, then clear it, move the co-ords, and draw it again in the next position.
jeffgreco13




PostPosted: Tue Jun 03, 2008 4:03 pm   Post subject: Re: Can I Use This Picture?

Since you want to animate the black circle across the bar you're going to want to play around with the "View" component of Turing. To animate, essentially you have to draw a screen then clear it then draw it again with the ball moved over a bit, then again, then again. Using a loop to change the x-coord and then clear-screen (cls) you could do that, but watch the insane flickering you'll see.

code:

var cX:int:= 100 //starting x value
loop
if cX>=200 then
cx:=100
cls
else
Draw.FillOval(cX,50,10,10,black)
cX++
cls
end if
end loop


That will make it move but most likely have you seizure. So my advice is to play around with this tutorial:

http://compsci.ca/v3/viewtopic.php?t=12533

and use one of the View components to set a static background, ie) the main jeopardy picture. Then have the loop included with View.Update
SunsFan13




PostPosted: Tue Jun 03, 2008 4:06 pm   Post subject: Re: Can I Use This Picture?

Oh man, I'll deffinatly give what you posted a shot, as this is what I have right now:

code:

setscreen ( "graphics:850;510" )

Pic.ScreenLoad ("Jeopardy.bmp", 0, 0, picCopy)
loop
Draw.FillOval (217,23,5,9,black)
delay (150)
Draw.FillOval (217,23,5,9, gray)
delay (150)
Draw.FillOval (226,23,5,9,black)
delay (150)
Draw.FillOval (226,23,5,9, gray)
delay (150)
Draw.FillOval (236,23,5,9,black)
delay (150)
Draw.FillOval (236,23,5,9, gray)
delay (150)
Draw.FillOval (246,23,5,9,black)
delay (150)
Draw.FillOval (246,23,5,9, gray)
delay (150)
Draw.FillOval (256,23,5,9,black)
delay (150)
Draw.FillOval (256,23,5,9, gray)
delay (150)
Draw.FillOval (266,23,5,9,black)
delay (150)
Draw.FillOval (266,23,5,9, gray)
delay (150)
Draw.FillOval (276,23,5,9,black)
delay (150)
Draw.FillOval (276,23,5,9, gray)
delay (150)
Draw.FillOval (286,23,5,9,black)
delay (150)
Draw.FillOval (286,23,5,9, gray)
delay (150)
Draw.FillOval (296,23,5,9,black)
delay (150)
Draw.FillOval (296,23,5,9, gray)
delay (150)
Draw.FillOval (306,23,5,9,black)
delay (150)
Draw.FillOval (306,23,5,9, gray)
delay (150)
Draw.FillOval (316,23,5,9,black)
delay (150)
Draw.FillOval (316,23,5,9, gray)
delay (150)
Draw.FillOval (326,23,5,9,black)
delay (150)
Draw.FillOval (326,23,5,9, gray)
delay (150)
Draw.FillOval (336,23,5,9,black)
delay (150)
Draw.FillOval (336,23,5,9, gray)
delay (150)
Draw.FillOval (346,23,5,9,black)
delay (150)
Draw.FillOval (346,23,5,9, gray)
delay (150)
Draw.FillOval (356,23,5,9,black)
delay (150)
Draw.FillOval (356,23,5,9, gray)
delay (150)
Draw.FillOval (366,23,5,9,black)
delay (150)
Draw.FillOval (366,23,5,9, gray)
delay (150)
Draw.FillOval (376,23,5,9,black)
delay (150)
Draw.FillOval (376,23,5,9, gray)
delay (150)
Draw.FillOval (386,23,5,9,black)
delay (150)
Draw.FillOval (386,23,5,9, gray)
delay (150)
Draw.FillOval (396,23,5,9,black)
delay (150)
Draw.FillOval (396,23,5,9, gray)
delay (150)
Draw.FillOval (406,23,5,9,black)
delay (150)
Draw.FillOval (406,23,5,9, gray)
delay (150)
Draw.FillOval (416,23,5,9,black)
delay (150)
Draw.FillOval (416,23,5,9, gray)
delay (150)
Draw.FillOval (426,23,5,9,black)
delay (150)
Draw.FillOval (426,23,5,9, gray)
delay (150)
Draw.FillOval (436,23,5,9,black)
delay (150)
Draw.FillOval (436,23,5,9, gray)
delay (150)
end loop


It works, but its clearly not efficient.
richcash




PostPosted: Tue Jun 03, 2008 4:11 pm   Post subject: Re: Can I Use This Picture?

You can use a for loop to shorten those to two Draw.FillOval's ().

EDIT ...and one delay.

You can use for loops like this in turing.
Turing:
for x : 216 .. 436 by 10
end for

Can you figure it out?
Sean




PostPosted: Tue Jun 03, 2008 4:27 pm   Post subject: Re: Can I Use This Picture?

Turing:

Draw.FillBox (100,100,250,150,gray)

for loading : 100 .. 250
     delay (50)
     Draw.FillBox (loading,100,loading,150,black)
end for


Or you can make a loading bar like this, however, in retrospect, loading bars are pointless, when you are not loading anything.


Also, this is a rough example, not a good one to be using anyways. Just a reference.
Sponsor
Sponsor
Sponsor
sponsor
SNIPERDUDE




PostPosted: Wed Jun 04, 2008 6:46 am   Post subject: RE:Can I Use This Picture?

I don't know why no one has replied this way,
but PLEASE don't use fake loading bars!

They make the user wait for no reason and it is a waste of attention.

I am only saying this because when you do post your programme, you will be attacked at for that.
Sean




PostPosted: Wed Jun 04, 2008 7:00 am   Post subject: Re: Can I Use This Picture?

Sean @ Tue Jun 03, 2008 4:27 pm wrote:
Turing:

Draw.FillBox (100,100,250,150,gray)

for loading : 100 .. 250
     delay (50)
     Draw.FillBox (loading,100,loading,150,black)
end for


Or you can make a loading bar like this, however, in retrospect, loading bars are pointless, when you are not loading anything.


Also, this is a rough example, not a good one to be using anyways. Just a reference.


Read the full posts Sniper, you'd see it.
SNIPERDUDE




PostPosted: Wed Jun 04, 2008 9:17 am   Post subject: RE:Can I Use This Picture?

sorry, saw code for it and was thinking - why?
apomb




PostPosted: Wed Jun 04, 2008 9:27 am   Post subject: RE:Can I Use This Picture?

No one really knows whether or not this program will indeed require a loading bar. so until there is a full program that we can see for sure if one is needed or not, try helping with the question at hand.
SunsFan13




PostPosted: Wed Jun 04, 2008 10:01 am   Post subject: Re: Can I Use This Picture?

It does not require a loading bar, but our teacher basically said if we can include one, it will up our mark, so whatever.
Anyway, I'm finished, and simplified the code.

code:

setscreen ("graphics:850;510")

Pic.ScreenLoad ("jeopardyloadingbar.bmp", 0, 0, picCopy)
var y:int:=0
for x:0..220 by 10
    Draw.FillOval (217+x, 23, 5, 9, y)
    delay (150)
    Draw.FillOval (217+x, 23, 5, 9, grey)
    delay (150)
   y:=y+1
   if y > 7 then
   y:=0
   end if
end for


Thanks to all those that helped.
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  [ 13 Posts ]
Jump to:   


Style:  
Search: