Blog of Josh "Renanse" Slack

Updates and commentary from the depths of a 3d Java code spinner's mind.

Wednesday, August 20, 2008

AGDC '08

Just a heads up. I'll be speaking at the Austin GDC this year in the Open Source Track, September 15th. The topic will be regarding the value and effectiveness of some of the major open source 3d engines out there (and of course I'm there to explain the virtues of that certain Java engine we all know and love.) If you are planning to attend the track, or Tuesday evening's party at the Alamo drafthouse, come find me and say hi. :)

Labels: ,

Thursday, August 14, 2008

At the end of the tour...

... when the road disappears... - TMBG


As you probably know, I've been developing the open source 3d Java engine, jMonkeyEngine for many years now. It has been a very good experience in most regards, though lots of work (just have a look at the commit logs or my forum message history.) I've worked hard on it because I really have believed in the dream of jME. I've represented it at several conferences, advocated its use in the gaming community and pressed larger companies to use it and donate work back to it. I have toiled many late nights on its inner workings, ensuring that the jMonkeyEngine continues to debunk the myth that Java is too slow or not capable enough for 3d games and applications. Of course it's an open source project which means no monetary pay (1) but at the same time it has been nice to me providing a good name in exchange for my work.

So yes, I'm very proud of my work on jMonkeyEngine and how far the technology has come. I never dreamed when I first became involved back in 2004 that things would progress so far. Today, I honestly believe that Java could be the next big gaming language, we just need something akin to XNA, etc. to make that happen. Right now though, I do not believe that can happen, or at least I am too tired to keep pushing past the hurdles to make it happen on this project. jME is good, but I think there are still many areas, even fundamental ones, that need to change for it to be a serious contender in the general 3d engine space. Who knows, maybe later on this project, or some other, I can see that dream realized.

What I'm trying to say is that I have recently discovered I'm ready for a break. To be clear I don't mean to stop working WITH jME, particularly at Ardor Labs, just not ON jME day to day. I'm sure the other developers will be happy to help with your patches and such though so keep them coming on the forums and issues board. I'll still be around too, so as always, feel free to give me a shout. The jME community is among the best in the world, and I have loved (and will continue to) working with them in one fashion or another.

And now, for my break... :)

1. You might point out there are donation links and a jme store, but I have no idea where that money goes.

EDIT: Really poor choice of words. Sorry, Mark. My point is there is no money in open source, even for something successful like jME. Mark tells me the money that comes in has barely covered hosting costs for jME, so guys... get those donations flowing!!

Labels: ,

Saturday, July 26, 2008

SWT support and Mac pains

Recently I changed up the way jMonkeyEngine handles embedding in a Canvas. Where previously it was tied hard and fast to an AWT canvas, it is now generic, using registered constructors to allow building other types of canvases. This has been pretty great, allowing us to break up some package dependencies and open things up for new and interesting ways of using jME.

Along with that change, I checked in an implementation for jME in an SWT canvas. Here's where I need to apologize to developers on newer Macs. SWT does not work well in a mixed environment that uses cocoa and even having the swt lib jar from eclipse in your classpath causes errors like this: (even if you are not touching SWT AT ALL, which I find a bit heavy handed.)

2008-07-19 18:14:48.689 java[7031:10b] [Java CocoaComponent compatibility mode]: Enabled
2008-07-19 18:14:48.690 java[7031:10b] [Java CocoaComponent compatibility mode]: Setting timeout for SWT to 0.100000
2008-07-19 18:14:49.633 java[7031:12503] *** -[NSConditionLock unlock]: lock ( '(null)') unlocked when not locked
2008-07-19 18:14:49.633 java[7031:12503] *** Break on _NSLockError() to debug.
(etc...)


If you are not using the properties dialog, jME will launch in the background but be unresponsive to input.

Obviously, this sucks when you are developing because your only other choice is to remove the jar and try to ignore over 100 compile errors. Ugh. So again, sorry.

The ideal situation would be to get a fixed swt jar, but it looks like that will have to wait for the cocoa implementation of swt (possibly part of the eclipse 3.5 release.) I tried to build my own from cvs, but the build script gave me errors about some of the eclipse custom ant tags (even though I have the pde build ant in my ant classpath) and jarring up the bin directory gave me a 2MB jar that still produced the above quoted error and symptoms.

So, in the end, I decided to just write an empty version of the classes and interfaces from swt that jME touches and check that in as a temporary lib for macs with a broken java carbon bridge (or if you are running 64bit only java 6.) At least that way you can compile and run jME (although obviously not the swt part) without errors. Hope that work makes up somewhat for your pain, Mac devs. Find the jar in the /lib/swt/macosx-cocoa/ direction.

