splicecube's Profile User Rating: -----

Reputation: 0 Apprentice
Group:
Restricted Editor
Active Posts:
57 (0.08 per day)
Joined:
03-November 12
Profile Views:
809
Last Active:
User is offline Sep 18 2014 11:39 PM
Currently:
Offline

Previous Fields

Country:
Who Cares
OS Preference:
Who Cares
Favorite Browser:
Who Cares
Favorite Processor:
Who Cares
Favorite Gaming Platform:
Who Cares
Your Car:
Who Cares
Dream Kudos:
0
Icon   splicecube has not set their status

Posts I've Made

  1. In Topic: multiple key inputs not working

    Posted 16 Sep 2014

    You're not really handling multiple key presses. I'm fairly new too, this is how I came over this hurdle. I handled it by splitting it into the keyPressed() and keyReleased methods and using booleans

    In keyPressed activate boolean based on if they are pressed
    			if (e.getKeyCode() == KeyEvent.VK_UP) up = true;
    			if (e.getKeyCode() == KeyEvent.VK_DOWN) down = true;
    			if (e.getKeyCode() == KeyEvent.VK_LEFT) left = true;
    			if (e.getKeyCode() == KeyEvent.VK_RIGHT) right = true;
    
    


    In keyReleased set false the booleans for the keys that are released
    			if (e.getKeyCode() == KeyEvent.VK_UP) up = false;
    			if (e.getKeyCode() == KeyEvent.VK_DOWN) down = false;
    			if (e.getKeyCode() == KeyEvent.VK_LEFT) left = false;
    			if (e.getKeyCode() == KeyEvent.VK_RIGHT) right = false;
    
    
    


    Then in your main game loop do something like whoYouWantToMove.processKeys(up, down, left, right); where processKeys would be a method that takes in all the booleans and handles them with a series of if statements for if up,down,left,right is true so if two of them are true aka pressed both if statements would happen, moving your thing in both ways.
  2. In Topic: Java Timers Start/Stop/Restart in functions

    Posted 31 Mar 2014

    I mean I can't really simply it much more. I already took out hundred of lines of code. I kinda need the functions as cause it works best with the program I am making. In my main method you can see that I declare a clock, but in my actual program its "Game", "clocks" is just a standin so I can hone in on the timers behaviors. In my actual program I have a single game declared in my main (in contrast to the "clocks" you see below). The idea is to have it so I can create multiple games. Then the game involves a function called level1() and level1 has an animation displaying at the start of the level, which is called with anim().
  3. In Topic: Creating a .jar file error

    Posted 28 Mar 2014

    Thank you guys for your efforts. I couldnt seem to figure it out, but I downloaded eclipse and got the jar creation to work fine. BlueJ was my preferred IDE, but eclipse seems very very useful
  4. In Topic: Creating a .jar file error

    Posted 27 Mar 2014

    Thanks you all for your replies! Hmmmm I took out the Class-Path line and I still come up with the same error. I had tried changing the name of the Main-Class to Jgame.java but that would give the same exact error except this time it would say "Jgame.java" was not found. I also just tried your 2-line way mike73 and the error happens the same way.
  5. In Topic: Creating a .jar file error

    Posted 27 Mar 2014

    Sorry, everything is in fact "Jgame" with the g lowercase. I edited my post accordingly

My Information

Member Title:
D.I.C Head
Age:
Age Unknown
Birthday:
Birthday Unknown
Gender:

Contact Information

E-mail:
Click here to e-mail me

Friends

splicecube hasn't added any friends yet.

Comments

splicecube has no profile comments yet. Why not say hello?