I made my own “the most useless machine”. I made it with two switches to make it more fun too build.
Tags: java, java source code, jinput, joystick
Once I already done this program to test joystick in Java with JInput but it wasn’t enough dynamic. So here’s version two. I thought that every joystick of stick type or gamepad type have the same components, but that’s not how it is. So here is the program that adds controller components dynamically, and also it founds all joysticks that are connected to computer.
I was wondering if randomly generated numbers with java class Random are generated evenly or any numbers are thrown more often than another or what is going on there :D. So, I made a program that generates random numbers, from 0 to max number that you set, and makes graph from this numbers.
Here is the image of graph window (one square represents one number):
Tags: animation, game, java, tutorial
I finaly took time to finish the game for animation tutorial that I want to do. I named it Helicopter battle and the goal is to destroy as many enemy helicopters as you can with the ammo that you have on the helicopter.
Here is the screenshot of the game.
At the moment the tutorial article is not yet written, but you can download the game and its java source code on Animation tutorial – Helicopter Bettle.
I got Logitech Double Action gamepad from a friend and I wondered how can I use it in Java and I come acrose JInput. Then I made a test program, something like what you can find in Windows. You can download this program and its source code at the bottom of this post.
How to use JInput?
Read the rest of this entry »