Jump to content
  • Advertisement

MothDust

Member
  • Content Count

    6
  • Joined

  • Last visited

Community Reputation

100 Neutral

About MothDust

  • Rank
    Newbie
  1. MothDust

    Sound effects repository

    Arg! I'm sorry, I should have seen that ...
  2. Hello everyone! I'm a total amateur to programming and I'm learning java. I tried to find a good repository for sound effects and have been unsuccessful. I'm looking for an engine sound that I can download that will sound alright looped. Sorry if this is the wrong area or place to ask about this.
  3. Thank you for the responses everyone, I'm looking forward to trying out your suggestions and I'll be sure to let you all know if it works so that when the next person goes searching on google maybe they'll run across it. A little more info for those that asked: I'm using Netbeans because I'm under the impression that what google uses is a little different than traditional java and I'm interested in programming games for phones, PC's, and maybe even consoles some day. So anyway it behooves me to learn the language as it is, first, and then move to Eclipse next. My netbeans is installed on my second hard drive which for the sake of simplicity we'll call Z:. does it matter that my compiler is on drive Z: and my project is on C:, I didn't imagine it would but I'd like to mention any little thing that might help you guys help me. Also, I'm running Windows. Finally, I do greatly appreciate the help, you guys are great. ************************EDIT************************************** The drag and drop method worked, absolutely wonderful. Thank you very much!
  4. Hmm, interesting, that does seem to have had some kind of affect. I suppose I should have added my errors though, I do apologize for leaving that bit out. Here is what I get when I run my code. Uncaught error fetching image: java.lang.NullPointerException at sun.awt.image.URLImageSource.getConnection(URLImageSource.java:99) at sun.awt.image.URLImageSource.getDecoder(URLImageSource.java:113) at sun.awt.image.InputStreamImageSource.doFetch(InputStreamImageSource.java:240) at sun.awt.image.ImageFetcher.fetchloop(ImageFetcher.java:172) at sun.awt.image.ImageFetcher.run(ImageFetcher.java:136) BUILD SUCCESSFUL (total time: 8 seconds) Which looks to me like the path is bad, but i've tried putting the images in every different kind of folder in my project and using all kinds of different methods of designating the location, even going so far as to typing out the entire address starting with C:
  5. Hello everyone, this is my first post so please be forgiving. Basically I'm brand new to Java, I started learning C++, attained some basic knowledge, then moved over to Java since I figured it would get me into the android market faster than learning C++ then Java. Anyway, onto my problem, I've got drawing shapes and collision detection down, that was simple. Now I want to replace some of my objects with Images I've drawn. I'll try to wrap my code, hopefully this works... package tests; import javax.swing.JFrame; import java.awt.*; import java.net.*; import java.awt.Image; import java.awt.Toolkit; public class Tests extends JFrame{ public static void main(String[] args){ Tests g = new Tests(); } URL url = null; Image img1; public Tests(){ super("Test"); setSize(400,400); setVisible(true); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); url = this.getClass().getResource("src/img1.gif"); img1 = Toolkit.getDefaultToolkit().getImage(url); } public void Paint(Graphics g){ g.drawImage(img1,200,200,this); } } obviously this is just some sample code I created and not my full project. but this is how the code for drawing my images works. basically the object is still there, collisions are happening, but it is invisible. Thank you all in advance, it sucks feeling like a noob, even if you are. Oh and in closing I've been trying to figure this out for a few days with google searches and my many text books, I come to you all humbled.
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!