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

Username:   Password: 
 RegisterRegister   
 Help With Dance Dance Rev.
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Uber Tankz




PostPosted: Fri May 26, 2006 3:31 pm   Post subject: Help With Dance Dance Rev.

Okay, a while back I posted that I was going to try somthing else, somthing easier, than DDR. Well I lied. I wanna keep doing it but now I need some more help... The background I have just writes over everything. How do I turn and animated background into a sprite...What would I use?
Sponsor
Sponsor
Sponsor
sponsor
Clayton




PostPosted: Fri May 26, 2006 3:43 pm   Post subject: (No subject)

what kind of background are you using? are you using Pic.Draw? plz post a more detailed explanation of your problem, my suggestion would be to use Pic.Draw, if you arent sure how check the Turing Walkthrough, ill give you the example however that you should use in your program:

Turing:

var myPic:int:=Pic.FileNew("whatever.jpg")
Pic.Draw(myPic,x,y,picUnderMerge)


this draws your pic underneath everything else on the screen try it and see if it works
Guest




PostPosted: Fri May 26, 2006 4:01 pm   Post subject: (No subject)

How are you going to do a DDR? Using parallel get?
Uber Tankz




PostPosted: Fri May 26, 2006 4:19 pm   Post subject: Type

This is what im gunna use
code:
const startValue := 30
const maxValue := 70
const incrementAmount := 0.1
const maxDist := 700

procedure DrawLine (x, y : real, angle : real, dist : real, inc : real)
    colour (yellow)
    Draw.ThickLine (round (x), round (y), round (x + cosd (angle) * dist), round (y + sind (angle) * dist), 1, black)
    if dist > maxDist then
        return
    end if
    DrawLine (round (x + cosd (angle) * dist), round (y + sind (angle) * dist), angle + inc, dist + 1, inc)
end DrawLine

View.Set ('graphics:700,500')
View.Set ('offscreenonly')
View.Set ('nobuttonbar')
View.Set ('position:centre;centre')


cls
var a : real := startValue
loop
Text.ColourBack (Rand.Int (32,35))
    a += incrementAmount
    if a > maxValue then
        a := startValue
    end if

    DrawLine (maxx div 2, maxy div 2, 0, 0, a)
    View.Update
    Time.DelaySinceLast (50)
    cls
end loop
Uber Tankz




PostPosted: Fri May 26, 2006 5:35 pm   Post subject: Another Problem...

OK, since its DDR there has to be music right? well i tried to use teh Music.PlayFile thinger but the program didnt continue until thr music was over... is there any way i can make it so that teh music plays and teh program runs?
Uber Tankz




PostPosted: Fri May 26, 2006 5:36 pm   Post subject: errg

Sorry about all the bad spelling mistakes...
Guest




PostPosted: Fri May 26, 2006 6:38 pm   Post subject: (No subject)

Instead of using Music.PlayFile, use Music.PlayFileReturn. It's basically the same thing as Music.PlayFile in a process =)
Uber Tankz




PostPosted: Sun May 28, 2006 8:30 pm   Post subject: thanks

aight coo', ill try that Very Happy
Sponsor
Sponsor
Sponsor
sponsor
BenLi




PostPosted: Mon May 29, 2006 4:19 pm   Post subject: (No subject)

I think Music.PlayFileLoop will also play it while the program is running
Uber Tankz




PostPosted: Mon May 29, 2006 5:05 pm   Post subject: kay

thanks, i think ill use that instead of the process, seems better. but does anyone know how to do the sprite thing? does anyone have suggestions?
Tony




PostPosted: Mon May 29, 2006 5:41 pm   Post subject: (No subject)

you just need an ordered draw logic
code:

loop
draw_background
draw_middleground
draw_topcontent

View.Update
cls
end loop

Where middleground would be your arrows and topcontent are things like score and what not. Just figure out your layers.

if you want your background to animate, have a procedure keep track of a frame number, and have it increment each time the procedure is called. You'd probably need to store the value somewhere outside of the procedure itself though.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Uber Tankz




PostPosted: Mon May 29, 2006 6:49 pm   Post subject: wait, what?

um, sorry i didnt really catch that, due to me sucking. But is there a page you could direct me to or somthing in the turing reference that could help me more?
Tony




PostPosted: Mon May 29, 2006 6:55 pm   Post subject: (No subject)

The Turing Walkthrough generally helps with "sucking"

If it doesn't, then you'd have to be more specific
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Uber Tankz




PostPosted: Tue May 30, 2006 10:08 pm   Post subject: cool

kay thanks, i actually learnt a lot form the walkthrough. i hope not to be asking so many questions now. Very Happy
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  [ 14 Posts ]
Jump to:   


Style:  
Search: