Saturday February 06, 2010 Don't move your kenai.com project! :) Rescue is on the way. Ted Farrel says on the updated kenai.com home page:
Our plan is to shut down kenai.com and focus our efforts on java.net as the hosted development community. We are in the process of migrating java.net to the kenai technology. This means that any project currently hosted on kenai.com will be able to continue as you are on java.net. We are still working out the technical details, but the goal is to make this migration as seamless as possible for the current kenai.com projects.
Yay!
Posted by seapegasus ( Feb 06 2010, 11:18:50 AM CET ) Permalink Comments [0]jMonkeyEngine Documentation contest (2)
So yeah well... I didn't submit my tutorial to the jME documentation contest after all (I was on an island without wifi -- don't ask), and nobody else submitted anything either, quite sad. The whole event happened at quite short notice and over the winter break, maybe nobody felt inspired to work. ;)
Anyway, here is my Terrains, Heightmaps, and Texturing article. I haven't fully written the section about terrain texturing yet, I'm still looking for the optimal combination of settings (texture units + texture size + procedural textures). But the tutorial already covers heightmaps and terrain generation and loading.
When I worked with terrains the first time, I kept adding translation constants and shifted and scaled them, all to get an intuition for how big they were, and where they would be rendered, compared to smaller models I loaded. Some terrains ended up being rendered smaller than expected, others bigger; some looked clear and smooth, and others blurry and angular; some were floating "in mid air" and others stuck to the "floor" (the x/z plane) or in a faraway corner. No details in the javadoc either. How mysterious. (Note to self: Get developer permissions and add javadoc!)
So I sat down and tried to find out: How does the terrain's heightmap size map onto world units? I have to scale every terrain (you will notice that, by default, they are too steep), is there maybe one obvious factor I can apply that makes them look more natural? What is the default position and size for a freshly loaded terrain anyway? And what is it after scaling? And lastly, how do I calculate the right values for the texture intervals in a procedural texture?
Since it's impossible to judge distances in the empty space of a 3D-scenegraph, lots of trial and error ensued: I created long white boxes (1*1*256) around the origin, to mark the x/y/z axes. I also marked points such as (128,128,128), (255,255,255), (0,0,255), etc with AxisRod objects. Finally, when looking at the terrain rendered next to these markers, the pattern behind heightmap values and world units became clear. When I now create a landscape with a water surface, I can predict which part of the terrain will be under water, and adjust the procedural texture accordingly. No blooming meadows on the sea floor anymore! :)
Next stop: Decreasing the blurriness of my terrain textures. Am I supposed to use the same detail texture on the whole terrain, or can I have several? If you have any best practices regarding jME texturing, please leave a comment. :)
Posted by seapegasus ( Feb 02 2010, 06:19:08 PM CET ) Permalink Comments [0]jMonkeyEngine Documentation contest - Win a prize!
Erlend announced the pilot run of the first jMonkeyEngine Documentation contest today. Submit a jMonkeyEngine-related tutorial, and (by public vote) win the $25 prize money! It doesn't have to be a new tutorial "from scratch" - significantly adding to an existing tutorial also counts, e.g. by updating something from jME 1 to to jME 2, or gathering the condensed learnings from a forum thread. You can even resubmit a tutorial that you contributed before the contest was announced.
So if you figured out something useful that has not been documented yet, tell us how you did it! Create the most simple case as a sample project, javadoc the essential lines of code, and zip it as download. Write a concise article around the crucial code blocks, explaining what the options are and why you made certain choices. If it is something visual, add a screenshot of the result. Your readers may also be thankful for a nice short intro paragraph such as "Read this to learn how to do X. First we do A, then B, then C. In the end you will see D." (Note, those are not the contest rules, but just my personal suggestions.)
If you cannot think of a topic, Erlend makes a few suggestions:
To avoid duplication, have a look at what is already there. I am updating the documentation home page, so please also have a look at the new version to see what we have, what is missing, and what needs to be rewritten.
Ready to go? Submit your tutorial topic here! The contest ends in six days. Have fun!
PS: Just in case you were about to say: "If it's so easy, why don't you participate?!?" -- I might resubmit one of the jME tutorials I already wrote (e.g. jME with NetBeans). We would like around five or more participants -- if five others apply with new stuff, I will gladly let them go ahead and not participate with my (one month) old stuff.
Posted by seapegasus ( Dec 21 2009, 07:21:20 PM CET ) PermalinkFree, Stable, Bleeding-Edge - Pick Two
I'm reading this German article series about an interactive IDE comparison. By interactive they mean that they invited three experts and posed the same 3 generic question about their IDE of choice, NetBeans, Eclipse, or IntelliJ. Then they open the mic for user comments, and the interviewees will respond these more detailed questions in the last part of the series. Nice idea!
The vibe I'm presently getting from the interviews and comments is that it's quite a fair fight. Eclipse has a harder time winning the poll race today, since NetBeans usage now also ranges around 40%. :-p
When reading the comments I had a thought. These three IDEs survived because they took their place in one of three clear niches. Let me show you what I mean:
Right? Well, and reality says: Tough luck, pick two!
Eclipse is free, and you get tons of new features quickly, but then you stumble over incompatibilities because plugin developers cannot possibly keep up with a development cycle that fast. NetBeans is free and comparatively stable and consistent, but some users think QA is too slow with promoting new plugins into the update center. With IntelliJ you get cool new framework support and it's reasonably consistent, but if you want that, plus Java EE, plus scripting, plus web app dev, you better be willing to pay.
So even after the IDE comparison we still have to make the same decision which trade-offs we are willing/able to accept, and stick with that choice, at least per project. I'm slightly exaggerating of course, it's not all that black-and-white in reality: IntelliJ does offer a partial free edition; NetBeans is bleeding-edge as far as Swing, JavaFX and Java EE 6 is concerned; and Eclipse plugins were at least stable enough to take the Eclipse community where it is today. :)
Speaking of plugins, I was poking around in the netbeans 6.8 plugin center and found the following three new ones:
PS: Oh and don't let it confuse you if the file title of an edited file is marked in bold. If you prefer the asterisk, there is a command line switch (-J-Dnb.tabnames.html=false) to reactivate the 6.5-style behaviour. I'll keep the bold text for now.
Posted by seapegasus ( Dec 16 2009, 08:16:15 PM CET ) Permalink Comments [1]I'm presently looking at netbooks since somebody told me he wrote his weekend project on an Eee PC, with Eclipse! I looked at some specs and apparently, modern Netbooks are about as fast as 4-year-old PCs. So, NetBeansBook, here I come. :)
Mind you, I'm not trying to do enterprise-level development here. I just would like to use the time on a train to, say, refactor and javadoc Java SE projects. I recently got my hands on an Intellibook, and the owner let me run a 3D Java sample app (based on the jMonkeyEngine framework). I ran it straight from the USB stick, with several other applications eating away memory in the background, and it worked without batting an eye.
Sure it wasn't the best framerate ever, but now I at least know that a netbook-type graphics card (e.g. GMA 950) generally supports OpenGL (and the jMonkeyEngine). Obviously a netbook wouldn't be fast enough to play a modern 3D action game, but at least I should be able to check whether my refactoring didn't cause any obvious runtime errors in my low-fi project. The Netbook is not meant to be the main development machine, it's more an internet-capable typewriter. With refactoring. ;)
While I was pondering that, I deinstalled a few plugins to make my "Java SE" NetBeans use as little memory as possible (roughly 100 MB). To simulate a netbook with Linux, I even ran NetBeans in a VirtualBox with a 800x600 resolution, X-) and went through this DarkStar/NetBeans/jMonkeyEngine tutorial. It all went well, albeit slow. I only got this nagging feeling about the statusbar at the bottom. Why is it taking away such an impossible amount of space?!?! On 600x800 it sure seems like it. ;)
I was looking around for a way to disable it, when I realized that it actually does something useful: It shows paths to open files. You already know that you can see the file path by hovering the pointer over a file tab in the editor. But the statusbar is also handy when you ctrl-tab through open editor windows, and some of them have the same name, then it shows you the full path for disambiguation. Oh well, I guess it can stay then!
Posted by seapegasus ( Dec 07 2009, 07:45:27 PM CET ) Permalink Comments [2]Getting PortalPack 3 for NetBeans
In case you are looking for the NetBeans Portal Pack (you know, for developing Portlets)
I saw the question come up on nbusers, and now that I found it, I thought I'd mention it here. :-)
Posted by seapegasus ( Nov 23 2009, 06:45:37 PM CET ) Permalink Comments [2]Latest news from the netbeans.org migration: Since Wednesday, the Plugin Portal is now connected to use the same Single-Sign On as the rest of netbeans.org! Thanks to the migration team for setting this up. The wiki, bugzilla, mailing list subscriptions, and the pluginportal all use the same account now.
And finally we also have spiffy user profile pages (log on and click Edit Profile) where you can for instance enter social networking data and search for other developers by interest to discuss a question or to recruit new team members for your project. If you are especially interested in one of the supported technologies, click "bookmark project" on the projects page to become an observer, and join one of the project mailing lists.
It can still happen that you come across broken links here and there - we are tracking them down, thanks for your reports! Some things we're working on: Some attachments links pointing to the wiki and the previous download section no longer work, we are still uploading them. NetBeans.tv is moving to channelsun (this means embedded and direct links to videos that were hosted there don't work), and we are updating pages where we embedded videos -- for example the netbeans platform and the teach yourself JavaFX screencast series, and others.
Some projects were renamed for clearity, for instance nbi.netbeans.org is now called installer.netbeans.org, and translatedfiles is now called nblocalization.netbeans.org. Others were moved, for example the portal pack has moved to contrib.netbeans.org. This means its sources can be found in main/contrib/ and the plugin itself on the update center (in the IDE's Tools menu) and the web page here.
If you want to know more, there is a help link at the top right of your profile that points to our help set.
Posted by seapegasus ( Nov 12 2009, 05:07:51 PM CET ) Permalink Comments [1]Creating 3-D Games With jME 2.0.1 (updated)
All of my two readers asked me to update the Developing 3-D Games with the NetBeans IDE and jME tutorial to jME 2.0.1 (which the jME sneakily released last month while I wasn't looking) ;) so I did that now, sorry for the delay, please have a look!
The biggest change in this release is the directory structure of the packaged native libraries. And linking those libraries correctly is, coincidentally, the biggest blocker to get started. So the vital java.library.path instructions stopped working at all with 2.0.1. I updated them now, but I only tested it on Mac and Linux, too lazy to start Windows, and I may have made typos when spelling out the long path. If you tried the tutorial, please leave a comment whether it works -- and which on platform you tested it, would be nice. :) Yup, jME is truly platform-independent now, there are natives for Solaris too! Dang I missed trying that at work.
(Speaking of native libraries, does anyone have experience with getting jinput and lwjgl for 64-bit Macs? Someone on the jME forum had the question, but I'm still using a 32-bit Mac and wouldn't know. Would suck if that didn't work?!)
I also hurriedly updated the downloadable sample project (the one with the fabulous blue teapot). It also includes two Ant targets for packaging the application into platform-dependent distributions. (I still need to check how I can decrease the file size here.) If you just want a quick test whether jME 2.0.1 works for you, try this sample project, and tell us here whether it works.
Also note that the tutorial mainly targets beginners and users who want to get started writing their app quickly. I may later add more configuration tips for developers who check out the trunk. My version of the tutorial uses the (static) sources directory that comes with the download. But you guys are smart enough to live on the bleeding edge of the jME sources, then you can also follow the tutorial and figure out to use your trunk checkout path. :) Have fun!
Posted by seapegasus ( Oct 28 2009, 11:05:56 AM CET ) Permalink Comments [2]Is it true? A JDK 6 for 32-bit Macs?! Searching the Apple home page returns nothing. :-o Tomas H. tells me to check the Snow Leopard Release Notes... Heureka!
Java for Mac OS X 10.6
The JavaVM.framework on Mac OS X is provided as an integrated component of Mac OS X 10.6, and vends Apple-provided and 3rd party Java virtual machines via various deployment options (command line tools, applets, applications, and Web Start). Mac OS X 10.6 contains an Apple-provided Java SE 6 version of 1.6.0_15 for both 32 and 64-bit Intel architectures.
I didn't plan to buy Snow Leopard, but hey, if it makes JDK 6 and Web Start work on my old Mac, why not, still cheaper than buying a whole new 64-bit machine. A JDK 1.6.0_15 should even include JavaFX, which has been there since 1.6.0_13 or 14, right? Where's the catch, why are they hiding this so well? :p
Posted by seapegasus ( Sep 23 2009, 06:45:44 PM CEST ) Permalink Comments [2]Creating Java 3D Games with NetBeans (2)
As a quick follow-up to the introduction to 3-D Java games with jME and NetBeans that I wrote: I uploaded the sample project to Kenai now. (No Kenai login needed.)

If you use an older version of NetBeans without the Team menu, download the zipped NetBeans project directly.
The project's libraries and packaging scripts are already set up, so that you can use it as the base for your own jME-based project. You will still have to learn the jME APIs, but at least you don't have to worry about libraries and linking. :)
PS: I also contributed the Getting Started with jMonkeyEngine + NetBeans tutorial to the Community Docs page. It describes in detail how this sample project was created, and contains additional tips where to find sample code and how to set up code completion etc for jME APIs in NetBeans.
Posted by seapegasus ( Sep 02 2009, 03:01:54 PM CEST ) Permalink Comments [4]Somebody asked us recently via the feedback form how he could resume an interrupted download, and whether we had any tips how to download NetBeans with slower bandwidths. In case you have a similar question, here is an overview of your options:
| Your Situation | Our Download Tip |
|---|---|
|
Download speed: Fast, high bandwidth, no interruptions. For example to install NetBeans for the whole team at school or at work. | Download and burn the ISO image of the complete NetBeans IDE DVD Starter Kit. It's huge (over 3GB), but it contains all installers, a lot of documentation, tutorials and screencasts in English, and many translations (Simplified Chinese, Brazilian Portuguese, Japanese, Russian). |
| Download speed: Good bandwidth | Pick the 'All' NetBeans bundle from the NetBeans Download page. (Or choose one of the specialized smaller bundles if you are mainly a Java SE, PHP, Ruby or C/C++ developer.) |
|
Download speed: Slow, low bandwidth. Also known as "Remaining Time: 23517028 days" |
You can pick a lightweight (26-46MB) installation bundle from the NetBeans download page. Installing one of these smaller bundles will already contain what you need for Java SE, PHP, Ruby, or C/C++ development, respectively. If you need Java EE or Java ME support, try downloading additional modules bit by bit, via the update center. Use the resumable Sun Download manager to get the necessary SDKs. |
| Download speed: Average or good bandwidth, but danger of network interruptions | You can download the NetBeans IDE + JDK bundle using the Sun Download Manager. The SDM allows you to pause, resume, restart, and verify the downloaded file. |
New: Custom Homepages for Kenai.com Projects, and more!
Our feature requests have been heard. :-) Did you notice the new options for Kenai-hosted projects?
As entry point, each project can now have a custom website with a nice "vanity" URL, or you can set it to show the wiki home page. You can also customize the message sent out to new members, and track statistics with your Google Analytics account.
Use the Team > Kenai > Login menu in NetBeans to create a new kenai.com account, or to access your existing projects. Click Details in the Kenai window to quickly open a project's home in the web browser (I stay logged on and keep the password in the browser keychain), then click Manage This Project. Have fun!
Posted by seapegasus ( Aug 07 2009, 08:07:50 PM CEST ) PermalinkCreating Java 3D Games with NetBeans
While taking a few days of vacation (before coming back in time for the release of NetBeans 6.7.1!) I finally got my jMonkeyEngine notes and files in order. If you don't know it yet: The jMonkeyEngine (jME) is a free and open-source 3D engine for creating 3D games and simulations in Java.
(I would have blogged about it earlier, but the project is moving servers in July... So if the links below should change again and break, search the web for "jmonkeyengine" and then search within the page...)
If you have never seen it before, these jME videos and demos show best what you can do with Java3D nowadays.
I had created a simple 3D world with jME 1.0 and started migrating useful elements to jME 2.0 -- which is well doable despite a few API changes, especially since NetBeans marks the broken lines, fixes the import statements, and I can get the new syntax from the code completion popup. Here are my notes that I shared on the jME wiki:
There is probably more to be said about distributable JAR files, but OneJar solves my current questions. If you figured out how to get native libraries into a webstartable JNLP file, leave a comment. This blogger here has some more tips regarding JNLP signing and where to place the native libraries, so this is my next lead to investigate. But first I need to get my rusty 3D app going again--taking into account the new stuff I've been reading about programming patterns lately, suddenly my old class structure looks quite... sub-optimal. ;)
PS: updated links to stable jmonkeyengine.com URLs.
Posted by seapegasus ( Jul 28 2009, 08:23:44 PM CEST ) PermalinkAnd now the JavaOne session everybody has been waiting for: James Gosling's Toy Show! Here a short rundown of the coolest tech demos we saw this morning:
Angela Caicedo and Simon Ritter are back, and this time they hacked a standard household wiimote. Simon brought a small white board and attached a few markers. He used an JavaFX app to triangulate the position of the markers with data from the wiimote IR sensors. He then projected a perspectively distorted image of a playing card onto the surface, and the image stayed in place even if he moved.
When he turned the board around, the app detected the motion and projected the backside of the playing card. :) It also supported more "motion sensor"-like features like shuffling to flip to a different card. To prove that there is no hidden magic in the board, he replaced the board with an opened white umbrella (again with markers) and projected an image of planet earth.
Continuing the them of "JavaFX is for all screens of your live", Angela presented her approach to a wiimote hack: Similar to her demo from last year she relied on a Minority Report-like glove with IR markers. As apposed to Simon, she can turn any white surface (such as a wall) into a "touch screen". In her demo she projected a canvas and a color palette, and move her finger in the air to paint lines and mix colors . She could reusue existing JavaFX features to animate a ball icon rolling along the drawn line--until the line ended and the ball dropped off the canvas. :)
Next Tor Norbye demoed his new JavaFX designer tool: He placed an object node onto the canvas and recorded 3 different keyframes, then he let JavaFX interpolate the animation. The end result had the textnode swing in and bounce off the floor to its intended position.
Tor also demoed a very userfriendly interface for binding components to values: You drag a line from one component to the other, and a menu of possible target values shows up that would make sense to bind. To give you an example: You may want to bind slider's left/right side to the video's start/end position, and a toggle button to the play/pause action. of course you can do that with all components and all properties (opacity, translation, color, rotation...). His tool allows you to save visual content for mobile and PC screens (and soon also TV).
We also learned of PlaySIM, a simulated SIM card (JavaCard) on a Sun SPOT. It allows you to set debugger breakpoints in live SIM card code. In the demo they used one Sun SPOT's motion sensor to trigger the menu of a phone (which was attached via a 2nd SPOT). check out playsim.dev.java.net for more details.
The FIRST robotics league brought one of their robots from this year's lunacy game: Robots throw balls and catch them in baskets. There are different periods in the game, e.g. one with human remote control, and one with autonomous robot control. The finals were very popular and filled the Georgia Super Dome. :) The robot on stage sucessfully collects balls, but then proceeded to throw them at James Gosling... Today's news is that from this year on (?) the students will be able to program robots in Java too (including on-device debugging), not only C/C++ (if I got that right).
The big highlight for the NetBeans Community was Sven Reimer's NetBeans platform-based application: A controller used in satellite ground stations. Gosling recollected when he used to analyze satellite data with a PDP8 (?) that had less power than a smart card... :) Sven's app ran in demo mode only since "some grumpy people didn't let us actually control satelites". ;( As a final surprise, Gosling became a honorable dream team member (well, he got the shirt) and received a copy of the community-translated (!) NetBeans platform book (originally in German).
Another interesting guest was Visuvi: Not only can you upload (cell phone cam or hi-res) images to their search engine and have them analyzed (E.g. to answer the question "who pointed that?"), but most importantly, the new image analysis technology is used for cancer research (e.g. you can search through a biopsy image database for visually similar cases).
Other demos included a micro financing app, a Solaris+JavaFX powered jukebox for starving musicians, a printer-scanner for teachers that scans student's test sheets as well as the answer sheet and then calculates the score.
The last demo was a video interview with the team around the Lincoln car that was on display in the Java Pavilion all week. The plan was to create a fast-driving drive-by-wire vehicle for the Realtime Java urban challenge. And Mr. Perrone refitted a stylish Lincoln Continental: He added batteries and a generator, self-diagnostic sensors and GPS, and finanly touch screen UI. The break lights and old speedometer are controlled electronically. They showed some cars on a test drive, but, sorry, I missed whether the Licoln ended up being remote controlled or not. (Leave a comment if you caught that please)
I think this year's message was: Different communities use Java technology in different ways. Astonishing (and inspiring) what you can do! :-)
Posted by seapegasus ( Jun 06 2009, 01:08:51 AM CEST ) PermalinkMean Java Puzzlers, Swiss JavaFX usecases, and 3-D jME Games
While waiting for the NetBeans Platform development session to begin, let me quickly show you three other cool JavaOne 2009 sessions, and what I learned from them:
If you're not sure what that method does, it doesn't do what you think it does. Let the Java puzzler experts Bloch and Gafter introduce you to the pitfalls of the Java language - shlocking and awe-inspiring!
The freely available Java3D game framework jMonkeyEngine solves many challenges that you will encounter when developing a Java 3D game. Learn how well-implemented collision detection and game physics add realism and immersion to your next killer game!
Technical Session: JavaFX Technology in Action: From Design Tool to Desktop, to Mobile Device
Canoo's Mike Mannion describes how his company used JavaFx to develop their Music Pinboard and then quickly migrated it from the browser to the desktop to mobile devices.Posted by seapegasus ( Jun 05 2009, 11:17:45 PM CEST ) Permalink