How to Replace a Bouncing Ball With a Bouncing Bird in Java
Java is an extensive programming language that, even though it is simpler than C++, still requires a great deal of technical expertise and knowledge. Luckily, replacing images in the software is a fairly simple process, even for games that will be distributed soon. If you already have a bouncing ball image, you can easily turn the image into a bird by replacing a single command line in your game's file.
Instructions
-
-
1
Navigate to the bouncing ball's art. The art will be called into the game with the command line "getResource("filename.png")" without the quotation marks around the outside of the phrase.
-
2
Erase the phrase in parentheses ("filename.png"). This is the exact file that is called to load the art into the game.
-
-
3
Move the bird art to the "Resource" folder of your project. Each project that you create will automatically contain a series of directories inside of it, including the "Resource" folder.
-
4
Type the name of the bird art into the parenthesis of the "getResource" command with quotation marks around the outside of it.
-
5
Save the file. The next time you compile and run the program, an image of a bouncing bird will be loaded instead of a bouncing ball.
-
1