Search:

Type: Posts; User: deivisxm

Search: Search took 0.16 seconds.

  1. Re: Trying to make labyrinth algoritm. Getting NPE

    well... I want to ask you the same thing about my code.. It generates something but i'm not sure what i didn't do because this is definitely NOT a labyrinth.. maybe a quick look on my code could...
  2. Re: Trying to make labyrinth algoritm. Getting NPE

    OK, so i fixed all the errors, which was surprisingly fun to do.. Anyway, now i have a new problem: something similar to labyrinth is being generated but i think i did something wrong with logic's...
  3. Re: Trying to make labyrinth algoritm. Getting NPE

    Ok... So i looked into it replaced some code and the problem is still unsolved :( . So here is my current code:
    import java.util.Random;

    public class Labyrinth {
    //0-walls
    //1-path
    ...
  4. Re: Trying to make labyrinth algoritm. Getting NPE

    Here is the error:
    Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: 20
    at Labyrinth.generateRandom(Labyrinth.java:70)
    at game.paint(game.java:43)
    at...
  5. Trying to make labyrinth algoritm. Getting NPE

    So i am making this game with randomly generated labyrinths and i get error in array. Could someone please explain me what is wrong? Here is the code:
    import java.util.Random;

    public class...
  6. Re: none of my friends can run my simple game launcher

    Ok thanks, the problem was image locations :)
  7. Re: none of my friends can run my simple game launcher

    So.. If there are no image files, launcher wont even show jwindow?
  8. Re: none of my friends can run my simple game launcher

    my codes usually have too much writen in them.. but can this couse my problem?
  9. Re: none of my friends can run my simple game launcher

    sorry. edited. first file is main
  10. Re: none of my friends can run my simple game launcher

    i already posted the code. my friends are running it as a .jar

    --- Update ---


    They dont have images of this launcher but it works without them for me. My friends are offline now, but i...
  11. none of my friends can run my simple game launcher

    Hi. i am having a problem. i made a program that downloads and runs the game(only basic frame for now), but when my friends try to open it. it simply wont open and it works on my computer. no errorrs...
  12. Replies
    8
    Views
    311

    Re: cant rotate image to mouse position

    I think the problem is i have bad angle...
  13. Replies
    8
    Views
    311

    Re: cant rotate image to mouse position

    game.java


    import java.awt.Color;
    import java.awt.Graphics;
    import java.awt.Graphics2D;
    import java.awt.MouseInfo;
    import java.awt.Point;
    import java.awt.PointerInfo;
    import...
  14. Replies
    8
    Views
    311

    Re: cant rotate image to mouse position

    Errors are probablly becouse of char and map classes. Isnt it? Becouse it compiles fine for me. Also i run this from another class. I create frame and the do game board = new game(); ...
  15. Replies
    8
    Views
    311

    cant rotate image to mouse position

    Hi, i am currentlly trying to make 2d shooter and im having problem with rotating player to face the mouse. Here is my code:

    import java.awt.Color;
    import java.awt.Graphics;
    import...
  16. Thread: 2d tile map

    by deivisxm
    Replies
    3
    Views
    323

    Re: 2d tile map

    I dont understand what you mean?

    --- Update ---

    Ok i understood it now, but how should i fix it?
    Ok nevermind. just fixed it by writing map[y][x]
  17. Thread: 2d tile map

    by deivisxm
    Replies
    3
    Views
    323

    2d tile map

    hello, i am currentlly trying to learn how to make 2d tile map in java. i have the code but for some reason it draws the map rotated to the right. Heres the code:

    package test;

    import...
  18. Replies
    4
    Views
    213

    Re: cant rotate image

    G2d is graphics2D. I am not sure whye didnt i wrote it here. I am currently not on computer so i cant give the full code. But can u just write the code you would use if you wanted to rotate image?...
  19. Replies
    4
    Views
    213

    cant rotate image

    Hi i am learning java right now and i ran into problem where i cant rotate images. It just doesnt work, i have tryed many examples from the internet. For example:
    public void paint(Graphics g){...
  20. Thread: Java socket

    by deivisxm
    Replies
    3
    Views
    170

    Re: Java socket

    I dont really know. I took this code from the internet. tryed to to while(true) loop but it still instantlly exitted.
  21. Thread: Java socket

    by deivisxm
    Replies
    3
    Views
    170

    Java socket

    Hey. i have this problem where my java socket client instantlly shuts down after i run it. heres the code:

    package basic;

    import java.io.*;
    import java.net.*;

    public class LoginClient {
    ...
Results 1 to 21 of 21