You can download the source code for this empty implementation here if you really care to. It's all empty stuff except the SWT class which is copied partially from the real thing.

Labels:

Tuesday, July 22, 2008

The latest

It's been pretty slow on my blog lately, and mostly that's because life has been very busy here. I've started a new corporation called Ardor Labs (site not up yet), which will be mainly focusing on 3d Java technology. I've already got a good amount of work coming in and have started learning new areas of technology in the process; namely, the Eclipse Rich Client Platform and for another project, Project Darkstar. The later has come a long way since I last saw it two years ago and I'm happy to report it can be very performant. I say "can be" mostly because you have to get your mind focused on doing things in such a way as to properly use the technology and that took a little bit of doing for a client side guy like me. :) More on that another time.

I'm also excited that jME development is moving forward again. Recently added to jME 2.0 was JOGL support (by a very dedicated guy named Steve Vaughan who has also been helping with build and source cleanup.) Also recently added was SWT canvas support and support for Fog coordinates (fog being initiated by Kevin Glass.) The fog coordinate support will be interesting for lots of things, one example being fog of war.

A number of others have been very busy in the community and I will try to comment more on that. It's a good time to be a code monkey. :)

Labels: , ,

Sunday, June 22, 2008

Changes and reflections

Recently our small group at NCsoft went through a few changes, spreading us all out to other projects and teams. I think, knowing as much of the back story as I do, that this is a really good thing for the company and even the technology we are working on as well. I believe this will help pollinate many new and interesting game concepts and possibilities, especially in a company so well known for taking risks and trying new things.

That said, it was also a good time for me to step back and evaluate my own personal goals and life and see what I would really like to do next. There were great opportunities to be had at NCsoft to be sure, especially given my intuition about the future of the company as mentioned above. But finally I chose instead to take a break and perhaps get back to contracting for a while. It was a hard decision to leave full time employment, especially with this company. In the end though I really felt that stress and health and various other factors had built up far too high in my life. Things had progressed to the point where my creativity and energy were not at the levels I needed them at if I was going to progress towards those life goals.

What does this mean? Time will tell of course, but I plan to remain active in jME, perhaps even more so now (I may end up having tons of free time... yikes!) But also it hopefully means a nice one or two week vacation sometime soon.

Thank you NCsoft for believing in Java technology and for 2+ great years! It has been an amazing place and I will miss especially the very talented people I was fortunate enough to work with.

Labels: , ,

Tuesday, May 20, 2008

Article in Massively

Saw this post about our tech session on massively.com this morning. I certainly don't recall hinting about anything NCsoft was doing aside from saying I wish I could tell more about what the team I was on was doing, (but then joked that I couldn't for fear of the lawyers.) Ah well!

Labels: , ,

Thursday, May 15, 2008

More from JavaOne

During our technical session at JavaOne, Rikard and I showed off two videos and two live demos. You've seen the first video already. The second video was a timelapse demonstration of the kind of tool you can build in Java using the jMonkeyEngine, using the NCsoft world-building tool as an example. We received permission to upload that video to YouTube yesterday, which is exciting because it's one of the first real work-related thing we've been able to get out into the public.

You can watch Rikard show off his brilliant skills as a worldbuilder here:

Labels: , , ,

Saturday, May 10, 2008

Lunch with James

During the rehearsal for Friday's keynote I was fortunate enough to sit at lunch during the break with James Gosling and Chris Melissinos. We all talked entertainment, games, kids, and yes some jMonkeyEngine. It was certainly fun times and a neat peak into the brain of someone I respect a lot.

Labels: , ,

Over now

Yeah, it's over now (but I can breath somehow. :)

JavaOne 2008 is over and done with and I'm still standing - despite doing a technical session, a BoF (basically an experts panel,) a broadcast interview and getting onstage for the Friday keynote. I definitely have to thank the guys at Sun who helped make all that possible and really enabled jMonkeyEngine to get into the public eye more than ever. It was very exciting to hear the amount of buzz about jME and Java gaming in general. It was also awesome to finally meet several people I look up to in the industry such as Ken Russel, Sven Goethel, Doug Twilleager, Paul Byrne, and of course James Gosling (and many others, sorry I'm still tired.) Special props to Chris Mellisinos who actually does so much more behind the scenes in getting the various factions to support the idea of Java as a gaming platform than most of you realize.

Once I have had time to recuperate a bit I'll try to write more, but for now, check out the following videos:

