LWJGL input with PS3 controller? - java

I'm kind of new to LWJGL (I have done some things with it in Minecraft), and I need some help. I want to make a mod for Minecraft where the user could have the option of using their PS3 controller. I have looked for JInput tutorials for beginners, and found none. I have also tried looking at how Minecraft handles input with LWJGL, but I couldn't find anything good.
I'm kind of desperate now. Please help, and thanks in advance.

Checkout the JInput forum at javagaming.org, there is a sticky there for getting started with JInput that has some tutorials.
LWJGL wraps JInput for controllers, it has it's own code for keyboard and mice, but everything else goes through JInput.
Regarding the PS3 controller, as long as the underlying OS has drivers for it, and exposes it via the normal method (/dev/input/event device for linux, directx for windows etc) then JInput will see it.
HTH

Related

How to / is it possible to call a matlab finction from a java program?

To begin with i am using Eclipse as my java IDE. Im doing a robotics project where my robot (the lego mindstorms ev3) travels a room using SLAM (programmed in java) and does some image recognition using a webcam which is attached to it.
So far i have an algorithm in matlab for the image recognition and ive installed the plugin to use the ev3 from eclipse but i need to be able to link these two together.
(I haven't started on the mapping yet so if any one is interested and has any suggestions then that might be helpful to me, thank you in advance)
My tutor tells me that he hasn't heard of matlab being used in eclipse before but i have seen a few people on the internet say they have done it. Ive looked for plugins but i haven't found anything that i could get to work so any suggestions would be greatly appreciated.
likewise if any one thinks this cant be done but knows an alternative route that i could take for this project then that would also be appreciated to save me spending further hours researching when im on a tight schedule!
Thanks again guys!

Playing Video in JFrame?

I'm trying to play video within a JFrame, I've been looking around online for a while and everything I have tried (VLCJ, Xuggger i think its called) doesn't work, the errors I get can I can never seem to fix, the closest I have gotten is using JMF which is very old, it can never play a video file but as mentioned, it's the furthust I've gotten. Is there any good little API's / examples I can look at?
Thanks.
I guess that depends on the video, however there are a few build in mechanism.
You could use java fx http://docs.oracle.com/javafx/2/media/simpleplayer.htm
And then build javafx into your JFrame, like here: http://docs.oracle.com/javafx/8/embed_swing/jfxpub-embed_swing.htm
If embedding in java seems to be a bad solution, there is always the possibility to open the systems media player:
Desktop.getDesktop().open(new File("the.mp4"));

Get Button Inputs in Java

so im writing an application that is supposed to use 6 game pads as input. i have found alot of documentation about a library called JINPUT. but the official download link gives me a 404 error. it would be awesome if someone here knew an alternative i could use. or knew a good download link. thanks!
JInput can be found there :
http://java.net/projects/jinput
You can use SVN to get it :
http://java.net/projects/jinput/sources/svn/show/trunk?rev=252
There are some tutorials around the web you could use.

Using the JInput

I have done A LOT of researching but I can't seem to find a basic code for JInput that gets the X and Y axis of the controller. Also, to "select"/set your controller, how do you filter out the mouse and keyboard? Thanks!
The getting started guide on the java gaming forums should have the information you need.
JInput forums home

GUI frameworks for Java

I was wondering if anyone has any suggestions of frameworks to give an old desktop application a much needed facelift.
The application has had a long life without anyone giving any attention to its exterior resulting in a monster with an 80s look.
I've just downloaded and tried MyDoggy framework for making windows floatable and dockable. So I'm looking similar for quick and easy fixes that will bring a dead looking application back to life.
I think you don't want to rewrite your app, right? Because it seems as all the other guys think so, suggesting SWT and JavaFX.
To pimp your existing Swing App, take a look at jgoodies.com, the substance look and feel or the swinglabs
Just changing the look and feel and some components might already help to give your application a second youth. Consider for example Violet which is IMO a nice looking application. It uses a custom theme based on the PgsLookAndFeel and some components from L2FProd.com.
You could give Oracle's ADF a try.
If you want to go with the latest and greatest, you could try JavaFX. Bu tof course using good old swing or the more OS agnostic SWT does the trick as well.
There's ofcourse the Eclipse Rich Client Platform or the Netbeans Rich Client Platform.

Categories

Resources