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

Username:   Password: 
 RegisterRegister   
 moving and importing pics
Index -> Programming, Java -> Java Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
magicman




PostPosted: Thu Oct 14, 2004 12:45 pm   Post subject: moving and importing pics

i'm probably going to make a game for my final project like galaxy and i was wondering how i would move the space ship and import the pic.
please help
Sponsor
Sponsor
Sponsor
sponsor
Dan




PostPosted: Thu Oct 14, 2004 3:22 pm   Post subject: (No subject)

what APIs are you using? RTP or standered java?
Computer Science Canada Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more!
magicman




PostPosted: Thu Oct 14, 2004 3:24 pm   Post subject: (No subject)

i'm using ready to program 1.5.0 if thats what u mean
rizzix




PostPosted: Thu Oct 14, 2004 4:25 pm   Post subject: (No subject)

noo u see. dosent matter.. he's taking about the api.. and ur using RTP. not std java.

its a little problematic for ppl on this forum to help you out in RTP.. cuz most of us (at least those u are experienced java programmers) are well versed with Pure Java and have no knowldege whatsoever on the proprietary Holt API (RTP).
magicman




PostPosted: Thu Oct 14, 2004 6:09 pm   Post subject: (No subject)

i still don't know what u mean
wtd




PostPosted: Thu Oct 14, 2004 6:13 pm   Post subject: (No subject)

There is a standard Java API created and maintained by Sun Microsystems. This is the set of classes that form the foundation of Java. It's very large and contais classes for pretty much anything you could ever want to do.

Holtsoft created a different set of classes, because they felt doing so made Java easier to teach.

The problem is that Java as a language isn't especially noteworthy. The extensive set of standard classes is. Holtsoft misses the point of Java by creating an environment which doesn't teach students how to use those classes.

If you're going to push a technology that students are unlikely to use in the "real world", there are better languages than Java to start with.
Dan




PostPosted: Thu Oct 14, 2004 7:10 pm   Post subject: (No subject)

From what i see of my cope of the sorce code it looks like the method in the console class drawImage(Image img, int x, int y, ImageObserver obs) will (i think) draw the give image at x and y.

Tho the problem is that i see no methods in any of the RTP classes for loading a image file in to an instance of the class Image defined in awt. So i am not shure how hloth soft thinks there method should be used with out geting in to the awt API. Hostly tho, all RTP is, is a bunch of clases witch basiclk copy awt api by using awt and duming it down and chaging the names of the methods to be more turing like.

What i whould do is use awt to load the image and then the RTP crap to display it, to load an Image using awt api you could do somting like this:

code:

//APIs we will need
import java.awt.*;

............

Image myImage; //the var to hold the image

//loads the image from the give fileName, u will need to put in fileName
Toolkit toolkit = Toolkit.getDefaultToolkit();
myImage = toolkit.getImage(fileName);

//media tracker to make shure nothing gose wrong with loading the image
//and to make the progame wait intill the image as been loaded.
MediaTracker mediaTracker = new MediaTracker(this);
mediaTracker.addImage(myImage);
try
{
         mediaTracker.waitForID(0);
}
catch(InterruptedException ee)
{
          System.out.println("Error loading pic");
          System.exit(1);
}


note that i do not have java installed right so i could not test that code, hopfully there are no type-os.
Computer Science Canada Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more!
magicman




PostPosted: Fri Oct 15, 2004 10:51 am   Post subject: (No subject)

Quote:

what APIs are you using? RTP or standered java?




can u explain that to me. because i'm sooo confused.
Sponsor
Sponsor
Sponsor
sponsor
Tony




PostPosted: Fri Oct 15, 2004 11:20 am   Post subject: (No subject)

basically what you need to know is that Ready to Program is not java Wink
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
magicman




PostPosted: Fri Oct 15, 2004 11:58 am   Post subject: (No subject)

Quote:

basically what you need to know is that Ready to Program is not java

then what am i using???
Flaming
Dan




PostPosted: Fri Oct 15, 2004 2:01 pm   Post subject: (No subject)

An evil by product of holth software that they like to call java. But in realty they just stole sun's (the poleop who realy make java) code and APIs then removed alot of java and then added in there own APIs witch just make it harder to use.
Computer Science Canada Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more!
wtd




PostPosted: Fri Oct 15, 2004 2:27 pm   Post subject: (No subject)

magicman wrote:
Quote:

basically what you need to know is that Ready to Program is not java

then what am i using???
Flaming


You're using the Java syntax and compiler, but not the standard Java libraries.

It's like if I used English grammer and sentence structure, but made up gibberish words to use as vocabulary.
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  [ 12 Posts ]
Jump to:   


Style:  
Search: