Java (2D) animation library - java

I'm creating (for a semester project) a Java desktop application. The aim is to provide a rich and intuitive user interface. I'm now looking for Java cross-platform library that works with Swing and provides animations (moving, resizing, rotation, color/alpha change and other 2D stuff).
Basically, I'm looking for an equivalent of CoreAnimation in the JavaWorld.
I found Trident, but have no experience with it and no development seems to have taken place since mid-2010.
Does anyone of you have experience with Trident or can recommend a library that fits what I need?

Hi
I have no deep knowledge of this but I had a look at trident a year ago and it looked well designed, feature complete and stable.
I would go with that one if you find nothing better. You have to browse the blog of Kiril at pushingpixels.org to get some additional good examples.
Have fun,
- Rossi

Use libgdx awesome library!!

Related

DICOM 3d display - Java 3D vs VTK

I'm going to work on implementing 3d display of dicom files and I'm wondering which technologies is easier to use: Java 3D or VTK?
I'm not very experienced programmer,but I've already created a DICOM viewer based on dcm4che open source library.
Any hints or experiences to share?
Most of my 3D modeling is Optical Coherence Tomography data that tends to be rather large. My experience has been a little backwards. The project started as a C++ project using x64 VTK and Qt. Folks in the lab weren't C++ people, so it got converted to Java which is used through Matlab, which the lab post-docs know.
Java VTK is really easy to use and has a lot of features, but I'm having some trouble with registering callback events for buttons and such with will be a deal breaker if it can't get resolved. This problem might dramatically effect how the UI is done, so keep that in mind.
Most of the C++ examples tend to convert to Java really quickly (except callbacks >.< ) so there is a plethora of examples. If you are going to use VTK, I highly recommend "The VTK User's Guide" by Kitware, Inc (ISBN: 978-1-930934-23-8), as it is an excellent overview of the API.
Good luck!

Flash animation-like 2d graphical library for C++ or Java

I'm looking for a good (hopefully free) 2d graphical library in C++, or in worst case, Java, which helps create the look and feel of Flash animations, the typical ones you can find in most flash games.
The best would be if it provided most of the features and easiness of Flash animation programming, like layers, or even collision detection, etc., without all the micromanagement of pixels typical for opengl. Of course, it can be built upon opengl...
Edit: interactivity is important, it might not been clear in the first description. So I'm not aiming just for an animation, or presentation. A good collision, gravity, etc. system is very much welcome, as are good GUI widgets.
Checkout the new ForPlay from Google.
It compiles to java, javascript, android and more.
Edit: Moved and name changed to PlayN
There is also a stackoverflow tag
Potential ideas:
Processing has been used to make some very good visualizations.... depending on what you want to do this may be a good option.
JavaFX was designed as a framework for building Rich Internet Applications (a bit like Flash). I think it has a lot of the Flash-like features you are referring to.
I don't know if this is exactly what you're looking for, but you can take a look at SFML.

starting Java 3D

i wanna know what is the best way to start coding a simple 3D ... (with java)
like a man walking around ... i know it's not so easy , but i believe it's not impossible :D
so .. is there a recommended tutorial or something???
Two suggestions:
Start with something like jMonkeyEngine. Lots of great tutorials on their site using their scenegraph API. It's where you want to end up eventually anyway, IMHO.
NeHe Productions: OpenGL Tutorials. These are great because they give you a lot of OpenGL info and instructions. Note that all the code in the tutorial is C however, at the bottom of the tutorials are links to ports of the code to various platforms and languages, including Java.
You could start with Java 3D API or Java OpenGL (JOGL).
I think, if you want something like OpenGL then you should consider about JOGL
The best way to start is to find out a good and free 3d game engine. You should know something about 3d graphics: basic transformation, how to work with matrices (specially multiply order), etc.
I can recommend you Lightweight Java Game Library, Ogre3D for Java or even jMonkeyEngine. Later you can try to use OpenGL directly - its easy to learn, multiplatform 3D graphics library.
For better understanding of the scene graph-based and Java3D programming I recommend you to read this tutorial. It helps me very much

Coming back to Java after a long absence; good Java game dev resources?

