Java-Gaming.org    
Featured games (91)
games approved by the League of Dukes
Games in Showcase (579)
games submitted by our members
Games in WIP (500)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  HTML 5 + GWT + g2d = fun for us Java lovers?  (Read 6182 times)
0 Members and 1 Guest are viewing this topic.
Offline krasse
« Posted 2010-11-03 21:56:04 »

I really like that you now can use Java to write games that are cross-compiled into Javascript using GWT.

I found a wrapper for the canvas, sound and video parts of HTML5 here:

http://code.google.com/p/gwt-g2d/

some demos where this wrapper is used:
http://gwt-g2d.appspot.com/

Edit: Here is also a library for WebGL:
http://code.google.com/p/gwt-g3d/

All this makes me very happy!!!

but... this is not really any news since that Quake II demo has been around for some time now and uses exactly the same method.

Anyways...
What do you think? Is this a train you will jump on?

Offline kevglass

JGO Kernel


Medals: 85
Projects: 25


Coder, Trainee Pixel Artist, Game Reviewer


« Reply #1 - Posted 2010-11-04 00:04:51 »

Looks pretty awesome to me Smiley

Kev

Offline krasse
« Reply #2 - Posted 2010-11-04 00:54:37 »

Even JBullet and java.awt.geom has been ported:

http://code.google.com/p/gwt3d/
https://github.com/ustramooner/gwt-geom/

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Nate

JGO Kernel


Medals: 129
Projects: 3
Exp: 14 years


Esoteric Software


« Reply #3 - Posted 2010-11-04 03:49:41 »

This sounds like a terrible idea. It shouldn't be necessary to put so much crap between the language I write in and the code being run.

Offline krasse
« Reply #4 - Posted 2010-11-04 09:26:54 »

This sounds like a terrible idea. It shouldn't be necessary to put so much crap between the language I write in and the code being run.

If you want to write games that use the new HTML 5 stuff and avoid Javascript, I think it is well worth it. Since the WebGL and all that will be part of (or at least available in) every major browser it will make the distribution easier (in my utopian fantasy world).

Why do you even care about the "crap" between? It's just cross-complilation (or really source to source translation). If you just want that part you can extract that from the GWT source code.

Offline fruitmaze
« Reply #5 - Posted 2010-11-04 10:17:52 »

This looks pretty interesting!
Offline Hansdampf

Senior Member


Projects: 3


too offending?


« Reply #6 - Posted 2010-11-04 10:51:04 »

Yay!
Looks promising indeed.
I changed the first demo to use 200 sprites -> ~ 3 fps. But I don't think performance is very important at this stage.
A service like 'compile 'n shrink' would be cool, where you paste some Java code and get the translated JS page... (and Exceptions).

lots of sillystupid games: http://www.emaggame.com
Offline princec

JGO Kernel


Medals: 282
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #7 - Posted 2010-11-04 11:42:42 »

Hmm actually performance is kinda important or nobody's gonna be really all that interested Wink

hAxe FTW!

Though I'm sticking with Java for the foreseeable future.

Cas Smiley

Offline Nate

JGO Kernel


Medals: 129
Projects: 3
Exp: 14 years


Esoteric Software


« Reply #8 - Posted 2010-11-05 04:54:21 »

Why do you even care about the "crap" between? It's just cross-complilation (or really source to source translation). If you just want that part you can extract that from the GWT source code.

In general, I would like to avoid overly complex solutions to non-problems. I would just use JavaScript before something like this. It is just simpler and closer to the metal. Simple apps are probably fine using this crazy stuff, but then why bother with this crazy stuff? I would hesitate to use it for large apps because the commitment is large and the complexity seems unnecessary. The risk I would ever have to debug or profile code generated JavaScript turns me off.

Offline Orangy Tang

JGO Kernel


Medals: 51
Projects: 11


Monkey for a head


