Examination Window. in Developer Help
|
|
So now I am looking to make a window that opens when your character examines an active object in my game, usually from a single click or a key macro. I want this to be a fairly universal window, but not neccessarily a HUD. I had talked before about making a forced page come up in the browser, and that was my original idea, but I wanted to get some opinions before cotinuing. This window would be a window displaying information for whatever was selected by the client. For example, if you were selecting a chest, there would be a page in th browser window pop up with a chest icon in the corner, text saying what it was, then text saying how to use it. However, if you then selected a monster, it would refresh with the monsters information, but the page layout would be similar. I would also like this to reflect HP of a monster as it dwindles in a battle, so I assumed there would be a refresh of the window automatically to occur every 3-5 seconds, or everytime the monster was examined again, however, it would only occur on monsters - well mobs in general. Am I asking for trouble by putting this into a webpage that's forced into the browser? I assume this might cause horrific lag problems. I also wouldn't mind having a floating window with a bmp image I could place in it(if that's even possible in BYOND). Any ideas are happily appreciated. As always :-D
Thanks!
Hepitank
|
Keep the HTML as simple as possible to cut down on bandwidth usage. I recommend using a separate style sheet file and including it in the resources, so it only has to be downloaded once by each client. It will keep your formatting consistent and reduce file sizes.
You should also forget about the auto-update. Most of the time, you will just be transmitting the same page over and over and wasting badwidth. Instead, I'd keep a list of players viewing the atom and send them each an update whenever something changes significantly. Ideally, you would want it to update only once per tick (or a longer time cycle if you choose) with the most recent version.
As a side effect of this system, players could shut the browser window to clear screen space and it would automatically pop up when the atom they are viewing changes in some way. Players won't need to constantly watch the window to see if something changes.