JavaFX For Pixel Games

I use C# for my application gui needs.

That makes no sense at all.

Cas :slight_smile:

Use HTML5 (javascript + html + css).

But that’s really what we want in the JDK. Fancy things belong elsewhere, but a basic usable UI toolkit for desktop applications should be in there. Swing may not be dead, but it’s kind of on life support. It needs some support for more modern features. Why Snoracle had to go with revolution over evolution I don’t know. Something a bit more like PureSwing might have been good?!

… only if swing wouldn’t be such a bitch over x11

Couldn’t care less about X11 :slight_smile: Seriously, who actually uses that for real work?

[quote]Use HTML5 (javascript + html + css).
[/quote]
Now it’s funny you should say that but I’ve looked quite seriously into the potential for this for game UIs but still have the same ol’ problem of no libraries out there actually render directly natively to OpenGL. It’s all render-to-a-system-texture-and-upload-it-every-frame. This is crap in two ways: 1. the whole copying it to OpenGL every frame thing 2. mixing it with OpenGL rendered parts means readbacks and thus terrible performance.

Cas :slight_smile:

sounds like a line from optimus release notes.

I considered drawing to an image using PixelWriter and scaling the image that way, but that kind of defeats the purpose of using hardware acceleration in the first place, since I have to use the CPU to go through every pixel every frame anyway. My FPS dropped from 60 (which I think was the FPS cap) to about 20.

Now it’s funny you should say that but I’ve looked quite seriously into the potential for this for game UIs but still have the same ol’ problem of no libraries out there actually render directly natively to OpenGL. It’s all render-to-a-system-texture-and-upload-it-every-frame. This is crap in two ways: 1. the whole copying it to OpenGL every frame thing 2. mixing it with OpenGL rendered parts means readbacks and thus terrible performance.

Cas :slight_smile:
[/quote]
Certainly. You’re easily dealing with 1/10th of the performance you’re accustomed to outside browser land (electron etc included) and without all the bells and whistles.

What this means in practice for most people is that you can’t get away with writing horrible code - you can still do a lot if you do it smart.

There are complete game frameworks available such as http://phaser.io/ (uses pixi.js to render) (free open source) and http://impactjs.com/ (100$) are probably the “best”.

As an example this game uses no framework, just pure html, js and css: http://www.littlewargame.com/

As a bonus when in browser land you get the most advanced/used UI tools at your fingertips along with it.

I honestly want to opt for a browser that compiles html code down into nothing to send over. The websites can be compressed too, but they aren’t to my specifications. Some of this gzip bullcrap. The file is small enough to seperate into sections and square rooted, pretty much halfing the file size.

and I would like a browser that had more support directing how websites load. I would love functionality and css over images every day. Load those after the sight has its layout cuz 90% of the time I am navigating without looking at the pics.

java and browser is good at least.

DON’T GET ME STARTED ON FLASH WEBSITES :point: