Jump to content
  • Advertisement

Bench3

Member
  • Content Count

    10
  • Joined

  • Last visited

Community Reputation

126 Neutral

About Bench3

  • Rank
    Member
  1. Bench3

    Learning Java

    If books don't do it for you; as you already know C++ which is very similar to Java, it shouldn't be too hard to look through the documentations and self-tutor yourself. If this proves difficult then there are many books and online resources which help very much with the beginner process.
  2. Bench3

    Skyrim Mod

    Hi, I agree with 6677 to an extent. I think you should try some more basic programming first. Try using the Skyrim creator kit and see what terrain modding you can do before trying to start with a huge project. Also , will there be any problem selling my game as a Skyrim mod , like taking part of the revenue or something .[/quote] You can charge for a mod but I believe that would be a bad idea as because of your lack of experience (sorry if you have some) there will be better, free, mods. Hope this helps you with your decision, ~Ben
  3. Bench3

    Saving And Loading Object Arrays

    Looks good to me. Something I would comment on is to flush a output/input stream before closing it. So Eg: [source lang="java"]save.writeObject(DA); save.flush(); save.close();[/source] This just makes things safer when closing files. Hope this helped ~Ben
  4. Hi, I was wondering how I could rotate an image when I press a key. For example, if I pressed D it would rotate right and A left. I know how to set up keyListeners but not sure about the rotation. I then wondered about how I would go about getting something to face a direction. So if I pressed G, the image would turn to face a certain angle? Thanks in advance! ~Ben
  5. Hi, I was wondering how I could rotate an image when I press a key. For example, if I pressed D it would rotate right and A left. I know how to set up keyListeners but not sure about the rotation. I then wondered about how I would go about getting something to face a direction. So if I pressed G, the image would turn to face a certain angle? Thanks in advance! ~Ben
  6. You want to check if the player intersects with the cube. This is going to be more difficult for you as they are in separate classes. if(cube.intersects(player)){ //DO STUFF } You may want to instead of having integers, change it into a rectangle: Rectangle p = new Rectangle(x, y, width, height); You can only use certain methods for collision with rectangles. Hope this helped a little, ~Ben
  7. Hi, i've been attempting to make a game and was wondering how to make objects (such as rectangles) in and out from a JPanel. Can anybody help me out? Thanks in advance, ~Ben
  8. Bench3

    File IO

    I would suggest not using a do while loop and doing the following: Instead of a do while loop, just make it a while loop Eg: [source lang="java"] public void readFile() throws IOException{ InputStream stream = this.getClass().getResourceAsStream(filePath+fileName); BufferedReader reader = new BufferedReader(new InputStreamReader(stream)); String line; while(!line.equals("-END_OF_STREAM-")){ //Read each line of the file //Each line will correspond to separate entities. End characters will denote the end of an entity's data //Each line will be read, 'decrypted' and then set into the elements ArrayList line = reader.readLine(); lines.add(line); System.out.println(line); } //<<<<<<<<<< reader.close(); stream.close(); }[/source] Hope this works ~Ben
  9. Bench3

    Enemy faces player

    You can use tangents to get the angle and then convert that the turret is facing the player?
  • 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!