Computer Science Canada

questions on graphics, etc.

Author:  DanShadow [ Mon Jun 28, 2004 1:35 pm ]
Post subject:  questions on graphics, etc.

Well, I was wondering what command I would use to set a specific color
(ie. bright neon purple, [lol]) as a transparent color when I load images. Like for example, I load a picture of an isometric tile, but the background of the tile is bright purple. How do I make it so the bright purple DOESNT show up when I load it into my program??

Also...(im new), how do I get my program to continue go through a [loop?] to an unlimited amount of times? (My program needs to redraw like 4000 background tiles, a game border, and a sprite.) Like, how do I make it so it continues redrawing these all? This leads into the next question.

How do I get it so if the user presses (the UP_ARROW key), it saves it under a variable called "key". Then
code:

if key==(KEY_UP_ARROW)
{
y=y+3
else if key==(KEY_DOWN_ARROW)
y=y-3
}

(Sorry if the code is wrong).

If you anyone could help me with these, it would be GREATLY appreciated!!

Author:  rizzix [ Mon Jun 28, 2004 2:46 pm ]
Post subject: 

code:

while (true) {

}

Author:  DanShadow [ Mon Jun 28, 2004 7:28 pm ]
Post subject: 

Now...am I suppose to put ALL my code, including classes, and public voids all in the while loop? (ps-> tx)

Author:  Tony [ Mon Jun 28, 2004 8:24 pm ]
Post subject: 

i'm preaty sure that you don't put your public voids in the loop Confused

the loop is just suppost to be your program's driver

Author:  DanShadow [ Mon Jun 28, 2004 8:52 pm ]
Post subject: 

then do I include the public voids as methods (ie. drawTile()Wink inside the loop?

Author:  Tony [ Mon Jun 28, 2004 9:16 pm ]
Post subject: 

yes Rolling Eyes


: