Interview with Matt Hicks


So, I’m back from my vacation, and I’m really happy to see that the blog traffic didn’t drop below zero.

Don’t panic, escalation will stay a German language blog, today is just a little exception. The reason is that Matt Hicks was so kind to give me an interview about his Sgine project, a 3D game engine written in Scala.

Matt (a.k.a. darkfrog) initiated a lot of other interesting open source projects, e.g. Java Game Networking and jSeamless“, and is a long time contributor to the popular jMonkeyEngine (written in Java). Here is the interview (all links except to TestImage were inserted by me):

What are the main reasons for starting the Sgine project, instead of contributing e.g. to JME 2 or 3? What are the differences concerning design and features?

There are several reasons. I was a developer on jME and jME-Physics for years and have used Xith, Java3D, and others but never have really been happy with the architecture of the engine. Simple things are either overly complicated, or hide too much complexity by „SimpleXxx“ wrappers. The barrier to entry and internal knowledge requirement of both OpenGL and the scenegraph itself is quite overwhelming and complicated. I wanted to create an elegant architecture that supported multi-threading and is easy and logical to use for simple and complex development. For example, I recently spent some time playing with Ardor3D which is arguably the best 3D engine for Java from a classical design perspective available. To just create a simple test class that renders a quad to the screen with a picture on it to 130 lines of code. That’s a pretty significant effort in order to just get an image to display. Now, sgine is still early in development, but a similar display of just an image on the screen takes a total of 22 lines of code (only six of those actual logic): TestImage.scala

How important is the Scala language for the project? If Scala wouldn’t exist, do you think you would have started a similar project in Java instead?

Long before I even knew about Scala I began to become discontent with the limitations Java imposed upon me and began creating extensions like MagicBeans (provided field binding, change listening, etc.), Delegates (a reflection-based functional programming concept), and Properties (abstraction from getters/setters) to name a few. When I first began learning Scala it was like a breath of fresh air. It opened the doors to many things I have been trying to accomplish in Java and many more that I hadn’t even considered. The deeper I get into the development of sgine the more I realize how powerful a language Scala is for this chosen task.

I had started a less ambitious project called jSeamless a few years ago. The sgine project is the successor to that. While jSeamless sought specifically to solve user-interface needs sgine has expanded greatly in order to provide a complete graphical engine may encompass a great deal more. To answer your question, yes I would still have the desire to complete this task without Scala, but I doubt I would really have the ability.

Which role plays Scala’s functional side? Is the functional part just „nice to have“ or is it a crucial part of the engine design?

Though the functional model is extremely beneficial I would not go so far as to say sgine would be a failure without it. I will say that I heavily rely on functional coding where it makes sense though and believe the engine is the better for it.

Are you satisfied with the current development speed? When do you you expect version 1.0?

For the past few months development has slowed considerably, but over the past week the project has picked up speed drastically. For quite a while I’ve been trying different rendering methods and was ultimately dissatisfied with each route I had taken. Finally I have settled on a path to move forward and move forward I have done at a considerable pace since that decision was reached.

How was the feedback so far? How is the community developing?

Well, the tact I generally take with a new project is to sort of stay under the radar until I’m really ready to show it off. To that extent the exposure has been quite minimal. I was invited to speak at Scala Days but the cost for (coming from America to Switzerland) and limited audience I decided against it. I would love additional support, but apart from a couple people helping I’ve pretty much run this show alone so far. It is a really hard sell to convince good developers to join a project that hasn’t got a lot to show for itself yet. Additionally, finding decent programmers that know both Scala and OpenGL is quite difficult I am finding.

As far as I know Sgine is the first 3D game engine written in Scala. Do you expect other Scala 3D engine projects soon?

I expect that there will be more coming on the scene within the next year, but hopefully if sgine fulfills its potential I hope most people will just choose to join and help out with it.

Which of Scala features were the most useful ones so far? And which feature currently missing in Scala would be the most useful?

I have been a huge advocate of Java for years, but Scala has turned me against it. I love Scala and regret every line of code I still have to write in Java. However, there are still many things that need to be done in the Scala language. Two main things I’m dealing with right now are Enumerations and disparation between Function and Method (specifically in equality).

While Scala isn’t „slow“, careless programming can lead easily to bottelnecks. How were your experiences with Scala performance so far?

This is definitely something I have learned a lot about in sgine. I constantly turn on verbose:gc to verify I’m not creating lots of garbage in tight loops. Specifically anonymous functions are so easy to create it’s easy to inject them into a place that just causes millions of tiny objects to be created per second. I had a lot of problems with this early on, but have learned many ways to avoid garbage creation while maintaining good functional coding.

What contributions from the community would you like to see?

While I’ve got a lot of experience architecting good frameworks and have a lot of great ideas and good programming knowledge I still need a great deal of help in the area specific to OpenGL and complex math. The project would do well to have a few seasoned professional OpenGL programmers on board, but at the moment I wouldn’t complain for any assistance I can get. The task of sgine is a daunting one for a single developer to try to manage.

Where do you see Java, Scala and Sgine in 5 years?

I see Java as a language decreasing significantly and Scala increasing for serious developers. I don’t really know where sgine will be, but I truly hope it catches on. I believe in the idea of the project, but an open-source project has little hope of success in the long-term if only its creator believes in it.

In game development Java got never as popular as in many other areas. Do you think Scala could do much better there?

I think so. Java has very little market-share even though there are significant benefits to using it over a language like C++. Those benefits are increased several fold with Scala and I believe that serious developers will hopefully agree.

Is there a good question I forgot to ask?

I don’t think so. 🙂

Thank you for the very interesting interview!

Advertisements

Kommentar verfassen

Trage deine Daten unten ein oder klicke ein Icon um dich einzuloggen:

WordPress.com-Logo

Du kommentierst mit Deinem WordPress.com-Konto. Abmelden / Ändern )

Twitter-Bild

Du kommentierst mit Deinem Twitter-Konto. Abmelden / Ändern )

Facebook-Foto

Du kommentierst mit Deinem Facebook-Konto. Abmelden / Ändern )

Google+ Foto

Du kommentierst mit Deinem Google+-Konto. Abmelden / Ändern )

Verbinde mit %s