1. The jMonkeyEngine 2008 reel
2. My interview with Chris Mellisinos
3. The JavaOne keynote I took part in. (I've got about 8 mins of time on stage starting at 36:20)

Labels: , , , ,

Saturday, May 03, 2008

Nervousness ensues

Well, JavaOne is fast approaching and it looks like I've got a full plate ahead of me. Rikard and I finished off the last of our demonstration pieces for our technical session this morning, so we're pretty much all ready to go. Yet, somehow my stomach and nerves feel like they are being dipped into alternating pots of ice cold and boiling hot water. Why am I speaking again? I'm a programmer, not a public speaker. :)

Ah well, I'm sure it will go just fine and the week will be past and gone before you know it. Still... excuse me while I go scream.

Labels: , ,

Sunday, April 27, 2008

jME 2.0 alpha source code released

From the posting I made over at the forums:

Here's what has made it in so far: (this list may not be all encompassing.)

* The batch classes and SceneElement have been rolled back out.
* We now use Enumerations pretty much everywhere in the API, making it a lot easier to figure out what values you have available. I've tried to comment all the tricky ones. We'll of course have more documentation to add, and I'm sure more Enums as well.
* 40+ new Image types supported, We now have support for all OpenGL1.1 image formats, as well as float formats (not tested though).
* We have 3 new mirror texture wrap types and now support specifying wrap on the R axis.
* We now support 1D, 3D and CubeMap textures.
* We now support 2 new Environmental map modes (NormalMap and ReflectionMap)
* 2 sided stencil support and stencil wrapping
* Lots more control over blending (including use of glBlendColor, glBlendEquation, glBlendEquationSeparate and glBlendFuncSeparate)
* New particle features: Timelines and animated textures. (With updated support in my editor)
* Some updated support for Collada, specifically we now have support for library_nodes, which is especially useful for loading in sketchup models. (Still not perfect, of course)
* Simple Bone and animation blending support. (Mostly this was checked in to keep us from having to maintain two versions of jME at work, I'd love to see the whole Bone and Skinning upgraded by a clever user or dev... hint hint.)
* New stats system... Instead of the old fps bar at the bottom, we now have a nice charting package. It's customizable, and you can turn off stats collecting at run time.
* Lots of small bug fixes and changes over the last 6 months that I can't remember...

Check it out from our svn repo.

Labels:

Saturday, April 26, 2008

Movie locked and loaded...

After spending the better part of three days total gathering, editing and splicing together footage from about a dozen different jME projects, the video portion of movie for our JavaOne presentation is finally done and just waiting for its soundtrack. The quality of some portions is better than others and I'm guessing Rikard and I should stick to our day jobs as a programmer, because we're no video editors... but I hope you guys all like it anyhow. Come see it unveiled for the first time at our tech session on Tuesday night of the conference. I may also get a chance to show it off on other days of the conference, so keep your eyes peeled.

For those of you who can't attend JavaOne this year, don't worry... I'll also post the video up to YouTube on May 10th. For now, here's a shot of it laid out in iMovie '08.

JavaOne '08 jME video in iMovie

Labels: , , , ,

Sunday, April 20, 2008

Competition is GOOD

So some of you may remember an old comparison test I did a while back where I ran Java3D, Xith3D and jMonkeyEngine all against the same benchmark fly through of a Quake 3 level and recorded memory and frame rate. No? That's ok, it's been awhile and was already a bit hazy to me too. :) The short version is that jME came out ahead by a good margin.

Today however I was pointed over to a thread on the xith forums talking about how they were now the undisputed fastest java engine. Curious, I pulled down the xith source from svn and a copy of the old test from my blog post. Lo and behold, they were indeed running that particular test quite a bit faster (220fps - Xith and 180fps - jME... almost 20% slower!) Now, mind you, this test is of a completely static scene with a lot of shared textures, not really a living breathing Q3 level, but still... Was a very pleasant surprise to me. Kudos to the guy actually doing things over at Xith, Marvin Fröhlich!

Now as the title suggests, I feel competition is good because it helps you see where you can shave off the rough edges. After about an hour or so of playing with glIntercept the reason for the difference became clear (we were still sending several unneeded JNI calls in this particular test setup) and I happily brought the jME end of the test up to 235fps with some non-test specific upgrades to the jME core.

Actually, I was afterwards able bring that up to over 250fps (~15% increase over xith) by adding two lines to the test, letting the core know that it can ignore checks for new light states or cull states for this particular test.

Thanks for the push, Marvin, and nice work!

Labels:

Saturday, March 08, 2008

jMonkeyEngine + iPhone anyone?

Man, how nice would it be to run jMonkeyEngine apps on your iPhone or iPod? Just Java by itself would be a nice start... something Sun has publicly expressed interest in.

Well, as many of you probably know already, Apple announced their iPhone SDK on Thursday. Seeing as how the iPhone has an ARM based CPU that already has Java acceleration support floating around out there, I hoped it would only be a matter of time until Java support was announced as well. I sat back impatiently to wait... (Well, maybe not patiently, as I tried poking my few contacts in Sun to see if there was something already in development.)

Fortunately, it looks like the wait was blessedly short, as only a day after the SDK announcement, Sun's VP of marketting, Eric Klein, announced that Sun will make a special JVM for the iPhone and the iTouch iPod.

The iPhone is purported to have a "lightning fast" OpenGL ES implementation. After my recent experiments with porting jMonkeyEngine to Android, I'm pretty confident that a port to the iPhone would also be possible. It would be a lot more possible though if Sun's JVM exposes OpenGL ES, so Sun, if you are listening, please look into that!

Labels: ,

Monday, March 03, 2008

Multisample

The other day I rediscovered how much multi-sampling improved your average scene for very little cost**. First the pic - look especially around the edges, or click for a magnified view:



Multi-sampling is basically rendering the scene at a higher resolution and then downsampling to your screen resolution. It helps reduce "jaggies" on the edges of polygons which gives your scene a much more polished look.

Multi-sampling may not necessarily be for you. For example, if you are fill-rate bound or if you are using certain multi-pass techniques such as shadow volumes (which together can produce some odd effects.)

** Low cost in terms of frame rate; there is a memory cost. Although, if your machine has to fall back to software emulation or if your game is fill rate bound, the frame rate part won't be so true either.

Labels: ,

Saturday, February 09, 2008

More on JavaOne

Sessions are now searchable, see our entry here under session TS-5711. Make sure you add us to your JavaOne schedule. :)

