Search:

Type: Posts; User: Bingo90

Page 1 of 3 1 2 3

Search: Search took 0.63 seconds.

  1. Re: Running jar with libraries from a jar file in linux

    Now the syntax itself seems to be working. But it's not finding the main class when using -cp or can't acess the jar file when using -jar.
  2. Re: Running jar with libraries from a jar file in linux

    I'm using colons, but I don't know how to convert this into an array for the exec method.
  3. Running jar with libraries from a jar file in linux

    I'm running a jar of an application and library jars from lwjgl. I'm creating a java process. It's working on Windows but not on linux. I tried replacing the semicolons with colons but it didn't...
  4. Replies
    2
    Views
    126

    Re: Connecting via hamachi to a server

    The code works using localhost and even with LAN.
  5. Replies
    2
    Views
    126

    Connecting via hamachi to a server

    I'm using serversockets for the server and sockets for the client and I'm trying to connect to the server using hamachi. I'm using the right IP, but it won't let me connect and I'm getting a timeout...
  6. Replies
    38
    Views
    452

    Re: Java light source simulation

    Hmm that could work... I'll try that.
  7. Replies
    38
    Views
    452

    Re: Java light source simulation

    Light spreading works fine when removing a wall. But it'll do absolutely nothing when placing a wall, because I haven't implemented the code yet. I tried, but I have no idea how to do this :/
  8. Replies
    38
    Views
    452

    Re: Java light source simulation

    There's a colon, updated the post and quoted it to make it more understandable
  9. Replies
    38
    Views
    452

    Re: Java light source simulation

    Okay, this is how it works (some kind of pseudocode)

    void removeWall(int x, int y)
    {
    setWall(x,y,null);
    updateLight(x,y);
    }

    void updateLight(int x, int y)
    {
  10. Replies
    38
    Views
    452

    Re: Java light source simulation

    It only updates when placing or removing a wall. There are 2 arrays, a byte array (the light values) and a wall array(the walls). I told you how the light spreads.
  11. Replies
    38
    Views
    452

    Re: Java light source simulation

    I know, that's why I made a thread here. I don't know how I can achieve this.
  12. Replies
    38
    Views
    452

    Re: Java light source simulation

    When placing a wall, it should remove the light from the no longer existing light source.
  13. Replies
    38
    Views
    452

    Re: Java light source simulation

    When a wall is removed, updateLight is called at this position. "if (getWall(x, y) == null)" is checking if there's a wall (of course after the removal there's no wall) and if not, the light level is...
  14. Replies
    38
    Views
    452

    Re: Java light source simulation

    Actually the light is a 2D byte array, only the wall is a 2D Wall array.

    Here's the image uploaded to this site:

    2827
  15. Replies
    38
    Views
    452

    Re: Java light source simulation

    Here you go :)
  16. Replies
    38
    Views
    452

    Re: Java light source simulation

    Here's how the light updates:

    2825

    A update's B, C, D and E - B updates G, F, H, and want's to update A - but A's more lit than B, so B doesn't update A. A space only updates a space next to...
  17. Replies
    38
    Views
    452

    Re: Java light source simulation

    The darker space is not taking the light from the lighter space, it's the opposite.

    Here's an example:

    2824

    A's light is 6 and updates B. B gets light 5. B update's C which gets light 4. C...
  18. Replies
    38
    Views
    452

    Re: Java light source simulation

    Right now it's not in a ring form. And the light is not additive. The light of the space is the light of the most lit space next to it (up, down, left, right not diagonally) -1. Min light is 0. And...
  19. Replies
    38
    Views
    452

    Re: Java light source simulation

    In the first and second pictures the lamp has a light power of 13 (max), in the third picture 6.
  20. Replies
    38
    Views
    452

    Re: Java light source simulation

    How far the light reaches depends on the power of the lamp, but yes you're right.
  21. Replies
    38
    Views
    452

    Re: Java light source simulation

    If there's no wall on that space, the lamp's light will shine through that hole and the space is lit with the lamp's light power. A space also light's all spaces next to it with the light power -1.
  22. Replies
    38
    Views
    452

    Re: Java light source simulation

    That's the problem. Like I said, when removing a wall tile, it calls the updateLight method, which calls it again for the spaces next to it. It should also call it when placing a wall, but it should...
  23. Replies
    38
    Views
    452

    Re: Java light source simulation

    Updated the code to make the light power dynamic

    Well, here's an example if 2 walls are removed:

    2821

    When replacing one it should go back to this:

    2822
  24. Replies
    38
    Views
    452

    Re: Java light source simulation

    Removed unneccesary code and commented the rest.
  25. Replies
    38
    Views
    452

    Java light source simulation

    I'm trying to make a light source simulation and it almost works. It's a 2D simulation, there are wall tiles in front of a lamp. When removing a wall tile the light shines through the hole. When...
Results 1 to 25 of 51
Page 1 of 3 1 2 3