Computer Science Canada Creating shooting star effect |
Author: | Neja [ Sun Jun 15, 2003 2:59 pm ] | ||
Post subject: | Creating shooting star effect | ||
I'm making a game (RPG, it's really cheap..anyways) and I want to have stars flying at the bottom screen along the x-axis. I used a for statement for that. What I can't figure out is how to have the stars repeatedly going across the screen without re-drawing them (loop) and have them stop when the user inputs their decision (get ans:*) Here's a really simple bit of code that I'm trying to manipulate:
|
Author: | Andy [ Sun Jun 15, 2003 3:07 pm ] |
Post subject: | |
just put cls after ur gatch statement |
Author: | PaddyLong [ Sun Jun 15, 2003 3:17 pm ] | ||
Post subject: | |||
something like this?
|
Author: | krishon [ Sun Jun 15, 2003 3:21 pm ] |
Post subject: | |
isn't there a echo u can do or somethin? |
Author: | Neja [ Sun Jun 15, 2003 3:40 pm ] |
Post subject: | |
YAY! Lol, ya, that's great...but, I've got an interview for this project where I have to explain how it all works, so, what the heck does hasch do? What is it? |
Author: | krishon [ Sun Jun 15, 2003 3:43 pm ] |
Post subject: | |
hasch is used to exit a loop (as he used in the example) when u press a character |
Author: | Neja [ Sun Jun 15, 2003 3:50 pm ] |
Post subject: | |
cool, but why is there two exit when hasch? (Sorry, I'm prob getting really annoying, but this is my first semester with Comp. Sci) |
Author: | PaddyLong [ Sun Jun 15, 2003 3:51 pm ] |
Post subject: | |
because there's two loops (the for loop and the regular loop) hasch is just something that returns true if a key has been pressed |
Author: | krishon [ Sun Jun 15, 2003 3:59 pm ] |
Post subject: | |
ye, its fine if u ask questions, after all S.W.A.T is a help forum. just don't overdo it or post stupid stuff |
Author: | Neja [ Sun Jun 15, 2003 3:59 pm ] |
Post subject: | |
oh! Thanks !!!!!!!!!!! ![]() |
Author: | Homer_simpson [ Sun Jun 15, 2003 9:19 pm ] | ||
Post subject: | |||
how bout adding a little curve... =)
|
Author: | PaddyLong [ Sun Jun 15, 2003 10:13 pm ] | ||
Post subject: | |||
I think that needs a little bounce Homer ![]()
|
Author: | Andy [ Mon Jun 16, 2003 9:29 am ] |
Post subject: | |
ya krishon ya there is setscreen("noecho") |
Author: | krishon [ Mon Jun 16, 2003 9:46 am ] |
Post subject: | |
that's the one |