Labels: ,

Friday, February 08, 2008

See you at JavaOne!

Sun recently sent an approval notice for the jMonkeyEngine technical session I submitted late last year. Rikard Herlitz (known to many on the forums as "MrCoder") has graciously agreed to join me in presenting that session. Together, we'll be talking about the process of building a game using the engine technology and Java in general. We'll also have some kind of sample game to use as a discussion point. At this point our plan is to focus on the highs and lows of jME game development and hopefully some specific techniques we used. If you have ideas on what we should cover or things you'd like to hear, please post them!

Labels: ,

Tuesday, January 29, 2008

Sun's Project Wonderland and jMonkeyEngine

Many of you are no doubt familiar with Sun's "Project Wonderland", the "toolkit for creating collaborative 3D virtual worlds" built on Java 3D technology and Sun's Darkstar server platform. Paul Byrne, of Java3D and Project Looking Glass fame recently announced that Project Wonderland will be making a switch from using Java3D to using jMonkeyEngine. Paul cites the support for features such as multipass and render-to-texture as part of the reasoning as well as a rich set of utilities. I'd have to imagine that the lively and very supportive community we have was another potential dealmaker.

I certainly welcome the switch and look forward to the boost in smart technical discussions this will no doubt bring to jME.

Labels: ,

Wednesday, January 16, 2008

Prince of Blades

An interesting open source game was announced on the jME forums recently. It looks a lot like the old Prince of Persia games from long ago, which is great because I really loved those.


Also included is a nice looking editor which looks like an easy way to make custom levels.


You can get more information and download the source here.

Labels: ,

Friday, December 28, 2007

Early Android results

Worked on this now for about a day and have things up and running now. One thing I realized as I've been working on this is that the Android version of jME will need to be a little Android specific. For example, OpenGL ES does not support drawing with unsigned integer indices, so all the IndexBuffers had to be changed to ShortBuffers. Ideally the default version of jME would also accept ByteBuffer and ShortBuffer... Maybe in the future. So far I've still kept the same abstract renderer/display system classes used in the main jME intact, but there's several things in there that don't really apply to OpenGL ES (VBOs for example) so I might trim those down eventually as well. Currently the .dex file for the library is about 1.6MB and even includes a nice BaseGameActivity class to extend for getting up to speed quickly.

The bulk of jME has come across intact though, and what really might be gained here is an understanding of how to detach jME better from lwjgl concepts.

So what's not done yet is input handling, text, sound, texturing, drawing of points and lines, and most of the state classes. I'm only focusing on com.jme, so none of the jmex stuff is in. Also, rendering to a texture is not in (but might be implemented as a copy from backbuffer type deal.) It's pretty exciting to see things start to emerge though!

The TestBoxColor demo:


Now, with a Capsule:

Labels: ,

Thursday, December 27, 2007

Holiday Coding

Unfortunately I've been sick this holiday week - lots of coughing, sore throat, etc. - so in between a little bit of gaming and such I've had time to just sit back and code. (Yes, I find it oddly therapeutic.) My choice of projects during my vacation here is an Android port of the jMonkeyEngine. It's certainly been discussed and even poked at a bit by various folks, so I figured putting my two cents in wouldn't hurt.

So where have I managed to get so far? Well, I have jME's core stripped down and some basic Android classes going into place. I don't have a lot to show yet because I'm going straight for a true port here... But I'm guessing I'm about 8-12 hours of work away from a basic running prototype (simple geometry, etc.) Hopefully I'll be able to wrap that up by New Years and then spend a few days getting states and such working.

For now though, it's off to the doctor for me.

Labels: , ,

Friday, December 21, 2007

Student Games Part 2

The second game mentioned yesterday is called Matics and has a stylish look and physics based game play. From the video and postmortem, the gameplay appears to consist of building contraptions to get your avatar from the start to the end of a level (a la Lemmings.)



I've always liked games where you "invent" your way through a puzzle and this looks like it could be a contender for my leisure time is they spent time to push it to commercial release. Nice work guys.

Labels: ,

Thursday, December 20, 2007

Student Games from Georgia Tech

Two jMonkeyEngine games developed by students at Georgia Tech were shown at the Winter 2007 Demo Day.

Lord of the Fjord - a jME game
The first one is called Lord of the Fjords. Described as a "Viking boat bongo battle", the game is a multiplayer boat race using Nintendo's Donkey Konga bongo drums as a control device. You can read more about the project, including a quick postmortem over at the jME forums.

The second one is described as "[a] platforming puzzle game that closely resembles the visual style of Kirby with the debug mode from Sonic 2." More on that project as information becomes available.

See also this enthusiastic news coverage of the event.

Labels: ,

Wednesday, December 19, 2007

jMonkeyEngine jobs in Atlantis...

There's another project looking for jME developers, this time in Denver, Colorado. I dont know a lot about them, but here's their pitch:

We are building Atlantis…

The Chimera Foundation, a Denver-based nonprofit whose mission it is to build a global network connecting thinkers, scientists, health professionals and "regular folk" is recruiting a team of top-notch Java-programmers to build Atlantis, a virtual multiplayer environment. Atlantis is a conceptually and graphically breathtaking, living and changing 3D environment in which users can experience and research an accessible wealth of health-related topics. Help us make our world a better place!

