Totally got lazy and didn't read everything, but I saw discussion on how you did your HUD and figured I'd post mine. :P

In my project I basically created a /hud datum that creates itself based on the height and width you give it (Height and width being the inside height and width - so a height and width of 0 gives you a HUD with no interior, just outer edges pieced together in a small block). It contains a list called texts and a list called inventories, which contain /hud_text and /hud_inv datums, respectively. These datums are associated with the client they belong to in the list.

With this method, I can create a HUD once - I have 4 that I have created by default right now - a HUD for the stats, a HUD for the Inventory, a HUD for NPC Dialog, and a full screen HUD that I'm currently using to display login information and controls (for when I run public tests).
I can display these HUD backgrounds to anyone, and the HUD automatically displays any text associated with the client being displayed to as well as any inventory controls.

I really like this method because I'm not constantly having to create new HUD objects. It is more efficient and quite easy. I am also not cluttering up /mob with variables to remember either, I'm making use of the tag variable for most of my different HUD datums along with the mob's ckey so that I can call locate() on whatever unique tag I need.

I used to create really crappy HUDs, looking back. I disappeared for a while and didn't do any programming, then I came back and did something like this (And only had 2 runtime errors in the entire creation process for all the HUDs).

Okay, I'm done bragging. lol
It's totally fine, I generally hear something different depending on the developer so it's cool to see how others think. I would never have thought about a design similar to yours otherwise. :3

Cloud Magic wrote:
Lavitiz wrote:
Yeah, none of those are problems. Lol. It's alright though, everything is corrected. :3

Great job on correcting the problem on your own, I apologize I wasn't here sooner to give you proper advice!

Thanks, and it's no problem. I'm noticing once in a while things get a little bit harder the track down the further I get into this project. Generally not a lot of things turn out like this, but once in a while.
In response to Albro1
Albro1 wrote:
Totally got lazy and didn't read everything, but I saw discussion on how you did your HUD and figured I'd post mine. :P




For removing and displaying groups of HUD objects I often use a list to keep track of them as well as some minor manipulation depending on what you need to do. Just another method to simplify things.

And yea I admit I also didn't fully read the entire OP just sorta tldr skimmed it. XD

Cloud Magic wrote:
Also, if they're going to re-appear you should set the invisibility status, not add and remove them over and over.

What is this sentence directed at?
Eh. I like efficiency, but I haven't experienced any noticable problems when adding/removing objects from the client's screen in any circumstances.
In response to Albro1
Albro1 wrote:
Eh. I like efficiency, but I haven't experienced any noticable problems when adding/removing objects from the client's screen in any circumstances.

Some people just like to nit pick with technicalities.
Some people equate complexity with better.
99% of the time that's not the case.

There's 0 noticable difference unless the person is just a horrible coder doing something terribly wrong.
Cloud Magic wrote:

Maybe if you could explain how your picture would help our questioneer write the code, it would be more suitable.

It wasn't directed at Lavitz or yourself. I was speaking to Albro actually. Lavtiz already said he's sorted out his problem.

People respond better to visuals, it's a time tested age old way to convey information quickly. Secondly, that's not a screen shot from my game-it's a commissioned project I've been working on.


Cloud Magic wrote:
It's noticeable under a large of processing going on i.e. a lot of players or atoms or a shitty networking host. Even the smallest problems become the biggest when multiplied several times over.

@Dariuc, If you don't wish for me to speak to you, you shouldn't have ignored my request for you to not speak to me, speak to me again, then ask me not to speak to you.

Actually.. I honored your request yesterday after you cried to the moderator that I was "bullying" you.
You go out of your way to comment to me every single time. At this point it doesn't matter. I'll just resume ignoring you, I just thought I'd ask nicely.
If you have THAT much processing going on in an average BYOND game (rips come to mind), you're doing something wrong (...yep.).
I'm also not one who likes to get a host who can't reliably do the only task they've been asked to do.
Just my two cents on nitpicky matters like that, though.
I wouldn't call it ignorance if I am fully aware of it and choose what way I want to do it. But whatever. This is getting very off topic.
Now you're on another tangent. Ignorance is not the same as choosing the lesser of two ways.

Please stop trying to drag out something pointless like this. You've made your point, now move on.

EDIT: I suppose I should start using the "quote" feature when I reply to you so that things still make sense when you delete your replies.
In response to Albro1
Albro1 wrote:
EDIT: I suppose I should start using the "quote" feature when I reply to you so that things still make sense when you delete your replies.

you noticed that too huh....
Page: 1 2