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

Username:   Password: 
 RegisterRegister   
 Jaxc needs one more thing to help
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Jacx




PostPosted: Sun Jan 23, 2005 7:01 pm   Post subject: Jaxc needs one more thing to help

Hey im having problems with the speed in my game and i cant figure out how to fix it, this is what i have so far


code:
var s :int := 40
var m :int := 0
proc lvl2
    var h, v : int
       var m := m + 10
 loop
 delay (s - m) %this controls the speed
        cls
end loop
end lvl2



I have that in with the rst of my game, I want to make it so when you go to the next level, or touch teh "box" it basically resets the level, but with the speed up by one (or the m value down by one so it subtracts from the speed value making teh delay less)

code:
if whatdotcolor (h, v + 20) = 0 then
            cls
            put "THIS IS THE END OF THIS TEST"
            delay (1000)
            lvl2
        end if
        if whatdotcolor (h, v - 20) = 0 then
            cls
            put "THIS IS THE END OF THIS TEST"
            delay (1000)
            lvl2
        end if
        if whatdotcolor (h + 20, v) = 0 then
            cls
            put "THIS IS THE END"
            delay (1000)
            lvl2
        end if
        if whatdotcolor (h - 20, v) = 0 then
            cls
            put "THIS IS THE END"
            delay (1000)
            lvl2
        end if



Can anyone help me out here??
Sponsor
Sponsor
Sponsor
sponsor
Cervantes




PostPosted: Sun Jan 23, 2005 7:12 pm   Post subject: (No subject)

Turing:

var standardDelay := 20
var levelDelayReduction := 3
var level := 1
loop
if victory then
  cls
  put "You win"
  level += 1
end if
delay (standardDelay - levelDelayReduction * level)
end loop


If you want to redraw the level (if it's a platformer, for example), you'll have to do that as well. Procedures containing all the drawing commands would work well enough for that.
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  [ 2 Posts ]
Jump to:   


Style:  
Search: