By seapegasus on May 18, 2010
Do you remember jMonkeyEngine, the cool 3-D game framework from JavaOne? Yesterday, the first alpha of the upcoming jMonkeyEngine 3 has been released!Read More]
Here is what's new on netbeans.org in the last month, from an information design point of view. Have a look and tell me whether these improvements work for you!
NetBeans Community: Lists & Forums index -- Radically shortened. We kept adding info and FAQs until the index grew unwieldy and partially redundant.
For instance, beginners could not tell which of the lists they should join. So we added a "Beginners start here" introduction, suggesting three lists appropriate for beginners. But there were no "subscribe" buttons, you had to remember the list names, click to go to the list overview, click again, search, click again... Not good. If the list overview grows so unwieldy that it needs an introduction page, I must improve the list overview itself, not the introduction.
NetBeans Community: Mailing Lists -- That's the mailing list overview I'm talking about.
NetBeans Docs & Support: Tutorial Archive -- Added new categories (e.g. C/C++ and PHP) and also updated descriptions. Made sure all current (new and updated) NetBeans 6.8 tutorials are included.
Interesting statistical fact: For each release, the NetBeans doc writers publish enough new tutorials (or update existing ones) that we could feature one doc on the front page (and RSS feed) every workday. Wow! Currently, we feature three a week.
NetBeans in Education -- The main section of the page contained a lot of info gathered over time, but here it was easy to see two types of information: news items, and teaching materials.
The difference being: News is something you read once, to get a feel for the topics covered and to judge the liveliness of this group in the recent time period. Teaching materials however are something you return to for each class; here the temporal order in which the materials were added is less important than the technology they are teaching.
I'm also making certain that link texts contain content words. Seriously. Linked words catch my attention, and all I get are empty word shells? What a waste of highlighting. So I'm on a warpath to eradicate all link texts saying nothing but "here", "now", and "this"! Also, from an accessibility standpoint, sight-impaired people's screenreaders read out a list of all links on a page. In the worst case all they hear is "Click here! here! here! this! this!" :-P Uncool, eh? If you know a blind developer, more news about NetBeans Accessibility is coming up soon.
You know the problem: You're updating a PHP script, press a wrong button, and instead of something obvious like ESC:w! you accidentally type ESC:q!. HAPPENS ALL THE TIME. If you can't shake the habit of using vim, that is. \*sigh\* Bah. It's not like NetBeans sees me using other editors and starts moping about it, right? "Go ahead, use vim, see if I care..." As if. So I browse man vim to check my recovery options... Aah, here we go:
VIM(1) VIM(1) NAME vim - Vi IMproved, a programmers text editor ... -n No swap file will be used. Recovery after a crash will be impossible. -nb Become an editor server for NetBeans. See the docs for details. -r List swap files, with information about using them for recovery. ...
Hold on a second. \*scrolls back\* NetBeans! You? Here? \*blush\* OK, OK, I'm going to reactivate the jvi plugin, and I'll use the File History now, really!! =-|
PS: Haha, why does the German localization of this line say "YOU become an editor server for NetBeans"? A Soviet Russia joke waiting to be made? :-D
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.
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. :)
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.
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.
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!
I saw the question come up on nbusers, and now that I found it, I thought I'd mention it here. :-)
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.
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!
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.
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.|
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!
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.
NetBeans IDE, Java SE and ME, 3D Games, Linux, Mac, Cocoa, Prague, Linguistics.