« Reply #9 - Posted 2010-11-05 11:00:48 »

I would just use JavaScript before something like this. It is just simpler and closer to the metal.

That's the first time I've heard "javascript" and "close to the metal" in a sentence before. Shocked

Although I agree with your main point - this kind of things just adds yet more layers of pointless, performance-sucking crap between code and actual execution. Javascript is already waaaay too removed from the actual computer to be useful for anything other than visual frippery and toy apps.

[ TriangularPixels.com - Play Growth Spurt, Rescue Squad and Snowman Village ] [ Rebirth - game resource library ]
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline woogley
« Reply #10 - Posted 2010-11-05 13:06:37 »

In general, I would like to avoid overly complex solutions to non-problems. I would just use JavaScript before something like this. It is just simpler and closer to the metal.

This sounds rather ironic, considering this is a Java forum. You're using the same argument a C programmer uses against Java.

Javascript is already waaaay too removed from the actual computer to be useful for anything other than visual frippery and toy apps.

It's really no different than Java. The functionality of the language is powered completely by the evnironment/libraries given to it. E.g. the WebGL-based Quake demo running on Google's JIT'd v8 engine runs faster for me than Jake (which it is ported from).
Offline Orangy Tang

JGO Kernel


Medals: 51
Projects: 11


Monkey for a head


« Reply #11 - Posted 2010-11-05 15:01:50 »

It's really no different than Java. The functionality of the language is powered completely by the evnironment/libraries given to it. E.g. the WebGL-based Quake demo running on Google's JIT'd v8 engine runs faster for me than Jake (which it is ported from).

Except that Java has a huge standard library that actually lets you do system-level tasks, and isn't hobbled by trying to run inside a 3rd party browser (applets not counting, they're only superficially in a browser, not tightly coupled to it like HTML5 + JS). And even then you still need to dip into native code to actually get things done (ie. LWJGL, JInput etc.). WebGL isn't a viable alternative yet and probably will never be for high-end graphics (ie. not just vanilla GL 1.4 or whatever), and you don't have the alternative of dropping down to the OS layer for when you really need it.

[ TriangularPixels.com - Play Growth Spurt, Rescue Squad and Snowman Village ] [ Rebirth - game resource library ]
Offline woogley
« Reply #12 - Posted 2010-11-05 16:10:04 »

Really what you're describing is a problem with HTML5/browsers in general. Browsers aren't meant to be touching the OS on that level. That has nothing to do with the language, though.

For example, there's nothing stopping me from writing an "LWJGL" for v8 and running JavaScript locally to talk to the graphics card directly.

Again, it's all relative to the environment.
Offline Orangy Tang

JGO Kernel


Medals: 51
Projects: 11


Monkey for a head


« Reply #13 - Posted 2010-11-05 16:23:00 »

Really what you're describing is a problem with HTML5/browsers in general. Browsers aren't meant to be touching the OS on that level. That has nothing to do with the language, though.

For example, there's nothing stopping me from writing an "LWJGL" for v8 and running JavaScript locally to talk to the graphics card directly.

Again, it's all relative to the environment.

That would hardly be HTML5 though, would it. Which is what this is about. No-one's really interested in running a JS VM to make desktop apps, it's about getting rich apps on a whole range of devices.

HTML5 and JS in it's present state, while technically interesting isn't practical for any serious development work IMHO.

[ TriangularPixels.com - Play Growth Spurt, Rescue Squad and Snowman Village ] [ Rebirth - game resource library ]
Offline krasse
« Reply #14 - Posted 2010-11-05 16:27:03 »

The risk I would ever have to debug or profile code generated JavaScript turns me off.

You don't have to debug the generated code. You just use the regular debugger in for example Eclipse (if you use the GWT Eclipse plugin).
You just do whatever you do when you develop normal Java applications. A lot of the classes from the standard class library are supported like collections etc.

