Search:

Type: Posts; User: The_pizzaguy

Search: Search took 0.10 seconds.

  1. [SOLVED] Re: Game problem: java.lang.IndexOutOfBoundsException

    So i switched the for loops arround and that was it and now it works.
    Here is the code if anyone wants it.



    private void colision() {
    if (aliens.size() >= 1 && bullets.size() >= 1) {...
  2. [SOLVED] Re: Game problem: java.lang.IndexOutOfBoundsException

    i havent tried that yet but i dont think it will make a diffrence
    but ill do that now

    --- Update ---

    well i initilasid the bullits earlier but what happens is that the were shot and afther...
  3. [SOLVED] Re: Game problem: java.lang.IndexOutOfBoundsException

    as said in the top its
    at com.spaceinvader.Main.colision(Main.java:172)

    line 172 thus
    if (bullets.get(i).getBounds().intersects(aliens.get(i2).getBounds())) {

    in the colision methode

    it...
  4. [SOLVED] Game problem: java.lang.IndexOutOfBoundsException

    So i am recreating space invaders to teach myself some game programming.
    For the first time i have started to use ArrayLists.
    But every time i run it i get an java.lang.IndexOutOfBoundsException...
Results 1 to 4 of 4