No flicker, but traces and greying, someone help!

I’m writing a relatively simple game, asteroids style sort of. Anyway, its scrolling and shooting and stuff but I’m getting some tracing of sprites and a little greying of the background stars…

Could someone have a look and see if they can explain the effects? I’m actually using buffer strategies so I’d expected to prevent this sort of thing…

http://www.cokeandcode.com/astroprime

Its a webstart and very basic at the moment. If you just start a local a server then enter the death match you’ll be able to see the problems (and fly around).

Thanks for any help

Kev

PS. I’ve also got a few questions on how to make things look like they’re glowing (shields/explosions etc…), but I’ll save them til later :slight_smile:

Works fine 4 me (apart from the 1st time, when I had kazaa running in the background - it crashed the PC >:( :-*)

Can u post a screenshot of the visual problems u are seeing?

I’m thinking maybe its my laptop screen leaving blur behind it since when I take a screen shot things look fine… thanks for checking tho…

Ok, I’ll start another post for the visual effects I’m trying to achieve now :slight_smile:

Kev

I can’t start a game on Mac OS X. The connect, settings, exit, local server buttons all don’t respond to clicks. I can type server addresses and passwords (hit enter to move between those two fields) and press Esc to exit… that’s it.

I don’t know if Macs do this or not, but check to make sure that the annoying “Would you like to create a shortcut?” dialog is gone before you enter full screen mode. It has an annoying way of grabbing the input.

Damn it, damn it, damn it…

Really starting to wish I had access to a Mac, this is the second time something doesn’t work.

Is there a document somewhere that describes differences between Mac and Windows VMs and hopefully the common gotchas…

This I would suppose would be something to do with which mouse events actually get fired.

OOI, when you attempt to click on the connect button, does the white box around it go grey?

Thanks for the feedback,

Kev

yeah, I had that dialog stealing focus from the full screen window. (the only thing that gave it away, was the mouse cursor, which reverted to the system cursor instead of that little ship) The solution is ez enough, just press escape once.

The new veresion with the ‘do you want to play fullscreen’ dialog fixes the problem though :slight_smile:

[quote]Damn it, damn it, damn it…

Really starting to wish I had access to a Mac, this is the second time something doesn’t work.

Is there a document somewhere that describes differences between Mac and Windows VMs and hopefully the common gotchas…

This I would suppose would be something to do with which mouse events actually get fired.

OOI, when you attempt to click on the connect button, does the white box around it go grey?
[/quote]
Since I can type in the password and server fields it seem that stolen focus should not be the issue… even if it was… clicking should change the focus…

The box around the button does not change in any way when it is clicked.

You might find helpful docs here http://developer.apple.com/java/

I can look a bit deeper this evening. I’m happy to test on the Mac for people. In the end it means more games for us Mac users.

If you sign up as a developer on Apple’s web site (there is a level of free membership) you can access their java-dev email list and ask questions there. It might be a good place to ask for volunteer testers as well.

I was really wondering whether mousePressed gets called at all on OSX?

Maybe just mouseClicked gets called or something?

Can you click on the text fields to change which one has focus?

Cheers,

Kev

No I can’t - focus only changes when I press enter.

There are no messages in the webstart log. It seems as if no mouse presses are being registered at all.

If you add some debug output I can try again and send you the results.

As far as I know mousePressed is fully supported… but there could be Bugs with Apple’s fullscreen implementation maybe?? I will reset and try window mode.

Ok, how do I get it to ask me about fullscreen mode again?

Fraid you need to click the settings button to get to that option after the first check…

However, if you locate the directory “.astroprime” someone (depends on webstart) on your harddrive and delete the files inside (or edit them, its pretty obvious properties files), should get check again…

Thanks for the support,

Kev

Could you give me a better hint?:slight_smile: What APIs are you using to make the .astroprime folder? I can’t find it anywhere.

doh! it only does that on windows. Its a nasty hack round webstarts user directory.

You’re looking for a file called client.props

Sorry about the mistake,

Kev

Found it… BUT… don’t do that. It has put clients.prop in the directory with the Web Start application and/or the root of the HD. Something that I feel Web Start apps shouldn’t be messing with. (It is possible even that on some systems the file permissions would make this impossible.)

What is wrong with the user’s home directory?

Ok… Test Results:

It works in windowed mode! Interesting… if we can isolate the full-screen problem I will file a bug report with Apple.
The text in the middle of the screen when you start a game is illegible. (I think it says press space to start or something like that.)
Your ship appears on top of a green square that rotates with the ship.
During the game the cursor is changed to a small black rectangle.

[quote]Found it… BUT… don’t do that. It has put clients.prop in the directory with the Web Start application and/or the root of the HD. Something that I feel Web Start apps shouldn’t be messing with. (It is possible even that on some systems the file permissions would make this impossible.)

What is wrong with the user’s home directory?

Ok… Test Results:

It works in windowed mode! Interesting… if we can isolate the full-screen problem I will file a bug report with Apple.
The text in the middle of the screen when you start a game is illegible. (I think it says press space to start or something like that.)
Your ship appears on top of a green square that rotates with the ship.
During the game the cursor is changed to a small black rectangle.
[/quote]
hahahaha,
looks like you’ve got your work cut out for ya kev :slight_smile:

write once, debug everywhere bwhahahah :wink:

First, let me say, YOU ARE A STAR. Thanks, really needed some OSX testing.

  • The directory it tries to write to is “.”. Which, I had assumed that web start created a directory to run each app in, and hence using “.” would keep all the files with the application. I’ve already put a hack in for windows. I’ll rectify this. Does the “user.home” still work as system property on all platforms?

  • Yeah, I’ve been kind of aware of the text problem. It will get updated at a later time. At this moment, its not really at alpha test yet. Just needed to sort this visual style out.

  • See, the green square is interesting. The Ship is a gif with a transparent background. The color of the background is a vibrant green (to help with screening it out). So, OSX isn’t supporting transparent gifs? Or, more likely, I’m doing something wrong?

  • The cursor, again, its a black sqaure, but all the alpha is set to 0, meaning it should be a transparent black square. This is how I turn the mouse off. Doesn’t seem to be any other way. So again, OSX isn’t supporting transparency, or do I need to turn something on? Again, I’ll look into it and post back.

Just to reiterate, MUCH MUCH MUCH appreciated.

Kev ‘off to find the Java 2D bug parade’

Abuse: Damn right, Java2D really does need work to be compatible across platforms. The above problem would be hassle for even applications, let alone games. But I suppose its a step better (in my view) than worrying about platform,vendor and driver dependance in something OpenGL :).

I’ve just been convinced that the sensible thing to do is “go and have a look at JOGL/LWJGL” and use it for 2D games.

So, I’m off to have a look. Damn it, I hate using native libraries.

Kev

IS it possible os x’s pallette doesn’t support the particular mask color you are using.?

[quote]I’ve just been convinced that the sensible thing to do is “go and have a look at JOGL/LWJGL” and use it for 2D games.

So, I’m off to have a look. Damn it, I hate using native libraries.

Kev
[/quote]
That would be a shame, I know you have been an inspiration and valuable learning source to people like me. People who don’t want to use native stuff, just straight java. :-[