The official version from Google: All this effort from Google is because they like to use IDEs like IDEA, Eclipse, Netbeans etc. They simply love the tools that are available for Java and they want to abstract away most of that browser-specific Javascript. It is not because they don't like the Javascript language. It is because of the lack of good development tools and the issues with several different browser implementations.

Offline JL235

JGO Coder


Medals: 10



« Reply #15 - Posted 2010-11-18 01:03:11 »

HTML5 and JS in it's present state, while technically interesting isn't practical for any serious development work IMHO.
I disagree. GMail, Google Maps, Google Docs (pretty much anything with Google in the name), Microsoft Office Online and lots more are examples of very sophisticated sites and web-applications which run without HTML5.

With HTML5 there is no reason why lots of the excellent sites that heavily use Flash (such as the BBC iPlayer and Grooveshark) couldn't be built with it (and certainly will be in the future regardless of what happens to Flash).

The problem with my examples is that they are in the minority. The average desktop application today does tend to run better and be more sophisticated then the average HTML+JS powered web-application. Part of this is performance but part of it is also a lack of good frameworks and libraries. But I believe we are on the verge of seeing this change.

This sounds like a terrible idea. It shouldn't be necessary to put so much crap between the language I write in and the code being run.
As long as the tools and result are excellent whilst taking as little effort as possible then I don't really care.

Online CommanderKeith
« Reply #16 - Posted 2010-11-19 00:30:44 »

I've been unimpressed with the speed of javascript when using Google docs spreadsheets. It's dog slow, even a paste takes about 2 seconds. And that's on Google Chrome browser. MS excel is way quicker...

Offline Nate

JGO Kernel


Medals: 129
Projects: 3
Exp: 14 years


Esoteric Software


« Reply #17 - Posted 2010-11-19 00:56:41 »

The average desktop application today does tend to run better and be more sophisticated then the average HTML+JS powered web-application. Part of this is performance but part of it is also a lack of good frameworks and libraries.
No, it is because HTML, CSS, and JS is a crappy way to do it.

Offline princec

JGO Kernel


Medals: 282
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #18 - Posted 2010-11-19 01:07:34 »

JS is a bit like going back to 100MHz Pentiums. Even the fancy clever engines in Chrome etc. But then you have to remember, Quake looked rather nifty on a P100.

Cas Smiley

Offline cylab

JGO Knight


Medals: 34



« Reply #19 - Posted 2010-11-19 10:37:05 »

I once had a P120 and a demo reported to me "PHEW - WHAT A KILLER OF A MACHINE" ;-)

Mathias - I Know What [you] Did Last Summer!
Offline tberthel
« Reply #20 - Posted 2010-12-04 12:59:16 »

Yep it is really slow, but I wouldn't hesitate to add HTML5 and a renderer to my game dev kit.

Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

xsi3rr4x (38 views)
2014-04-15 18:08:23

BurntPizza (34 views)
2014-04-15 03:46:01

UprightPath (50 views)
2014-04-14 17:39:50

UprightPath (32 views)
2014-04-14 17:35:47

Porlus (49 views)
2014-04-14 15:48:38

tom_mai78101 (71 views)
2014-04-10 04:04:31

BurntPizza (130 views)
2014-04-08 23:06:04

tom_mai78101 (230 views)
2014-04-05 13:34:39

trollwarrior1 (193 views)
2014-04-04 12:06:45

CJLetsGame (200 views)
2014-04-01 02:16:10
List of Learning Resources
by SHC
2014-04-18 03:17:39

List of Learning Resources
by Longarmx
2014-04-08 03:14:44

Good Examples
by matheus23
2014-04-05 13:51:37

Good Examples
by Grunnt
2014-04-03 15:48:46

Good Examples
by Grunnt
2014-04-03 15:48:37

Good Examples
by matheus23
2014-04-01 18:40:51

Good Examples
by matheus23
2014-04-01 18:40:34

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:22:30
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!