
-----------------------------------
Uber Tankz
Fri May 26, 2006 3:31 pm

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?

-----------------------------------
Clayton
Fri May 26, 2006 3:43 pm


-----------------------------------
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:


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

-----------------------------------

Fri May 26, 2006 4:01 pm


-----------------------------------
How are you going to do a DDR? Using parallel get?

-----------------------------------
Uber Tankz
Fri May 26, 2006 4:19 pm

Type
-----------------------------------
This is what im gunna use 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
Fri May 26, 2006 5:35 pm

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
Fri May 26, 2006 5:36 pm

errg
-----------------------------------
Sorry about all the bad spelling mistakes...

-----------------------------------

Fri May 26, 2006 6:38 pm


-----------------------------------
Instead of using Music.PlayFile, use Music.PlayFileReturn. It's basically the same thing as Music.PlayFile in a process =)

-----------------------------------
Uber Tankz
Sun May 28, 2006 8:30 pm

thanks
-----------------------------------
aight coo', ill try that  :D

-----------------------------------
BenLi
Mon May 29, 2006 4:19 pm


-----------------------------------
I think Music.PlayFileLoop will also play it while the program is running

-----------------------------------
Uber Tankz
Mon May 29, 2006 5:05 pm

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
Mon May 29, 2006 5:41 pm


-----------------------------------
you just need an ordered draw logic

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.

-----------------------------------
Uber Tankz
Mon May 29, 2006 6:49 pm

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
Mon May 29, 2006 6:55 pm


-----------------------------------
The Turing Walkthrough generally helps with "sucking"

If it doesn't, then you'd have to be more specific

-----------------------------------
Uber Tankz
Tue May 30, 2006 10:08 pm

cool
-----------------------------------
kay thanks, i actually learnt a lot form the walkthrough. i hope not to be asking so many questions now. :D
