Anyone know how to make a well-behaved HUD?
|
Rolig Loon
Not as dumb as I look
Join date: 22 Mar 2007
Posts: 2,482
|
04-26-2009 13:27
I'll admit that I haven't made all that many HUDs, but I thought I understood all the rules. Thing is, I find that there's always SOMEBODY who has a problem attaching a HUD I've made, so I'm obviously missing some step. Right now, for example, I made a HUD that attaches to the Center attachment point and shows up as a nice red dot that is physically on the left side of the screen. So far, about 30 people have been able to wear the HUD straight out of the box with no trouble at all, but I have had 3 people who can't see it on the screen at all when they attach it. I assumed that their screen must be an oddball size and that the HUD is just outside their field of view. I've tried talking them through ways to change screen resolution but so far they have each told me that the HUD simply isn't there, no matter what they do. Thing is, it shows up as "worn" in their inventory, and my diagnostics tell me that the script IS attached and is functioning. So....... Two questions: (1) Can anyone outline a foolproof way to make a HUD that attaches properly for every user? (2) Can you suggest any clever ways to find a lost but attached HUD? 
_____________________
It's hard to tell gender from names around here but if you care, Rolig = she. And I exist only in SL, so don't ask....  Look for my work in XStreetSL at 
|
Ikryn Gurbux
Registered User
Join date: 28 Jun 2008
Posts: 4
|
04-26-2009 15:05
First i'd like to point out I have never made a HUD, yet. For your first problem I know that when making a video game there is a "safe zone" you should put the HUD Elements in. I would apply this to Second Life as well. There is probably an area around the screen that is the unsafe zone and you should not put the elements there. Now as for figuring out what that is, you have fun with that. As for your second problem perhaps they can detach it then tell it to attach at a different point on the HUD? There is a detach all option when you click on yourself, just in case you didn't know.
|
Rolig Loon
Not as dumb as I look
Join date: 22 Mar 2007
Posts: 2,482
|
04-26-2009 15:41
Thanks. There's no such "safe zone" in SL, though, so that's not an issue. Thanks also for the suggestion of using a different attachment spot. That's the obvious first thing I do tell people. It doesn't make any difference in this case.
For what it's worth, I have also considered the possibility that for some weird reason the HUD is rotated out of the plane of the screen for these few people. As a precaution, though, I deliberately give my HUD some depth instead of leaving it paper-thin. If it is turned 90 degrees, it still ought to be visible edge-on as a fat line.
_____________________
It's hard to tell gender from names around here but if you care, Rolig = she. And I exist only in SL, so don't ask....  Look for my work in XStreetSL at 
|
Rygel Ryba
Registered User
Join date: 12 Feb 2008
Posts: 254
|
04-26-2009 15:42
Maybe this isn't all that obvious, but... why HUD center? If the ball is on the left, attach it to the left. I have a hud that attaches center (because it has hypnosis sprials that need to be on the center of the screen). Left and right and up and down distances always vary on a number of factors (even with the same screen resolution - full screen and windowed mode provide different results because the borders of the window take up space).
The best thing to do is to attach it to a point and put it in the center of that point. If you want it on the left - put it center of the screen, on the left. (This will also allow them to fairly easily attach it to top left or bottom left too if it's not too tall in either direction).
|
Rygel Ryba
Registered User
Join date: 12 Feb 2008
Posts: 254
|
04-26-2009 15:46
From: Rolig Loon For what it's worth, I have also considered the possibility that for some weird reason the HUD is rotated out of the plane of the screen for these few people. As a precaution, though, I deliberately give my HUD some depth instead of leaving it paper-thin. If it is turned 90 degrees, it still ought to be visible edge-on as a fat line.
They do rotate sometimes too - which is a pisser. Chances are it's offscreen. One thing you can do is make yourself a positioning script - if you want them to be able to attach it to any HUD point. Granted, if you let them attach it on the right it should BE on the right in the end. And as such, if they want to attach it center, it should be center - and so on. Basically to make this script, whip up a little something that will let you touch a prim in the hud and have it report the hud's current position and rotation. Then you make a script that has a variable for each attach point and put the values you dumped for each saved position into those variables. On attach - the HUD will say, "I'm attached on Top Right - so I know I need to move to here and rotate this way." Downside there is that it doesn't let the user make their own adjustments unless you put in something that will let them save their position over the base positions you hardcoded in.
|
Rolig Loon
Not as dumb as I look
Join date: 22 Mar 2007
Posts: 2,482
|
04-26-2009 15:52
From: Rygel Ryba Maybe this isn't all that obvious, but... why HUD center? If the ball is on the left, attach it to the left. Ah... The answer to that is practicality. People who are using my HUD rarely have anything attached at the Center position, so it's a good default spot for them. (This is a gaggle of librarians, who tend to attach reference tools around the screen edges.) If I used the left side as a default, chances are decent that it would force them to detach another HUD. This way, I'm fairly sure that my HUD will attach safely and the owner can use Edit to slide it around if necessary. Still, it really doesn't make a difference to these few "problem users" where the HUD is attached. It isn't visible on their screen, regardless of where it's attached.
_____________________
It's hard to tell gender from names around here but if you care, Rolig = she. And I exist only in SL, so don't ask....  Look for my work in XStreetSL at 
|
Rolig Loon
Not as dumb as I look
Join date: 22 Mar 2007
Posts: 2,482
|
04-26-2009 15:56
From: Rygel Ryba They do rotate sometimes too - which is a pisser. Chances are it's offscreen. One thing you can do is make yourself a positioning script - if you want them to be able to attach it to any HUD point. Granted, if you let them attach it on the right it should BE on the right in the end. And as such, if they want to attach it center, it should be center - and so on. Basically to make this script, whip up a little something that will let you touch a prim in the hud and have it report the hud's current position and rotation. Then you make a script that has a variable for each attach point and put the values you dumped for each saved position into those variables. On attach - the HUD will say, "I'm attached on Top Right - so I know I need to move to here and rotate this way." Downside there is that it doesn't let the user make their own adjustments unless you put in something that will let them save their position over the base positions you hardcoded in. Ah... now THAT's a smart idea, and easy to do. I should have thought of that one. Thanks. I'll give it a shot. 
_____________________
It's hard to tell gender from names around here but if you care, Rolig = she. And I exist only in SL, so don't ask....  Look for my work in XStreetSL at 
|
Viktoria Dovgal
…
Join date: 29 Jul 2007
Posts: 3,593
|
04-26-2009 18:04
A nice touch is to do the positioning thing only in state-entry or if llGetAttached() is changed. Then the solution to ZOMG I LOSTED MY HUDDD! can be attach to another spot, then back to where you really want it, without a lot of fiddly zoomy stuff in the editor.
|
Rolig Loon
Not as dumb as I look
Join date: 22 Mar 2007
Posts: 2,482
|
04-26-2009 19:18
From: Viktoria Dovgal A nice touch is to do the positioning thing only in state-entry or if llGetAttached() is changed. Then the solution to ZOMG I LOSTED MY HUDDD! can be attach to another spot, then back to where you really want it, without a lot of fiddly zoomy stuff in the editor. Good idea. Considering the technical prowess of many of the people who will be using the HUD, I'd like to make it as simple and foolproof as I can.
_____________________
It's hard to tell gender from names around here but if you care, Rolig = she. And I exist only in SL, so don't ask....  Look for my work in XStreetSL at 
|