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

Username:   Password: 
 RegisterRegister   
 Make Background go forever (please help :S)
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
vagyb




PostPosted: Fri May 21, 2004 8:46 pm   Post subject: Make Background go forever (please help :S)

can someone plz tell me how i can make the background go forever in this small game i am making for a computer project. once u run the game u'll know what i mean. anyways thx alot whoever can find the answer.


space.zip
 Description:

Download
 Filename:  space.zip
 Filesize:  475.41 KB
 Downloaded:  106 Time(s)

Sponsor
Sponsor
Sponsor
sponsor
guruguru




PostPosted: Fri May 21, 2004 9:43 pm   Post subject: (No subject)

Since you have a fairly simple background, I would suggesting using colorback() to set the background to black and then load in the star picture overtop of the background. Then you move the x and y values of the stars instead of the whole background. When a star goes off the screen, its x values is restarted back to x (just and idea). This should work if you keep the background simple, and a uniform color. It's looking good, eager to see final program!
vagyb




PostPosted: Sat May 22, 2004 6:24 am   Post subject: (No subject)

oh i c, thx alot i think i understand what u mean even i'm a complete nooby lol. let me go try that rite now.
vagyb




PostPosted: Sat May 22, 2004 7:06 am   Post subject: (No subject)

damn once i took background off and i ran into some problems. could soemoen plz read the new code again and tell me how i can fix it, and also if you can post where i am supposed to add the stars/planet/


space.zip
 Description:

Download
 Filename:  space.zip
 Filesize:  48.3 KB
 Downloaded:  106 Time(s)

guruguru




PostPosted: Sat May 22, 2004 11:18 am   Post subject: (No subject)

I fixed some of your code and implemented my idea with comments. I didnt really get what you did in the second attachment so i edited the first one. If you dont understand anything please let me know and ill explain it. And if you dont like the idea w/e, its all good.


GAMEPART1.t
 Description:
The edited and commented code.

Download
 Filename:  GAMEPART1.t
 Filesize:  3.63 KB
 Downloaded:  97 Time(s)

vagyb




PostPosted: Sun May 23, 2004 12:27 pm   Post subject: (No subject)

wow thx alot man, i'll try to work from here lol.
vagyb




PostPosted: Sun May 23, 2004 12:35 pm   Post subject: (No subject)

omg wow its actually working pretty good. i'll try to finish this up over the weekend and post the final results. man again thx alot i couldn't have done this without u
vagyb




PostPosted: Mon May 24, 2004 12:49 pm   Post subject: (No subject)

hey okay well i think i figured this things out, but problem is the rocks that come every time are in the exact same place :S cuz the x and y values are the same, so i decided to put a random number from a specific range for each of the values, but the problem is that they come in random places only once i start the game. if you can plz check the code again and tell me how i can fix this i would apreciate it greatly


game.zip
 Description:

Download
 Filename:  game.zip
 Filesize:  10.25 KB
 Downloaded:  107 Time(s)

Sponsor
Sponsor
Sponsor
sponsor
Dan




PostPosted: Tue May 25, 2004 2:21 pm   Post subject: (No subject)

just add the radmoizing code in the ifs where u check if the rock whent off the screen.

Ex.

code:

if boulder1X + boulderWidth <= 0 then
         boulder1X := maxx
         randint (boulder1Y, 250, 350)
else
...........
Computer Science Canada Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more!
vagyb




PostPosted: Tue May 25, 2004 7:29 pm   Post subject: (No subject)

i'm so happy i'm almost done my game, and i somehow by some miracle made the whatdotcolor work during my computer class. the only problem is now that the detection is not very great, and sometimes it doesn't stop. i think the problem is that i can't match the red color in turing with the red color in paint. but this is just a guess. could someone plz try my game out and tell me how i can make the whatdotcolor better.


ps. guruguru i couldn't take the space thing out :S it was just too hard lol and i'm scared to make the program shorter cuz it mite not work normally anymore lol. i know i know it sounds very noobish Sad
guruguru




PostPosted: Tue May 25, 2004 9:06 pm   Post subject: (No subject)

yagyb: PM me the code and I'll see what I can do. When I was fiddling with your prog I took the space out but I deleted the file... I'll take it out for you.

everyone else: No I am not doing his project for him so dont start flaming me. I'm merely helping him out.
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  [ 11 Posts ]
Jump to:   


Style:  
Search: