
-----------------------------------
vagyb
Fri May 21, 2004 8:46 pm

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.

-----------------------------------
guruguru
Fri May 21, 2004 9:43 pm


-----------------------------------
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
Sat May 22, 2004 6:24 am


-----------------------------------
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
Sat May 22, 2004 7:06 am


-----------------------------------
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/

-----------------------------------
guruguru
Sat May 22, 2004 11:18 am


-----------------------------------
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.

-----------------------------------
vagyb
Sun May 23, 2004 12:27 pm


-----------------------------------
wow thx alot man, i'll try to work from here lol.

-----------------------------------
vagyb
Sun May 23, 2004 12:35 pm


-----------------------------------
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
Mon May 24, 2004 12:49 pm


-----------------------------------
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

-----------------------------------
Dan
Tue May 25, 2004 2:21 pm


-----------------------------------
just add the radmoizing code in the ifs where u check if the rock whent off the screen.

Ex.


if boulder1X + boulderWidth 