Faster, smaller, simpler: yours for $99

Curious, I wasn’t expecting as many people to cite missing AWT & Swing as a reason against this kind of thing. For everyone thats said that, what do you actually need them for?

I’ve always been a fan of Swing as a library in general, and have currenly used it for 3 major game editor / map creation tools (V-Script being the most complex so far). Yet I’ve still only used minimal (and easily replaceable) parts actually in the games. What is everyone doing thats so different that makes AWT & Swing essencial?

[quote]Curious, I wasn’t expecting as many people to cite missing AWT & Swing as a reason against this kind of thing. For everyone thats said that, what do you actually need them for?
[/quote]
I’m surprised too :). But…Swing has matured enough that some parts are very good and it would be a PITA to re-invent the wheel (e.g. Action’s ActionMap’s EventMap’s focus-handling and drag-n-drop have all become very nice now).

Personally my only attachment to Swing is that it took Sun 7 years to get it to this level of maturity (which is only about 80% of what it ought to be - c.f my previous problems with large swathes like JTree etc) and I’m cynical that any alternative library is going to appear that gets it right in very much less than 7 years :(. I’d love someone to produce an OpenGL widget set with the high-level features of Swing, but you need good system architects to do that level of quality design and that usually means you have to pay for the end product. Licensing costs just for a “good JTree” were in the high hundreds / low thousands of dollars last time I checked - how much would it cost to get a complete widget set? :’(

This tool would not be for

[quote]Anyone who feels that AWT & Swing are necessary to write games.
[/quote]

  1. 4MB of bloat is still better than distributing a JRE.
  2. No AWT/Swing support excludes those who would use JOGL.
  3. Adding AWT/Swing support opens your tool to those who want to write normal applications as well as games.

I’m fully aware that this is the java-gaming.org forum. I’m fully aware that SWT is an alternative to AWT/Swing. I’m fully aware that you’re talking about a “gaming compilation” tool.

I’m also aware that JOGL is a gaming technology, and that your tool would not support it.

As a developer, I grow tired of having to install tools X, Y, and Z (not to mention tools A-W). Another tool that’s almost good enough to do what I need, is just another tool that doesn’t make the cut, because some feature (a feature that makes my life more convenient) is missing.

I understand this reason, but this point is highly subjective.

Hmm. Anyone thought of porting GLUI?

I know it’s very much a C library, but it might be worth a look, at least.

[quote]just one tiny accidental reference to AWT in AF caused the executable to bloat by 4MB
[/quote]

  1. If AWT/Swing support was provided, then you’d have a tool that addresses the needs of everyone.
  2. Those that choose to use SWT (for example) need not be concerned with the extra bloat, because it doesn’t even affect them.

Give us choices, not an ultimatum.

[quote]how much would it cost to get a complete widget set?
[/quote]
$0. As usual, I’ll be giving any supporting code I write away for free as a carrot to encourage take up of the Big Idea. Spaghetti 2, currently in cryo, basically pinches some of the good ideas from Swing and AWT and gives you the widget library you need for a game. Not a complex do-everything-model-view-controller job, just widgets that do stuff and a simple windowing library. You can see it in action already in Alien Flux of course. Here are the components it supports:

Draggable Windows
Buttons
Labels
Single line edit text fields
Scrollbars
Scrollpanes
Comboboxes
Lists
Pictures
Checkboxes
Radiobuttons
Text areas
Dropdown console
Generic panels

The only thing missing, sadly, is a Tree :slight_smile: Easily rectified.

It supports nice simple focus management, modal dialogs, drag & drop and realtime animated controls.

Now prepare to choke: it’s *** 56kb *** to deploy. Compare this with what it can do. Why use AWT (which looks awful?) Why use Swing (which is massively complicated and needs a meg of glue to make it work with GL)? This is only a game we’re writing here folks! Look at the user interface in Quake 3! It makes Alien Flux look like Microsoft Word!

Cas :slight_smile:

There are reason why AWT and Swing support cannot be provided:

  1. Oh look, it’s Sun’s brilliant license rearing its ugly head again :slight_smile:

  2. We are explicitly segregating our customers from the business and corporate customers who need Swing & AWT so that we don’t step on our unnamed supplier’s existing customer base by offering the same product at 10% of the price…

…if you see what I mean. We’re offering an $800 compiler for $100 provided you understand that it’s targeted at people who use Blitz Basic and C++ to write games, not people who use Java to write general applications. If Swing / AWT support is that important, you’d spend $800 on Jet. If deployment size isn’t a problem, you’d use a JRE.

JOGL, I believe, does not make a great case for itself in many respects as a gaming API, in terms of size, complexity, dependency, security, and style. But that is not for discussion in this thread.

Cas :slight_smile:

As I mentioned in the LWJGL forum not so long ago, if I ever get radio buttons, regular buttons and labels that are in no way dependant of awt/swing, I’ll be ditiching JOGL for real :wink:

[quote]If Swing / AWT support is that important, you’d spend $800 on Jet. If deployment size isn’t a problem, you’d use a JRE.
[/quote]
I would spend $800 on Jet, but if you’re offering a cheaper solution that does EVERYTHING.

C’mon, Cas. You know deployment size is not the only reason to go native.

Personal, philosophical crap.

[quote] I would spend $800 on Jet, but if you’re offering a cheaper solution that does EVERYTHING.
[/quote]
From what I can gather… he is not trying to compete with the $800 Jet product, because he is working WITH Jet, for a lower priced, game based solution. That’s what my keen observations tell me.

How shrewd you are, Mr Monkey sir.

[quote]Personal, philosophical crap.
[/quote]
Exactly :-*

Cas :slight_smile:

Well, I’m done with the flaming.

Yes, Monkey, I gathered as much.

I’d still like to see a full JDK support. Have a nice day. ;D

All I’m really trying to say is, “I hate sauerkraut!”

I didn’t see any mention of high-level concepts, like Action’s. I’m not trying to imply that Action’s are a holy grail, but they are a convenient and obvious example of the time-saving abilities of higher level constructs within a widget kit.

I actually have done most of the things you cite myself for personal use in a similarly plain form fitting in about 30-40kb (probably mine had fewer features) and it didn’t take long. My main interests were to get a better layout system and auto-sizing components. But I’m well aware of how much time I lose in developing with these until/unless I start adding the higher level stuff.

PS I’ve been ignoring the fact that a simple intelligently written implementation of some things can save significant time over swing (e.g. any reasonable alternative to JTree is worth $99 on it’s own if you ahve to use trees in any non-trivial way). Overall, though, I find I make much more use of things like Action’s than of trees, at least in games (how often do you see a tree in a game? Most examples I can think of are for server/multiplayer browsers, or a few games use them for editing the config…). Shrug. I’m not claiming it’s better or worse than using Swing, just pointing out things that would be major concerns for me.

Just a thought:
Maybe it would be possible to use AWT by linking to an VM already on the system? Maybe at setup time? I’m thinking the MSVM here which almost anyone has anyway.
It would solve my issues, except that I will have to use AWT for the config screen instead of Swing, but AWT would do here.

Erik

Just wanted to comment about my only single contact with Jet.

I compiled FlyingGuns with it. Took very long (1/2h?), the result was HUGE and sucked at runtime. Very unsmooth.

I’m suspicious about those tools in terms of complex projects. Maybe I’m unfair bc. I did not give it a second chance … but that’s my experience with it.

I think the poll should be expanded. Reading the other posts for example, I think one point could be:

  • I’d buy such a thing if it supported the entire JDK 1.4

?

http://people.redhat.com/graydon/free-swing-feb-09-2004.png
http://people.redhat.com/graydon/free-swing-feb-25-2004.png

In case you haven’t noticed, gcj can compile to bytecode and native code on many platforms.

There is a gulf of difference between gcj and Jet. Jet is a stunningly professional product, which produces incredible results, and what’s more, it’s complete.

If I wanted to spend 2 weeks wrestling with gcj I’d already have wasted $99 in coffee and tranquilizers to cope with the stress :slight_smile:

If anyone wants a compiler that supports the entire JDK please take a look at Jet Professional. It’s worth every penny if it’s what you actually need.

Herk - there are a vast number of tuning options for Jet exes. I discovered what works best through extensive testing and fiddling. For example - the default inlining is incredibly agressive, and way OTT. I reduced them by a factor of 10 and reduced my exe size by half without noticeably changing the performance. Turning off NPE checks and array bounds checks helped a little bit too. Etc.

Cas :slight_smile:

I didn’t compare Jet and gcj. I never tested Jet, so I can’t compare, but if you are happy with it, it’s probably a good product (honestly). Some people mentioned compilation to native code and AWT/Swing support, so I thought it’s worth mentioning gcj.

gcj is build on top of gcc, which is stable, fast and has a lot of options, too. AWT/Swing is not complete, but some parts are implemented. CORBA is missing. The other parts are mostly on 1.4 level. I don’t have to wrestle with gcj, because it’s as easy as any other install here. Maybe it’s a problem on Windows (don’t know).

What do you mean by saying “supports the whole JDK”? The Jet-FAQ says that, if I have Jet Professional + Jet Perfect and no GUI classes (AWT/Swing/Java2D?) I need no JRE. If I use GUI classes I need the JRE. “supports the whole JDK” has two possible meanings:

  1. You can compile every Java app by using an already installed complete JDK.
  2. You can compile every Java app by using only Jet/gcj.

The first possibility is true according to the FAQ. I didn’t test, if gcj can compile every Java app, if you feed it with the JDK libs, but chances are probably good.

[quote]Just wanted to comment about my only single contact with Jet.

I compiled FlyingGuns with it. Took very long (1/2h?), the result was HUGE and sucked at runtime. Very unsmooth.

I’m suspicious about those tools in terms of complex projects. Maybe I’m unfair bc. I did not give it a second chance … but that’s my experience with it.
[/quote]
Out of curiosity, I have compiled the FlyingGuns demo with JET 3.5 using default settings. On my antique system (Celeron 400MHz/256 MB RAM/TNT2 Ultra) the frame rate is about 15-17 FPS on HotSpot 1.4.2_02 Client and sometimes it drops to 5 due to GC activity. With JET, I get about 17-20 FPS and it never drops below 10. Under HotSpot Server, it flickered for about 30secs then started to work with BIG pauses and FPS about 12-14.

I used default settings for all three VMs except setting the heap to 128MB. I am noew going to try the JetPerfect Global OPtimizer on this demo and then can send you or post here the respective project files.