Are you interested? Please contact us at info@chimerafoundation.org or at 303-996-6603 (Don't be perturbed by Faber & Bantz. It really is us :-)

Labels:

Saturday, December 08, 2007

jME Video player

Labels:

Wednesday, December 05, 2007

Particle Boost

The latest version of the particle system has a few updated features. One of them is the particle time-line... A way to set basically "key-frames" along the life of a particle for various particle attributes (color, alpha, spin, size and mass) to change. This is useful for all kinds of things, such as dispersing mass over time, or easing a particle in by starting the alpha at 0 and rapidly increasing it early in its life cycle (as demonstrated in the below screen shot.) You'll also notice a few changes in the layout of RenParticleEditor, giving you easier access to the various layers you have set up. What you can't see is that you can now also set your camera up vector for editing in either Y or Z mode, which is handy for those of us stuck in the world view of various modeling programs. :( If you look closer you may see another difference in the actual view itself...



Soon to come is a way to change particle coordinates over time to allow for animated textures using texture atlases. Stay tuned!

Labels:

Tuesday, November 20, 2007

New Texture types in jME 2.0

In addition to the standard 2D textures from the first version, jMonkeyEngine 2.0 now includes the ability to use 1D, 3D and cubemap textures. This has been accomplished by refactoring the Texture class into an abstract class and extending it with Texture1D, Texture2D, Texture3D and TextureCubeMap classes. You use them currently by creating a Texture object of a specific kind and loading it with image data. Texture 2D and Texture1D are essentially the same except Texture1D is expected to have a height of 1. Texture3D and TextureCubeMap take advantage of the refactoring of Texture's image field from a single jme Image to a list of jme Images. You simply load up the list with 2d sections of the 3d or cubemap image. In the case of Texture3D, these are slices along R. In the case of TextureCubeMap, these are the faces of the cubemap.

Below is a snapshot from a new jme test, TestCubeMap. Both the sky and the torus are mapped with cubemap textures.

Labels:

Tuesday, November 13, 2007

Blending

Just a quick note... jME 2.0 now has support for a lot more blending options such as control over the blend equation, constant blend color modes, and the ability to set separate equations and functions for RGB and Alpha. Specifically, the following gl commands are being used by jME now: glBlendColor, glBlendEquation, glBlendEquationSeparate and glBlendFuncSeparate. Also GL_MIN, GL_MAX, GL_FUNC_SUBTRACT, GL_FUNC_REVERSE_SUBTRACT, GL_FUNC_ADD, GL_CONSTANT_COLOR, GL_ONE_MINUS_CONSTANT_COLOR, GL_CONSTANT_ALPHA and GL_ONE_MINUS_CONSTANT_ALPHA.

Labels:

Send $500 in small unmarked bills...

So part of the move towards jMonkeyEngine 2.0 is to switch from cvs to svn. As part of that move, we'd like to ideally bring our cvs change history along with us. No problem, right? Just get a zip of the repo and use a tool like cvs2svn. But wait, we need our current cvs host dev.java.net (and more specifically, their service provider collabNet) to zip us up a copy of our repository.

One of the devs put in a ticket to request this move and got this in reply:

"The price will be USD $500.00. Please let me know if you wish to proceed."

Ok, um... We're talking about tens of MBs of data and a handful of commands. Also, we're talking about a free, open-source project. This is not the first time we received a reply like that. Due to refactoring, we have several empty directories that can be very confusing to new users of jMonkeyEngine. Since we don't have permission to remove old directories, we are at their mercy there too. Guess what? Removing those directories was not going to be free either.

I can understand a nominal charge, but FIVE HUNDRED DOLLARS? That sounds more like a ransom to me.

Labels: ,

Saturday, November 10, 2007

2.0 continues...

The end of the week saw more 2.0 changes go into jMonkeyEngine. Among these is wrap and two-sided stencil support making our stencil shadows a bit faster. Almost all of the major enumeration changes have been made now (which has been mind-numbingly painful) and in the process some bugs and several unsupported features have been found and resolved. Early next week I expect to have other texture types supported and a cubemap demo ready which will be very exciting.

Labels:

Thursday, November 08, 2007

jMonkeyEngine 2.0 begins

Now that jMonkeyEngine is officially 1.0, we can really get in there and start doing some API changes that have been sitting on the back burner for a while.

The first of these API changes is actually a rollback of the GeomBatch. Early last year, Mark and I added batches as a way to reduce scenegraph overhead. Many assets (at that time) consisted of sets of geometry that were in the same coordinate space and so it felt like a lot of work (making bounds, doing and undoing transforms, etc.) were being done needlessly.

Unfortunately, as batches began to be more widely used we found needs to slowly readd all the things we trimmed to make batches light, until finally we ended up with Geometry and Node being almost the same thing and GeomBatches being equivalent to the old Geometry object. As a result we actually deepened our scenegraph and thus increased the management overhead.

So, batches are gone... RIP.


The next major change is a shift from the dozens and dozens of static integer ranges spread throughout the API to enumerations. Using enumerations helps avoid confusion and code errors. It also makes it easier to add additional values to ranges or behavior to specific members of ranges. Additionally, enumeration values can be named a lot more friendlier since they are already scoped by their type. I think new users of jMonkeyEngine will find this to be a welcome change. This task is about half done already. I'm taking the liberty to match up our enumerations with the latest possibilities in OpenGL and adding new Image types (40+), wrap types (3 more), coordinate generation modes (2 more), etc.


Stay tuned for more on this, including ideas of threaded rendering, a new effects system, and much more.

Labels:

Wednesday, October 10, 2007

New footage from jME based "Nord"

New footage was posted today for the jMonkeyEngine based project, Nord. Built by Swedish game team, SLX Games, Nord has been described as "a combination between MySpace and The Sims/Sim City." From screenshots, concept art and gameplay videos it looks to be a stylized social community sandbox, bringing to mind other games such as Club Penguin or even (kid-friendlier versions of) concepts from Second Life.

I'm definitely looking forward to seeing where the project goes next.

Labels: ,

Sunday, August 05, 2007

Some might find this interesting...

If you've been even vaguely following a certain handful of monkeys and their game careers with any interest at all, you might enjoy this little interview.

Labels: , ,

Friday, July 20, 2007

Fellow code Monkey joins our team

Work at NC has been going quite well these days. We're on track and experiencing some growth as well. (You'll recall previous mentions of open job listings.)

I'm very excited about one new team member in particular. *drumroll please*.... Rikard Herlitz, better known to many of you as MrCoder from the jMonkeyEngine forums. With many years in the games industry and having donated many impressive features to the engine (water, bloom, projected textures, etc), hiring Rikard was of course a no-brainer (but just don't ask about the nightmares of H1B.)

