Character Control

yay, it works ;D

I get ~ 45 -50+ fps when run in 1024x768 @ 24 bits (no difference when run in lower, guess that linux doesn’t support “real fullscreen”?)

Amd athlon 900
geforce2 mx
java 1.4.2

EDIT: It looks great though! 8)

well it runs in windowed mode, full screen it initd and then hung. Had to use task manager to kill it.

very cool stuff, one way or the other.

Ok, we are at least getting closer to the problem. Matzon or Cas any ideas on this? (or any others).

[quote]I’m planning on putting in a smooth rubberbanding feature to remove that.
[/quote]
Erm, isn’t rubberbanding about interpolation?
I think the problem here is not solved with interpolation, but maybe simply damping the camera movement instead will help?

If I read
modes[i].freq == gd[0].getDisplayMode().getRefreshRate()
right, you’re trying to select the refresh rate currently selected.
How do you know for sure that refresh rate is supported in the new display mode you’re trying to switch to? Shouldn’t you just try to switch to a refresh mode that is supported in the mode that you’re trying to switch to?

That’s a good point. How do I find out what refresh rate to use? Should I have it as another option you select or is there a way to get that information?

And as for rubberbanding… I think interpolation is what is needed, as the camera’s view is changed in not a very smooth fashion. However, damping would also be good. I think the combination of the two will lead to a very nice camera system.

You go through all supported modes anyway, so you could just select one from the array ( modes[] ), and maybe ‘prefer’ one.
If you look at my code, I prefer to select ‘FPS’ (which is a constant set to 60 in my case) but select any other rate (in the newer code any other rate below 85Hz to prevent freqs like 150Hz) if 60Hz is not supported.

About the rubberbanding, the reason I thought rubberbanding will not work is because the camera shakes every frame to another location, and I suppose there’s no point in interpolation the camera position between frames. Or maybe you want to create the points (to interpolate between) not every frame but every x frames or something?

Thanks, I’ll give that a shot with the frequency.

I think the camera is shaking because each frame it’s view is set to the entitie’s (model) new position. Because the camera is following at a distance, and the model changes elevation the camera tends to snap. By interpolating to the new position that should change. This may mean the camera’s view doesn’t reach the position of the entity all the time as the entity keeps moving, but that’s actually what I want.

Awesome works fine now!

damn, that camera is making me get a headache!! -other than that, looking good. What will it become?

I would say that it’s not so much that the camera is flinging around, but that it is jerky when moving over terrain to keep the subject in a clear line of sight. Other then that, again, great work!

-SG

P.S. I may just have to use this in some internal demos/meetings at Sun :slight_smile:

Thanks everyone for all the feedback. I think I have solved the issue with the display. So, if you were experiencing that problem try the newest version and let me know if that works correctly.

nlmueng: I still don’t know what could be causing your problem. If you try again, or think of anything that it could be, let me know.

My next priority is to enhance the tracking camera. I will be adding damping as erikd suggests as well as rubberbanding to make it a little less jarring. Hopefully, this will help with your headaches, Matzon. :slight_smile:

I’d be honored if you used it in any meetings SpaceGhost.

Thanks everyone.

it was on my work computer, works great at home get 70 fps on p4 2g ati m9 video card(laptop)

Will try again on monday at work.

still hangs in full screen mode :frowning:

zparticle, what does it say when you try to set fullscreen. I.e. the line similar to:

Setting mode to 800 x 600 x 32 @72Hz

And does anything look wrong? I.e. a higher Hz than your monitor supports etc.

Also, what are your machines specs?

Thanks.

Ok, I took the easy way out. You now have to specify the frequency of the monitor as well when starting the app. The new version is up. Let me know if that works.

Dosen’t work in fullscreen for me, tested it on winXP with 1.4.2 jre and a g-force4. Flows nice in windowed mode though, even in higher resolutions.

2003-jul-14 15:53:03 jme.system.PropertiesIO
INFO: PropertiesIO created
2003-jul-14 15:53:03 jme.system.PropertiesIO load
INFO: Read properties
2003-jul-14 15:53:06 jme.system.PropertiesIO save
INFO: Saved properties
2003-jul-14 15:53:06 jme.system.DisplaySystem getValidDisplayMode
INFO: Setting mode to 640 x 480 x 16 @60Hz
2003-jul-14 15:53:07 jme.system.DisplaySystem initDisplay
ALLVARLIG: Failed to create display due to java.lang.Exception: Mode not supported by hardware

Ok, it appears it is just a flat out fullscreen bug? Because 60Hz should work on any monitor. Now I’m really getting confused.

I also use winxp and a gf-4, but as long as I run it in 32 bit, all works fine. In (seemingly any) 16bit mode I get the same error as DrBizzar0.
It seems as if either 16bit is not accellerated on gf4 (which is highly unlikely), or LWJGL wrongfully detects 16bit mode as unaccellerated (more probable IMHO). Or I’m completely mistaken (also not very unlikely ;)).
In any way, it doesn’t seem related to the refresh rate.

Erik

[quote]In (seemingly any) 16bit mode I get the same error as DrBizzar0.
It seems as if either 16bit is not accellerated on gf4 (which is highly unlikely), or LWJGL wrongfully detects 16bit mode as unaccellerated (more probable IMHO).
[/quote]
Hmmm interesting. Yet you don’t have this problem with Cosmic Trip? Or do you?

Hmmmm… OTOH when I try my own little LWJGL game in 16 bit, it works fine :-/ so it might still be something that you are doing wrong (although I dunno what)…

EDIT: The version of Cosmic Trip that is online always selects the highest bits per plane available, as long as it’s not 24 bit. So on most cards it will select 32 bit. The ones on which it works on 16 bit probably don’t work well with CT anyway.