This pretty cool. It would a be visual improvment to have the player ship rotate a little when you move right or left. I’ve got a 1.2Ghz GeForce 4 Ti 4600 and I got FPS 73-75.
[quote]It would a be visual improvment to have the player ship rotate a little when you move right or left.
[/quote]
The lwjgl version will have all the visual improvements I can think of, because we’ll have those kind of cool things practically for free
Thanks,
Erik
236FPS… man, that is so fast that it’s almost not playable.
[quote]236FPS… man, that is so fast that it’s almost not playable.
[/quote]
:o
Next version will be time scaled using a hi res timer (from lwjgl). I was hoping by using BufferStrategy it would lock to the monitor’s refresh rate. It does most of the times, but sometimes it doesn’t. Besides on most computers I tested on I don’t have control over the refresh rate at all so there’s little to no control over play speed in pure java.
Together with the other java2d issues I’m experiencing I’m finally dropping java2d as an api to use for games, even though it seems faster than open-gl in cases where no gfx accelleration is available.
I beefed up difficulty and added a new level system (every 3rd level now has the obligatory ‘end-boss’).
You can also now select the display mode to suit your computers capabilites.
The graphics should scale with the display mode chosen, but speed is not. If possible, you should select a refresh frequency of 70-75 or something because play speed is on per frame basis. If you’re unlucky, you won’t be able to (leaving your fps out of control like with pepe).
Maybe I should reset the high score list…
It’s still at http://www.mycgiserver.com/~movegaga/
Your results may vary though, as I find full-screen/java2d extremely unreliable but maybe you are lucky and it works ok.
If your screen stays white or black at start up, just giving it another try might help. :-[
Now back to my open-gl engine
[quote]Grmbl, my host doesn’t support Web Start >:(
Is it just me, or is this a pretty major drawback of Web Start?
I mean, you can deploy applets everywhere you want but with Web Start, the web server needs to support some obscure MIME type…
[/quote]
You can add the MIME-type in a link directly in the html-code. Never tested it myself, but it might work.
Add something like:
type=“application/x-java-jnlp-file”
to the link
End users can also configure their browser to launch .jnlp files with webstart based on the extension.
Yes, someone else has tried that too but I think he said that it works locally but not when you put it online in a web server.
I haven’t tried it myself though… Maybe I can still give it a try.
Greetings,
Erik
Hmmmm…
Can’t view the hardware accelerated version, but software version works. System is:
[] Soyo Dragon Ultra Platinum (DDR400)
[] Athlon XP 2400
[] 512MB Crucial PC2700
[] GeForce 3 Ti200 64mb
(System is SCHWWWEEEETTT! It’s good to be the king ;))
Any thoughts?
-Chris
[quote]Any thoughts?
[/quote]
Yes, just play the LWJGL version ;D
I found fullscreen java2d either too slow or unreliable (and most of the time both) for games (or at least for my games ;D)
Also, without some native help you don’t have good control over play speed, and there are control problems as well as sound problems on some machines.
For these reasons, I won’t update this 2d version again and will probably stay away from the standard java apis for games.
Well, erikd, instead of staying away from the Java APIs, why not let us help you figure out how to make them work? I can put you in touch with someone at Sun that may be able to assist. Or, at th very least, I can run the issues into the Java2D team to see what needs to be done.
-Chris
[quote]why not let us help you figure out how to make them work?
[/quote]
Lets see -
when was that we requested a high performance timer?
HW accelerated images (with control over which images reside in HW and which in system memory)?
Accelerated drawing of basic drawing operations?
Translucency?
and on and on
The best we get is - “we might put this in the next release” = 1-2 years from now.
Sun is just moving too slow, and doesn’t seem to care about java gaming - Sun is all about enterprise customers.
How is jsr 134 comming along btw? :-X
I appreciate the what you’re saying , but I’m having too much fun learning a well established and proven api like open-gl to bother too much again about the standard apis.
Believe me I did, and there are several reasons why I like to stick with LWJGL for a while:
- With open-GL you can get much better performing much better looking results with less effort (with my 1st try I had 2000 sprites whizzing on screen and got 1400fps(!) on a p2/450. Try that with java2d, that can’t be done.)
- I have done some trials with j3d and although I still find it interesting, I didn’t find anything real, downloadable and playable that would convince me that I can use it for good performing games. Furthermore, LWJGL is because of its small size easily distributable through web start.
- LWJGL is more platform independant for games than the standard java2d apis. This may sound weird, but fullscreen exclusive only works-ish on wintel. (not talking about applet games here)
Rant alert.
It doesn’t really matter what you ask the Java2D team to do because, although it’s a nice little API in its own right and produces very high quality output, it’s slow by design, even when all the frivolous bugs are fixed.
What we want from Sun is a concrete commitment to OpenGL and OpenAL. Concrete, as in, fully supported and part of a J2ME profile.
With Sun behind OpenGL and OpenAL there will finally be a competitor to DirectX and Win32. Currently there is no competitor at all and we’re being steamrollered. It doesn’t seem to matter about how good the demos we produce are because any programmer trying to get a job needs to know DirectX and Win32 - it’s got critical mass now and nothing can stop it. Except a united front of cross-platform technology which can actually deliver results, and the only such technology is OpenGL and OpenAL backed by Java. Even OpenGL is floundering a little because of vendors’ patchy commitment to producing stable, accurate drivers. The only thing keeping it alive in consumer space is John Carmack - and I don’t say this frivolously. As for OpenAL, it would be dead in the water without the forthcoming Unreal installment behind it.
In order for Java to truly make it on the client as a games platform Sun will need to accept the need for low-level operations and put its entire might behind it. Java2D and Java3D are just simply no good for what we want to do. If you tried to change them to be what we wanted you’d end up with OpenGL if you were doing it right.
Apart from Java2D there are still several other things holding us back from using Java properly for games (aside from the other bits and pieces in LWJGL like input and timers)
-
The lack of a proper lightweight game VM which has optimisations especially tuned for gaming requirements. In particular a vsynced concurrent garbage collector; but other specialisations are such things as fast floating point, default -Xincgc -Xconcgc garbage collection, escape analysis etc etc. are not available. The server VM is delivering about the same speed as Jet3.0 right now but suffers abominably from slow startup - where’s the two stage VM?
-
The insistence from Sun that Java is an applications programming language rather than a systems programming language, and then providing a partial systems programming API - this manifests itself clearly in NIO: we have buffers but absolutely no language features to easily interface the contents of these buffers with Java, unless, strangely, all your native data consists of simple primitive types. I don’t know about you but my vertices consist of two Vector3fs and a Color, not 6 floats and four bytes. In short, we don’t have structs, and that’s a lot more serious than many people realise until they really start to do proper high-performance work. We need structs which can directly map to areas of a Buffer in order to directly dick around with values that are to be sent to and from the operating system. Just try manipulating 10,000 points in a frame and profile it and you’ll understand where the time’s being wasted - copying data into and out buffers. And apart from that it’s very difficult to code and prone to all manner of mistakes.
Maybe more ranting later.
Cas
using java2d/swing on linux is REALLY slowish and I’m quite pissed on this issue.
until sun refuse to back 2D draw on OpenGL, like Apple do on MacOSX 10.2 (the result is awesome) java2D & swing will continue to be slowish.
I just think that Sun does not have priorities at gaming at all.
If they had, they would at least have hasted to put in a decent timer in java years ago.
I have the feeling that as far as gaming is concerned that is a bit more advanced than some old school pacman fun, we’re on own and should not expect anything from Sun.
It simply doesn’t seem to fit in their strategy.
Aside from problems Cas mentions (which I don’t think will ever be addressed by Sun), I still think java has great potential for gaming.
Java’s proven productivity for example. Also, when used as ‘only’ scripting, you will have the most powerful game scripting language ever (somebody feels like binding java to the doom3 engine? ;)). Sun decided not to talk about the games that actually used java that way because they felt it would make people think ‘See: java is slow, and only useful for scripting’ while they wanted to make people see it is fast. I think that was a lost opportunity.
Another great thing is its built in capabilities of networking and furthermore the most user friendly distribution ever (Web Start) and more.
As far as Sun putting its entire might behind OGL and OAL, it will never happen. They have other priorities, like court fights (have you heard that M$ does not have to include java anymore?).
nice game
reminds me a starfield demo i’d seen yesterday :>
fps ~90 if i’m away from the centre… 40-50 if i’m somewhere in the middle
the smoke eats all performance.
non-accelerated is ~80 in the first and 25-35 in the second case.
specs: k7 500/128mb/gf2mx
maybe it would be a good idea to replace the smoke with summin particle like (as cheap as the stars would be enough… no need to resize an image there)
and now… back to off topic =)
I just think that Sun does not have priorities at gaming at all.
yea… well games would get ppl to be more up to date vm-wise. most ppl like to get more into the subject of programming with lil games… and today’s lil game coders are the coding gurus in the not to distant future
and for benchmark purposes… most ppl like to have summin colorful’n’flashy going on the screen for that matter. slow graphics let em think that the language is slow itself, wich can’t be a good thing for sun.
well… it’s up to sun to make us happy :]
If they had, they would at least have hasted to put in a decent timer in java years ago.
ack. it wouldn’t be that hard to make a useful timer. such a timer would be usefull for quick n dirty profiling too.
What pisses me off is that soon the only way to go is either C++ or C#, which both are by the same company that everyone loves. Well, Microsoft is the biggest supporter of C++ after all…
I mean scheme, lisp, basic and haskell are all pretty dead on the side of game development.
Too bad gaming isn’t int sun’s priorities.
I thought about writing a game in pure Prolog once. It’d be an adventure game, where you’d enter all your moves at the same time, something like this:
attempt([open(door),east(),get(key),unlock(hatch),...]).
The engine would sit there and think for a while, then respond:
no.
;D