I am of the opinion that this can only be good for jME's future. Having three top folks working full time on jME and technology tangent to jME means lots of refinements and improvements for the community as a whole.

Stay tuned!

Labels: ,

Wednesday, June 20, 2007

The perfect view

Let's say you have a 3d object and you want to move your existing camera so that the object fills your view. I had such a hypothetical situation recently and for some reason it took me several hours of scribbling to figure it out, after which I smacked my head for being so dumb. Hopefully I can save someone out there from a similarly self-induced headache.

First, let's assume that you have a bounding sphere around your object, or in other words, a sphere that tightly and exactly encompasses your object. You know where this bounding sphere is in space, and you also know its radius.

Aside from the sphere, you also have the camera. Your camera has a viewing frustum, which is basically a four sided pyramid with the tip neatly cut off. Here is a simple reference showing the frustum from the side and how we want to fit our sphere in it.



Our eye is at point A. The point at which the eye can start perceiving things is that first vertical solid line, or the frustum's near plane. The sphere is centered at point B, with a radius r. It touches the edge of the frustum at point C (as well as at another point directly opposite which I have not labeled.)

We have the following information about the camera... We know the distance from A to the near plane. We also know the viewing angle of A. Some people keep track of that, in jMonkeyEngine we instead keep track of the offsets of the top, left, bottom and right edges of the near plane (really a rectangle). So we know that the top edge is x units from the center of the near plane, the right edge is y units from the center... etc.

What I want to know is the distance from A to B, but I only had an angle and a single side length. Any geometry student will tell you that you can't construct a triangle without 2 sides and an angle or 2 angles and a side... What to do?

Eventually I realized an important piece of information as illustrated below:



Yes, the fact is we actually know two of the angles. The point at which a circle touches a line or plane is perpendicular to the line from that point to the center of the circle. So, we have a right triangle and problem becomes fairly simple:



sin(theta) = r / AB
or
AB = r / sin(theta)

Where theta is the angle CAB. In jMonkeyEngine you can get this angle with the following pseudo code:

angle = arctan(frustumTop/frustumNear)

Where frustumTop is line st and frustumNear is line At in the above diagram.

This gets the best fit for the up-down direction. If your screen is taller than wide, you should use frustumRight instead to calculate your angle.

Now that you know how far away the camera should be, grab a vector and set it to your camera direction, then multiply it by the negative distance and add the center of your sphere. Now your camera is in the perfect spot for the "perfect view".

Example code (you can skip computing both if you know that one side will always be bigger):

float angle1 = FastMath.atan(camera.getFrustumTop() / camera.getFrustumNear());
float d1 = sphere.getRadius() / FastMath.sin(angle1);
float angle2 = FastMath.atan(camera.getFrustumRight() / camera.getFrustumNear());
float d2 = sphere.getRadius() / FastMath.sin(angle2);
tempVector.set(camera.getDirection()).multLocal(-(Math.max(d1, d2))).addLocal(sphere.getCenter());
camera.getLocation().set(tempVector);

Labels: , ,

Friday, June 01, 2007

Mad Skills Motocross

jME forum user Tobias of Turborilla Entertainment announced today his upcoming jME powered game, "Mad Skills Motocross." Check out the preview video, it's pretty cool looking already. He apologizes several times for the programmer art, but personally I like it. :)

Labels: ,

Tuesday, May 29, 2007

jME reviewed...

Mark's already mentioned this on his blog, but for those of you who might not read there I thought I'd link off to a nice review done of the jMonkeyEngine by Colm Smyth on his S'mythology blog.

One thing he did not mention in his review is the names of the game companies and games using the technology which might have been interesting to his readers. Also, jMonkeyEngine's inspiration was from David Eberly's "3d Game Engine Design", not David Wallace Croft's book. Other than that, he did a pretty good job covering the bases.

Labels:

Sunday, May 13, 2007

flying home

JavaOne is over and I'm spending my birthday flying home. This past week has been most.. uh... memorable, with everything from all day programming sprints to a mini Kiss tribute band, Battle Bots and a metal bikini clad "Grinder girl" (who did Sun entrust to make the entertainment choices anyway??) The session talk I was part of was lightly attended, (I was told by more than one person that their boss was having them go to some other session at the given time slot,) but jMonkeyEngine got a good deal of publicity especially at the After Dark party on the 10th where they showed the jME demo reel I made to a crowd of several thousand.



