I asked this question in an Nasa WorldWind forum but haven't got a reply yet http://forum.worldwindcentral.com/showthread.php?t=24428
So, perhaps you could help me :).
I'm still playing around with WWJ and what you posted here http://forum.worldwindcentral.com/showthread.php?t=24318 THX!
currently I'm trying to add different layers, so that I can add several polylines and can clear them, so that I can "let them grow in realtime".
but my aim is still to implement at least basic represantations of moon and other celestial bodies and the spacecraft.
I want to use WWJ for a lunar mission and I'm simulating a n-body problem and I would like to have representations of all bodies.
it doesn't matter when there are just spheres, but they have to be at least the size and te position of the body simulated.
how can I chieve this? I couldn't find this in the wiki.
the uber-thing would be to use WW's moon model and place it accordingly, but just a sphere painted grey would be okay :).
(that's why I asked for a solar view in another thread :))
Andreas
Apologies in advance if you already know about these, I've never used WWJ myself -- though I may have to play with it a bit when I get home tonight.
Sun has a page on its website (link) about getting started using WorldWind in your apps. And the WorldWind people have a wiki that contains a developer FAQ, among other things.
Related
So I have come up with an idea for a .io style game using java. (I know it isn't actually a .io, that's just the domain that is commonly used.) I would like to start out by making a grid and I have tried with JFrame and JPanel etc but I think im barking up the wrong tree...
Anyone got any useful advice in terms of making a game "space"/map? I'm a fair beginner but I'd be OK with a not-too-in-depth explanation, just want a a good point in the right direction. And yes, I know the IMMENSE amount of work that goes into the multiplayer networking and everything else like that but I just want to get the game up and running as a single player to start with.
I think other people would appreciate a decent answer to this question aswell...
Thanks!
Can you use JavaFX? They have a GridPane which might be what you want. If all you want is a grid-like background and not an actual grid like slither.io then I believe you can just draw an image to background. You can (should?) also use OpenGL. If you plan to use OpenGL then you can use LWJGL or a game engine like libgdx
You would have a much easier time doing this in JavaScript using an HTML5 canvas. You could even use the Socket.io framework for handling all the networking. There's tons of tutorials for that stuff on YouTube, and switching to JavaScript is stress-free. I learned the general syntax in under an hour after coming from Java/C++.
I own a sports apparel company and I'm looking to have an applet built that will allow customers to see how their team names will look in certain colors on jerseys. Below you can see the final result of a competitor site's Flash applet where text is rendered on 2D surfaces/images.
My requirements: I need users to be able to set the font, primary text color, outline text color, and text style (arched or straight).
So my question-- Is this sort of text rendering possible with only Javascript/PHP?
If so, what limitations do you for see? I've been told the arching and outline text color may be issues. I've also been told that I may have to upload library files to a server where the actual rendering may take place.
If not, what scripting would you guys recommend? I'm trying to stay away from Flash because it's slow and costly.
I'll be passing this onto our developers so please feel free to be as detailed as possible. I figure'd I'd save them some leg work!
Thank you!
Depending on how complex you want your graphics to be, html5 drawing abilities could be used. Check Raphaƫl library, for instance, webGL/canvas renderers already have a lot of features in modern browsers.
As of the solution with server rendering, it's also possible with gd2(php), but imho that would be less convenient, at least try something different from php (btw, what's your backend running on?)
Your competitor's solution with java applet honestly seems the easiest, except that it requires jre, which few people are eager to install =)
That's kind-of a high level question, but yes you can definitely use javascript for it.
If there's a problem with getting characters to look right, you can always save each letter as a separate image and have javascript place them next to each other in preview. I'd try to see how close you could get with the existing fonts first.
Layering the text: one color large font, then a different color smaller font will give you the outline effect your looking for.
I want to create a timeline-based editing GUI in java - in the style of a video-editing software (such as adobe premiere for example). Below is an image, how I have the GUI in mind (sorry for not including it directly - as a new user that feature is disabled):
Whats currently implemented is just the timeline-slider at the top (with JSlider) - all the rest is just made up with Photoshop (also the black-line that goes down from the slider, through the layers).
Now my question is not very specific, I just wanted to get some input how I could implement the rest as nice as possible. To be a little bit more precise, I would appreciate hints to the following topics very much:
How to organize the whole gui - concerning the time indicator-line
which goes from the top to the bottom through all the layers?
How to visualize the waveform, are there good (and free) packages
that can be used? (audio files are either MP3 or WAV)
Which element to use for the text-segment layers (they should be draggable & droppable somehow) -> JLabels, JButtons, how to best solve the drag-n-drop feature?
You see I have still some work ahead of me, any good advice or point to the right direction would be very kind!
For the waveform issue you could take a look to this question and the accepted answer. The class creates a PNG image file, but you should be able, instead of saving the image, just display it in your programm.
The drag n' drop thing is well explained in this tutorial by Oracle.
I am generating some images using the Graphics2D interface, and occasionally I'd like to be able to draw some text on the image and apply to it effects like the ones in Adobe Photoshop.
Right now to generate a 'shadow' on the text I am drawing the text twice, once in the original color, and once in black with a slight (1px) x&y offset. Unfortunately this is overly simplistic as I need more control over the shadow (opacity,size, spread).
As for Inner Glows and Outer Glows, I am not really sure where to start; a mask/gradient paint/alpha blending?
Is there a Java library for producing these types of effects? If not how would you go about creating these effects?
I would highly recommend the book Filthy Rich Clients. Chapter 16 talks about drop shadows. You also might be interested in the this blog post. Chapter 17 talks about the glowing effect. There is example code on the website for both. The rest of the book is well worth reading as well. I couldn't put the book down when I read it. There are many other fun effects explained and demonstrated in the book.
The jhlabs site is also a good site, as mentioned.
Edit:
For a library, I would look at Painters in the SwingX library. Here are several tutorials:
http://weblogs.java.net/blog/2006/09/20/introducing-painters
http://www.curious-creature.org/2006/03/24/swingx-painters-demo/
http://www.jroller.com/gfx/entry/advanced_swingx_painters_demo
This site has got a lot information about filters and effects, I think the sourcecode of the application is also available.
...similar to those produced by email clients like thunderbird or outlook, sliding up or fading in from the tray.
The simple popup: Look at http://jtoaster.sourceforge.net/
For the fancy stuff look at what Java 2D can do:
http://java.sun.com/products/java-media/2D/samples/java2demo/Java2Demo.html
Check Composite -> Composite FadeAnim.
What are your notifications for? Is it for a program that already exists, or are you writing a new application?
I ask because Adobe AIR has some functionality for doing this sort of thing, either as a Flex based application, or an AIR application written in HTML/JS. But, you wouldn't use AIR unless this is something you were building from the ground up.
Swing's Timer class (http://java.sun.com/docs/books/tutorial/uiswing/misc/timer.html) can be used for rudimentary animation - just use the timer to update the location of the panel containing your content.
I attended a JavaOne session last year where they did some pretty slick stuff with this.
Slides : http://progx.org/users/Gfx/FilthierRicherClientier.pdf
pay special attention to page 29 and on.
And here's a website from the same folks, but with more code and screenshots, etc...
http://today.java.net/pub/a/today/2007/10/23/create-moving-experiences-with-animated-transitions.html
The end result of all of this was very, very slick.