Computer Science Canada Random display |
Author: | PhOeNiX-47 [ Fri May 21, 2004 5:27 pm ] |
Post subject: | Random display |
This might sound a little noobish but how do u display random pics at same time without stop the program using a 'for' count? // Turing is really a baaaaaad program for making games... |
Author: | Paul [ Fri May 21, 2004 7:15 pm ] |
Post subject: | |
put pics in array, randomize the subscripts, then draw the pic. |
Author: | PhOeNiX-47 [ Mon May 24, 2004 6:40 pm ] |
Post subject: | |
How do I use array to display a pic? |
Author: | guruguru [ Mon May 24, 2004 7:07 pm ] | ||
Post subject: | |||
Ta dah. |
Author: | PhOeNiX-47 [ Mon May 24, 2004 7:18 pm ] |
Post subject: | |
OMG~!!! That works! U are the GURU! |
Author: | PhOeNiX-47 [ Mon May 24, 2004 7:22 pm ] |
Post subject: | |
Hm... but doesn that mean i have to use multiple pics for multiple spaceships? I want one pic to be able to multiply all overthe screen. |
Author: | SuperGenius [ Mon May 24, 2004 7:43 pm ] |
Post subject: | |
then you need to have the program draw your picture in a loop, with a couple randint statements in there for the x and y coords of the pic |
Author: | guruguru [ Mon May 24, 2004 7:47 pm ] | ||
Post subject: | |||
I dont understand. Do you want a random picture to be displayed in a certain place, or a single picture displayed in random places, or a number of random pictures to be displayed in random places? For the second option:
Thats what I think you mean. If you want to incorporate a random picture from a collection of pictures than use my previous posts and when you draw the pics, use the random pic in the for loop. EDIT: Ah! SuperGenius beat me ! I just repeated what he said so know I look stupid ! |
Author: | PhOeNiX-47 [ Mon May 24, 2004 8:19 pm ] |
Post subject: | |
Ya but that stops my original program This is a big dilema |
Author: | guruguru [ Mon May 24, 2004 8:38 pm ] |
Post subject: | |
What is your main program exactly? Drawing the picutres is one of the main parts of any program. I don't know what your code or game is like so I can't help much more.... use View.Update and offscreenonly ? Maybe post your're program... or you can PM the code so everybody doesnt copy your code. |