Search:

Type: Posts; User: The_pizzaguy

Page 1 of 2 1 2

Search: Search took 0.34 seconds.

  1. [SOLVED] Re: Image loads in IDE but not when exported || creating reffered libary problem

    Well I'll dive into that i guess.

    --- Update ---

    Do you have a good link as for an explantion of how getClass().getResource(). is meant to be used?

    --- Update ---

    Okay figured it out,...
  2. [SOLVED] Image loads in IDE but not when exported || creating reffered libary problem

    So i am making a basic game and i am loading the images as such :


    try {
    background = ImageIO.read(new File(res/textures/bg.jpg"));...
  3. Replies
    2
    Views
    963

    [SOLVED] Is this coded properly?

    I have made an autoclicker. But i wonder if i made it correctly.
  4. Replies
    0
    Views
    1,335

    How is this autoclicker program

    I am not sure where to post this on the forum but i just post it here.
    Here is the link to the video i made of it :**Link Removed**
    There you will find the download link of the jar and the source...
  5. Re: My first code for computing a table of squares - and its not working :(

    I have an explaination for your code.
    Your code makes sqaures indeed but what happens is that when the last square is made(i = 7 ; 7 * 7= 49) the loop will stop because j is over 40.
    If you want to...
  6. [SOLVED] Re: Game problem: java.lang.IndexOutOfBoundsException with array list

    I found a fix. What i did is i made 2 more array list for the dead aliens and bullets to store the index into. Afther the loops have ended i made 2 extra loops to delete the aliens and bullets.
    ...
  7. [SOLVED] Re: Game problem: java.lang.IndexOutOfBoundsException with array list

    Thanks XD
    I hadnt thought of that yet thank you
  8. [SOLVED] Game problem: java.lang.IndexOutOfBoundsException with array list

    When a bullit bullit hits a alien it creates this error :

    java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
    at java.util.ArrayList.rangeCheck(Unknown Source)
    at...
  9. Replies
    4
    Views
    1,000

    Re: return type

    You cant use "void int function_name(){}" because you have two return types and every methode only can have one.

    Here some examples(these are from a entitybase class but the prisiple is the same)...
  10. Replies
    1
    Views
    1,125

    Re: Separate method to create Window

    You are actaly not creating a window. You extend the class with JFrame. I find this really annoying, i always import it and use it as a instance, wich makes you more capable of making more windows at...
  11. Replies
    4
    Views
    1,000

    Re: return type

    because you exit that "fuck" methode and it continues in the main methode. Return exits out of a methode and break breaks out of loops and if statments
  12. Replies
    12
    Views
    1,749

    Re: collision detection moving objects

    I think so but searching up tutorials is allways good
  13. Replies
    12
    Views
    1,749

    Re: collision detection moving objects

    If you are already started with java its better to stick with it. Otherwise you might get confused between diffrent langauges. Java is easier to make games in then C++, C++ is really hard to learn....
  14. Replies
    12
    Views
    1,749

    Re: collision detection moving objects

    If you want to learn about collition, look into the Rectangle clas. And for more gameprograming tutorials look at:
    The Cherno - YouTube
    He has some really good 2D game programming tutorials.
  15. [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) {...
  16. [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...
  17. [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...
  18. [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...
  19. Replies
    2
    Views
    1,192

    Re: Need Help Please

    Its easy, you can make a variable of the main class in the other wher its calculated with



    public static Main main = new Main();


    With this you can use the main for alot of things....
  20. Replies
    9
    Views
    1,410

    Re: Absolute beginner with errors in code

    Wow this code has so many errors in it. Nearly 2/3 of the code has errors.
    I am just advising you to look at your code and take out any syntax errors like Strarstreak pointed out, also these...
  21. Re: Writing an Action Event in a Jpanel to convert user text entered in a textField to uppercase

    I wouldnt know how to do it else, could you give me an example then? XD
  22. Re: Writing an Action Event in a Jpanel to convert user text entered in a textField to uppercase

    It is just an example, and the while loop used in my last comment could be the main update loop.
    If that loop is running it will auto update the code to uppercase.
  23. Replies
    10
    Views
    1,781

    Re: JAVA vs ALL

    Still java is pretty good and for a wider audionce because of its multi platform.
    And its really good for web applications because they are easily intergrated.
  24. Replies
    10
    Views
    1,781

    Re: JAVA vs ALL

    The benefit of java is:
    -Could be easy implemented in webpage;
    -Fast compilation
    -No istalation and thus fast starting up
    -mutiplatform

    but general C++ and C# are faster, this is because of ...
  25. Re: Writing an Action Event in a Jpanel to convert user text entered in a textField to uppercase

    you have to make a JFrame first with a text field

    If you want the text automaticly changed to uppercase.
    you should put this code in a loop(could be in the main).


    String text;

    while(){
    ...
Results 1 to 25 of 39
Page 1 of 2 1 2