As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
I'm a developer familiar with Ada, C, Obj.C (iOS), and C#. I would like to create an application to show some data about a robot I'm building. However I have never done graphics with either Mac libraries or OpenGL before.
What I'm trying to achieve is shown in the image below. I have tested Processing to create some stuff. But it's too complicated and Processing is far from powerful for this kind of application. It can't even rotate a line around its center without writing some nasty code.
Requirements:
Graphing capabilities (e.g. voltage drawn in respect to time), Google maps API, gradients, 2D animations, masks.
Questions:
What should I learn? Is this possible to implement using only the Mac libraries/frameworks or should I use OpenGL?
Is it best to do it using Obj c? Or is java worth the learning? How good is Java with graphics like this? This thing is that if I program this using Obj C then its not cross platform.
Any other tips you can give?
Later on, I´d like to add a google maps to show the position of the plane. All data is transmitted through Wifi. 10Hz.
Here is a thread of someone doing this with opengl and js: http://www.jpct.net/forum2/index.php?topic=3076.0
Yes you can do this in opengl, but you may consider Cairo which is 2d rendering and may be simpler. It certainly depends on if you need 3d rendering or not. In case of 3d rendering OpenGL may be a better bet, then trying to fit it into the Cairo system.
If you want it to be cross platform, I'd personally do it in Java or Python, but there are opengl and cairo bindings for most languages. If java I recommend trying LWJGL.
You'll also need to consider what UI framework to use, since you may need buttons and all that jazz. I personally like Qt, but WPF is also quite good.
See here for Cairo Docs: http://cairographics.org/documentation/
In addition this question came up here and there are more suggestions in the comment threads: http://www.gamedev.net/topic/479476-how-would-you-program-a-pfd-primary-flight-display/
I'm not sure how great animation with cairo is, but here is a tutorial demonstrating that: http://cairographics.org/threaded_animation_with_cairo/
I dont think that some specific library will accomplish all the requirements. Probably you will need to use a mix of them.
If you ask me, Id go for a combination of web ui frameworks. Based on the image you have shared, im sure that most of that graphical components can be constructed using ExtJs framework (see these examples: http://www.sencha.com/products/extjs/examples/, http://docs.sencha.com/ext-js/4-2/extjs-build/examples/charts/Gauge.html, http://docs.sencha.com/ext-js/4-2/extjs-build/examples/sandbox/sandbox.html).
For the central panel, maybe there is no library that provides a generic widget like that, and so I would go for a custom HTML5 Canvas implementation (http://en.wikipedia.org/wiki/Canvas_element).
Just want to add that I woudl go for the web way simply because:
Community is BIG for almost any library
Cross platform issues would not be a problem
Most of Web UI frameworks are mature, and have out of the box widgets ready to be used.
Communicating with external APIs (like Google Maps as you mentioned) is a piece of cake using web.
Ah, this is personal experience I've had while I built my final year engineering project(which was incidentally a robot that could fly) - And I've built something like this before.
I used Java for graphing and telemetry data tool with flight display system like that(and it was sufficient).
But if you are good with a programming language, then you can do it in any language of your choice. Yes, Mac + OpenGL + ObjC is good combination too. My aim was to keep the code as portable as possible.
Related
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
I'd like to port my Zuma-like game to browsers. It's not really complex 2D arcade game, just some animations and particle systems - really similar in complexity to the one I linked to.
I'm wondering what technology should I use. I'm thinking about Java, Flash or maybe some solution working without a plugin (SVG, Canvas?). The cost of the technology is also really important to me (I'd prefer a free solution of course, but don't know if it's possible).
It's really probable that I'll also port the game to Android and iPhone. Maybe if I picked Java, I could write one version that would work on both: browsers and Android phones?
Sorry for my lack of knowledge, my situation is pretty weird now, since I got an interesting offer from a producer.
If you really want to port game to the web (e.g. it is not a weekend project of yours), it is a real project which is supposed to be used by many users, and you are not paid specifically by Google or Microsoft to make this game using JS+canvas, you should choose flash. Making professional games with HTML5, which works on every browser is very time consuming task. Also I'm not really sure it is possible to make HTML5 game without Flash, as far as I know web versions Angry Birds and Cut the Rope are using flash player for sounds (since there is no low latency sound api in browser).
So this is one of the reasons why to use Flash. Another reason is that Flash is used for creating games for very long time, there are lot of resources, game engines , tutorials, user groups and etc.
Also you don't need to buy anything from Adobe to start building games, there free editors (like FlashDevelop) or more advanced commercial IDEs(f.e. Astella from JetBrains).
HTML5, javascript and CSS3 will make your game run anywhere, its free and its the future.
HTML, CSS, JQuery seems to be the emerging way of creating anything on the web. This includes games. Yes, this technology hasn't been "perfected" yet, but I would at least spend sometime with it. Hey it's free, portable, and is always improving.
I found the following link on Google by "searching HTML5 game engine". http://impactjs.com/
Someone posted an all CSS game on YCombinator a few days ago. It's amazing what you can do nowadays!
http://news.ycombinator.com/item?id=3483662
http://jsrun.it/GeckoTang/4rXg/
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I'm Developing a CBIR (Content based Image Retrieval System) as part of my BE project.
Which of the below mentioned tools will be better to be used for image processing??
1-> Matlab
2-> Mathematica
I'm planning to develop this system using java as a front end of the system. which of above systems will be better. Or should I go for some 3rd party image processing API's available for java ????
I used Mathematica for years and still found it easier to learn Matlab from scratch in order to do an image processing project. The thing that makes Matlab better here is that many state-of-the-art image algorithms have code available. For instance, for content-based image retrieval you need to extract content features, and vl_sift library does that. Also, you can bundle your Matlab library to run as a stand-alone executable, and I don't know if that's possible with Mathematica.
I previously suggested ImageJ and others mentioned ImageMagick since I mentioned Java environment. However, I would like to change my suggestion. I came across Intel's OpenCV (Opensource Computer Vision) libraries. This is a great set of libraries for use with C, C++ and Python. This is cross platform too! So porting the code shouldn't be too difficult.
Why I think OpenCV is great is because even novices (like me) in Image Processing can use it. for example, smoothing an image is as easy as calling one function cvSmooth() with a few parameters on which type of smoothing (blur, gaussian etc). It supports much more advanced functions such as Optical flow and blob tracking. And the great thing is, its quick to test out or build simple image transforms.
for more info please go to http://opencv.willowgarage.com/wiki/ . Here you'll find cheatsheats, reference manuals, examples and some tips. great help and starting point.
Thanks
What are your criteria for measuring the relative superiority of programs for image processing ? For example, if you are a Mathematica expert then you will find it easier to use Mathematica for the task. On the other hand, if you are a penniless student then you will find Java and some of its libraries more to your taste.
EDIT: in answer to OP's comments ...
'ease of image processing' is entirely subjective -- if you don't know Mathematica then it will be difficult to use it for image processing -- so this one is your call.
'processing time' is entirely objective -- but do you have the time to try out all 3 of your suggested options and compare them ? For a BE project you'll be far better using the tool you are most comfortable with and spending as little time as you can wrestling with an unfamiliar tool for the sake of a bit of extra speed.
'cellular automata' for image processing -- don't know how relevant it is, but Mathematica has inbuilt functionality for cellular automata.
I would look into the ImageMagick/GraphicsMagick family (SO discussion), which has several Java wrappers (e.g., JMagick).
you could use ImageMagick or why not look into the JMF (Java Media Framework)
Matlab is the better of the two. It has huge built in libraries and implementations of thousands of algorithms. Its fast, easy and well documented.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
Most of the desktop application development I do is in Swing, and I'm curious to hear people's thoughts on using JavaFX and/or Adobe Flex for building desktop applications. Have you had success building desktop apps with these? Or would you stick with Swing for now and use tools to help make Swing development more productive?
If you're making desktop apps, I'd stick to Swing. JavaFX/Flex/Silverlight would be more appropriate for RIA - rich internet apps. Although I'd argue that none of them would be a choice for the long term - looks to me like HTML5/CSS3/Ajax are winning the day, but thats a pretty subjective area. But for desktop apps - I'm a big fan of Swing (also Java Web Start is a very underrated technology)
I would say that JavaFX can be seen as a kind of extension of Swing with a new way of developing a Java GUI by using a declarative programming language: the JavaFX Script. JavaFX Script code looks exactly like a JSON script, unlike Adobe Flex or Microsoft Silverlight which uses an XML syntax.
JavaFX Script can interface with Java and therefore can call Swing components easily. It's really a new generation of GUI API, like Swing was for AWT: nice graphical components, new easy ways to manage layouts, really nice features to build dynamic interfaces: bindings, timers (to build animations), etc. Have a look here: http://www.javafx.com/samples/ and to the tutorials and see how fast you can build a kind of Google Picasa application... The API even contains some tools to use easily web services: you can find plenty of samples of GUI built in JavaFX connected to some public web services (like a Weather Forecast tool).
And the best... is the deployment part. You can embed your application within an html page, like an applet, and the user can drag and drop the application to her/his desktop to use it whenever she/he wants (without returning to its browser)!
Really, I think JavaFX, at its early stage though (v1.2), is a really good tool and represents the first step for Java toward the next generation of applications: the Rich Internet Applications (RIA).
Java Swing is an established and mature technology for desktop development. You'll be able to find lots of information online and plenty of sample programs. With that said, however, you might want to consider Adobe AIR. AIR is basically a runtime that lets you run your Flex apps on the desktop, and gives them access to local resources such as the file system. I've written Java Swing apps for 10 years and I am amazed at how much more productive I am using Flex/Adobe AIR. One nice aspect of Flex is that you can create your GUIs declaritively, much like how you use HTML to declare the layout of a webpage. It's a much more concise way to specify a GUI, and much faster and easier to maintain than the reams of Java Swing code you need to do the same thing. I wouldn't recommend JavaFX since it is so late to the party and hasn't really gotten with mainstream developers.
You should try them all and see which one fits best with your requirements. If you want to see what you can do with Flex and how to do it then check out Tour de Flex.
Some of the advantages of Flex are that it is mature (over 5 years old now) and a significant area of investment for Adobe. You can also find numerous examples of AIR apps built with Flex in the Adobe AIR Marketplace.
Swing can look good with Substance L&F.
However, if you are developing alone (as opposed to with a team), trying JavaFX might be a good idea.
Please read the about this, write extremely lightweight swing applications and with the same code base move it to web.
demos
runtime
I had evaluated these for desktop application and finally desided to go for JavaFx . This have very good media library and hardware accelerated graphics and media capabilities . With Jdk 7 update 6 onwards contains JavaFx totally I integrated no separate installation is required . Java swing is very good technology and will be continued but I see JavaFx is the future for GUI and Internet application to some extent. Biggest advantage for me was that JavaFx app could be converted to exe files with native packaging
Also try scenebuilder for drag and drop component designer
I feel that I do not have enough information to answer this question. There are many applications in which an AIR approach is a better choice, other applications use other technologies better. I am primarily an AS3/Flex developer, but I know there are many instances where one of the Java platforms is a better choice. Now that Flex is no longer an Adobe product but rather a Apache product, it will either improve the product as the users will create the roadmap, or kill it off completely.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I've recently heard about Apache Pivot being moved to the Top Level Projects category and I was wondering who has tried the most recent version and compared it to other RIA tools. What are the proper categories for comparison?
It seems to be easier to pick up for Java developers since JavaFX has a different scripting language. The Pivot developers say that Pivot is what Sun should have made instead of JavaFX.
Good to hear from you. :-) I agree that we tend to focus more on applet deployment in Pivot's design. However, there is nothing inherent in the platform that prevents an application from using multiple top-level windows. It's just not something we cater to since it isn't relevant to our primary use case (which, as you noted, is browser deployment). Note that it is also not possible to create multiple top-level windows in Flex or Silverlight.
Re: "who is creating applets these days?" - it's not so much about creating applets as it is about creating RIAs. If you ask the question, "who is creating RIAs?", I think the answer would be "a lot of people". Pivot simply allows developers to build RIAs in Java (rather than ActionScript, for example).
Greg
I worked with Pivot and even been part of Pivot development. It is a nice little library, but...
It cannot replace Swing or JavaFX. The original authors are positioning it to compete with Adobe Flex. Because of that its concepts are more like applet than desktop application. It is almost impossible to create a modern desktop application simply because it has a concept of one main window and all the child windows are "inside" of it. I discussed this with authors but it looks like this is the way they want to go.
The library uses its own custom collections library which is sort of strange, but it isn't a show stopper.
Other then that the library is nice. But who is creating applets these days?
Well, I checked pivot 1.4. You can have sub-windows.
Oracle/Sun is putting a lot of effort into promoting JavaFX but it seems to me that all the layout feature etc from swing are gone in profits to some multi-media stuff. Right now FX and business applications are two things very far from each other.
For business RIA application, my first impression is that Pivot is much better designed than FX.
Pivot provides a lot: binding, easy web service, nice design, xml definition of UI... - Yes a lot to consider for a Java developer.
Not perfect but looking at what they have accomplished these last 6 months... impressive!
If you are intereseted in the statistic view -
I compare through 'google trends' between JavaFx to 'Apache Pivot'
and looks like there is no competition - JavaFx lead in a rate that is close to 1 to 0
so it gives perspective about the standard of the industry towards those frameworks.
http://www.google.com/trends?q=apache+pivot%2C+javafx&ctab=0&geo=all&date=all&sort=1
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
When I use Java applets, they tend to be slow, don't integrate very well with the browser environment and often require a few click throughs ("No, I don't want to give this unsigned application free reign of my hard disk").
So, I'm curious.
Are these problems insurmountable? Are there Java applets out there which integrate well with the browser experience (in, for example, the way a well-designed Flash application does?) Can you point out any examples of really "nice" Java applets?
I'm asking this because I want to know if I should be taking a more serious look at Java-in-the-browser, or if Flash will remain dominant for the foreseeable future.
Edit: Unintentional flame bait has been removed. Sorry for any offence caused.
The Facebook asynchronous image uploader is a Java applet.
Update: Apparently not developed in house at Facebook. This seems to be the product.
Amendment:
Now that the question has been updated to be a bit more concise, I thought I'd add more to this answer.
This kind of problem, a mass image uploader (in this case), is the kind perfectly solved by a Java applet. Why?
It uses native UI elements, so users are not confused, or have to learn a new interface.
It can save massive amounts of bandwidth and overhead, because image transformations, such as resizing and cropping, can take place on the client side, rather than the server.
Write once, deploy everywhere (almost, sorta).
Visual Thesaurus is the coolest / best applet I know of.
Check out PulpCore. A really awesome Java applet framework:
http://www.interactivepulp.com/
Performance for it seems pretty amazing too if you check it out on bubblemark.com
Some of Ken Perlin's applets are beautiful.
see http://mrl.nyu.edu/~perlin/
eg:
http://mrl.nyu.edu/~perlin/experiments/unicycle/
http://mrl.nyu.edu/~perlin/homepage2006/simplex_noise/index.html
http://mrl.nyu.edu/~perlin/experiments/orange/
(...)
Simple floor plan designing with java applet here. Works much faster than dragonfly.autodesk.com or floorplanner.com (both are flash applications).
A few things...
Some game sites, like popcap.com, use Java applets for their games, and they look pretty good and are very usable.
As far as "why is that button cropped?" - that's probably a layout manager issue. See my article on layout managers, in particular:
http://java.sun.com/developer/onlineTraining/GUI/AWTLayoutMgr/shortcourse.html#whyNeed
There are many nice looking applets created with Processing (which is basically Java with some fancy graphics libraries included).
Just take a look at this visualization.
(source: zumkuckuck.com)
In high school I used to play a ton of Yahoo Games and I'm pretty sure those are all java applets. It looks like Yahoo have updated their site since I went there last but you can still find all of the old games here.
The MMORPG Runescape uses a Java applet as a client, and works very nicely, although the graphics aren't nearly as good as other games of the type I've seen. Jagex, the publishers, also have a game site called Funorb.
Another game which is in Java (though not an applet) is Puzzle Pirates. It's not exactly beautiful but it's cute and it's very addictive. Also, it's very speedy and smooth (which has been a knock against Java applets).
Java applets are like flash scripts - They can be used for good, but are often used for evil (e.g., annoying banners). IMHO the main reason that they didn't catch on is that they require tended to require too much skill and used AWT/Swing which produces worse UIs than what a designer with little programming skills could achieve with flash.
I would say that yes, they still exist, but more for business goals that don't require pretty UIs. For example, A lot of web-based statistics calculation tools are based on nice applets.
It's certainly possible. Java2D (the standard graphics component in Java) is capable of rendering beautiful stuff. A big problem is that the default Swing Look and Feel is ugly. I believe Java 7 will have a better one, but there are also very beautiful third party ones such as Substance. I've personally developed a small Java applet game which, apart from the jagged text in the intro screen (which is a bitmap, not rendered text) is visually indistinguishable from a Flash game.
My mom is addicted to the casual gaming at pogo.com, and I've gotta say, they've done an amazing job at fun, easy to learn, nontraditional games that look perfect. I'd love to see their code, honestly.