I've just gotten a new job and will be focusing a lot more on Java development. I figure I'll do my business stuff (Web) during the day, and then do a bit of playing after hours (Game Dev).
It's been forever since I've been active in any sort of Java game development community; is there a good central source for such information? Source demos, frameworks, books, that sort of thing?
Thanks!
IVR Avenger
You could do worse than investigate the Light Weight Java Games Library (LWJGL).
Also JOGL.
Also FengGUI for 2D interfaces in OpenGL (think a themable Quartz 2D Extreme in Java).
www.jmonkeyengine.com
a java game engine;
One thing that I liked about jmonkey is that it had decent resources for getting the project to build using several combinations of tools. I think you'll find the demos are adequate as well.
Killer Game Programming in Java by Andrew Davison
Some of the content is a few years old (but mostly still relevant) and he just added a new chapter in June, so the site is still active.
I would also take a look at Project Darkstar. The project deals with distributing actions and messages between game client(s) and game server(s), essentially dealing with client-server gaming backend. It also has a good forum for different integrations with different Java frameworks for GUI.
If you're looking at Java Applets, in my opinion, the best overall resource is Pulp Core.
This deals with the common problems you'll face with Applets, in particular with loading. In addition it abstracts you from problems like animation timers, client sound issues. The applets work without any installation other than Java - which for me is a very high requirement.
See the example game and the Bubble Mark score. I'm not affiliated with them in any way but I have delved into the source before!
Don't be put off by Java Applets. They have a bad past but the present is different. Installation is faster, startup more than acceptable, and the environments are no longer so polluted by Microsoft's deliberately bad VM. Java currently has a 75% adoption rate but for gamers you will typically get a much higher percentage (over 95% of new visitors to my gaming site have Java already installed).
Some useful resources that may help you:
This
page has a bunch of great links about animations and game tutorials.
Interactive
book by the creator of Pulp
Games
Swing and the EDT - unfortunately a
must know.
gamedev.net and devmaster.net are pretty much the two game development resources; language-agnostic, maybe leaning towards the C++ side, but it's all the same thing no matter what language you express it in.
Unfortunately those two sites just don't cut it for me. I would really like to see a GOOD game dev website. Maybe it's just me but it seems like everyone's working on their own thing and there really isn't any good central repository for, like, everything. I love the concept of gamedev.net's articles section, but many are outdated now and don't seem to be kept up. It's a shame, really. Stackoverflow is my best game dev resource right now.
Also check out the questions I've asked in the past, and my favorited questions (if you can see them). I keep a very close eye on tags related to java and/or gamedev here all the time (thus what led me to this question :) ).
Check out the java gaming forums. http://www.javagaming.org/ They are quite active, and seem to have experience developers that probably can point to the latest in javagaming tech.
Also, here are some engines I know of for 3D games.
jpct www.jpct.net small jar file and relatively fast, supports both software and hardware (OpenGL via LWJGL or JOGL) rendering. Not open source, but the developer answers questions promptly. By the way, I'm not the developer of jpct.
Also, jmonkey engine as posted before, very mature engine.
There are others like Xith3D, 3DzzD, but I would say jmonkey is the largest right now.
If you're looking into 2D content, I would say check out PulpCore or Slick 2D.

Is XML or XUL the future of Java GUI building?

After spending a lot of time and code on programming in Swing, I thought this can't be state-of-the-art Java GUI building. After not finding a user-friendly visual gui bilder for eclipse I stumbled upon declarative GUI building with XML UI toolkits... and I thought: This must be it! I think it's the right way to go, easy and also close to web-programming.
But after looking around in the web and on SO, I got the impression that it is not very common! Although there are many implementations and APIs, it seems like most of them are kind of dead and had no updates in the last 5 years..
So I wonder: Is my feeling right, that XML is not very widespread for java GUIs? And if so - what are the reasons? Maybe it couldn't become accepted or it has some major drawbacks or people are doing everything in the web instead with fatclients or there are better alternatives, maybe javafx?
I just need to know if it is worth spending time in that area or better look for alternate ways. As I dont read developer magazines I just don't know what the trends in gui building are and which technologies are believed to have a future. But I can't imagine that people still spend so much time on writing nasty swing (or swt) apps.
There new fresh and interesting approach - it uses YAML. Check it out at http://code.google.com/p/javabuilders/
Sun's answer to that seems to be JavaFX.
It has a declarative language for specifying the GUI and there will be builder apps as well.
There is some prototype work going on for e4 (Eclipse 4), which would allow building a GUI by editing an Ecore model and customizing it via CSS.
See this blog post for some details and instructions to try it out yourself.
Five to ten years ago XML was very popular. Although fine to provide some kind of standardisation for transferring data between heterogeneous systems, it's not suitable for programming. It always starts with the easy stuff, and lets declare everything. But any real system requires code. XML then falls down. There is also the problem that XML is a bad syntax for humans, and even languages like Java are easier to read.
On the other hand, there is clearly a need for the rails of GUIs. Naked Objects is the closest reasonable attempt I have seen.
I came to the same conclusions as you about the declarative frameworks out there. It is not worth learning a new GUI syntax unless it's widely supported. XUL as an interface language is widespread, but there is no java rendering framework for it. I'd say HTML+CSS+Javascript and a Servlet container is the best Java platform for GUIs today, but sadly I haven't found a platform independent way to display web pages like a desktop application.
If you use Eclipse, you can now use WindowBuilder to help you in creating Swing apps in a user-friendly visual GUI builder. It's now available as a free download, and Google has donated the Swing GUI builder framework to the Eclipse Foundation.
I'd second Thilos suggestion with javaFX.
Additionally the trend is pointing to webapps, so I think that in the long run javaFX and web based UIs will catch up to swing+swt GUIs.
I do all my swing stuff by hand and none of my application is nasty. If you do not know how to create usable and good looking UI there is no technology to help you.
The answer is surely not going to be XML. What problem are you trying to solve? You want to have reusable building blocks, and a compact way of describing them. I don't see XML helping you there.
[edit] Creating a java code equivalent of XUL would be an immense improvement on XUL.
XML makes it really, really hard to do good separation of concerns and once and only once. It is however perfect for the mongolian horde approach. You need a layer on top of swing, it only provides the building blocks.

Categories

Resources