The contest went pretty well. I spent the better part of Thursday improving the visual quality of the contest scene and then making videos of the top five entrants. Thursday night at the party, the crowd voted on the top three with their applause. The top entrant evidently spent the better part of his week working on his entry what with his a cheering section, sound effects, various animation tracks and a bit of humor. If I understood correctly, he has six kids with a seventh child on the way and that 5 grand will go towards a van to carry them all around. Best wishes to him.

jMonkeyEngine had another showing aside from the VFD contest, the movie and the session. The old rickety JavaOne wooden prize wheel was replaced with a nice looking virtual one built with.. yep, jME technology. The wheel results were completely random, and you got prizes based of the level (1-5) it landed on. A top prize (awarded once per day) was the cost of your session pass. Not too shabby. I should mention also that the quality of prizes and swag at JavaOne was leaps and bounds better than that I saw at the last few GDC conferences. I guess Sun really shells out for this event.

Yes, it was a lot of fun seeing our touch here and there. I really hope next year we get another chance to be part of the contests and dealings at JavaOne. Also, it was nice to meet and talk with guys from other divisions at Sun. The guys I dealt primarily with at JavaOne - John Wetherill and Kevin McDonnell - are two of the most down to earth, intelligent and interesting people I have met. Too bad they are in the marketing division (programmers and tech guys though!) at Sun and not gaming!

Labels: , ,

Wednesday, April 25, 2007

jMonkeyEngine at JavaOne

JavaOne is going to feature an exciting new tradition this year, stepping into the shoes of the old Flying Dukes tradition. Instead of shooting real t-shirts into a real audience with various clever devices, virtual t-shirts will be shot from a virtual cannon. If you want a real t-shirt, you'll need to write a few lines of code to direct your avatar to the right spot to catch the shirt. Pretty easy really as you will get enough muzzle info to do a simple physics calculation to determine where the shirt will land. That said, if you do something really crazy, (say like having a mad max car race that ends in a crash expelling the driver who catches the t-shirt in mid air) you could win some really cool prizes worth a lot more than a t-shirt. See the contest site for more information.

Why am I talking about this? Sun has decided to use the jMonkeyEngine for the contest, which is quite exciting.

So if you are attending JavaOne, I'd urge you to check out the contest and make a submission. Show off those crazy coding skills. Oh, and if you want to have even more fun, come heckle me at the JavaOne session on Friday, May 11th where I'll be speaking for 10 minutes or so on the jMonkeyEngine and showing off some of the cool things being done with it.

Labels: ,

Thursday, April 19, 2007

jMonkeyEngine releases point 11 release

jMonkeyEngine announced today that has released version 0.11 of its successful opensource Java gaming engine, adding many new and exciting features as well as improving performance and reliability.

Major new features and systems in this release include:
  • A Skin and Animatable Bone System enabling realistic representation of models and motion.

  • Support for importing files in the COLLADA format.

  • Support for using jME in a Java Applet.

  • New Importer and Exporter System giving a standard framework for loading and saving jME scenegraphs.

  • A Binary Format implementation for the new import/export system that is more compact and faster than standard Java serialization.

  • Support for rendering to Framebuffer Objects.

  • New Pass - Water, with configurable reflection, refraction, wave generation and more.

  • New Pass - Bloom, with configurable intensity, blurring, resolution and more.

  • Support for simple texture based dot3 bump mapping

  • New extension providing the ability to generate 3d meshes from text.

  • Control Binding Management



Bug fixes and enhancements in this release:
  • Upgraded jME's official binding to LWJGL 1.0

  • Improved rendering system tracking, reducing the number of jni calls to the underlying native bindings.

  • Optimized Collision system, specifically triangle collision and picking that is fast and several times more memory efficient.

  • New Sound System revamp (jmex.audio)

  • New editor extension package (jmex.editor) providing editor widgets useful for building jME related tools in Swing.

  • Improved Particle System and Editor adding Particle layers, Particle Influences (with prebuilt wind, gravity, drag, vortex, swarm and wander influences) and more.

  • Enhanced Multi-threaded support including a system for queuing up and executing code in the rendering context thread.

  • Enhanced support for using jME inside of Swing/AWT

  • Many other bug fixes and memory/performance optimizations



Find out more about the jMonkeyEngine by visiting http://www.jMonkeyEngine.com/

Labels:

Tuesday, April 17, 2007

Linked by Gosling

Just a quickie here: I thought it was pretty cool to look at James Gosling's (aka Father of Java technology) blog today and see a link to jMonkeyEngine. Nice! </geek moment>

Labels: ,