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

Username:   Password: 
 RegisterRegister   
 questions on graphics, etc.
Index -> Programming, Java -> Java Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
DanShadow




PostPosted: 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!!
Sponsor
Sponsor
Sponsor
sponsor
rizzix




PostPosted: Mon Jun 28, 2004 2:46 pm   Post subject: (No subject)

code:

while (true) {

}
DanShadow




PostPosted: Mon Jun 28, 2004 7:28 pm   Post subject: (No subject)

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




PostPosted: Mon Jun 28, 2004 8:24 pm   Post subject: (No 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
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
DanShadow




PostPosted: Mon Jun 28, 2004 8:52 pm   Post subject: (No subject)

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




PostPosted: Mon Jun 28, 2004 9:16 pm   Post subject: (No subject)

yes Rolling Eyes
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Display posts from previous:   
   Index -> Programming, Java -> Java Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 6 Posts ]
Jump to:   


Style:  
Search: