ID:1922198
 
Hey, everybody! I have a few quick questions I hope someone can help me with:

1) On-screen health bars. I can make a HUD and have the image display correctly but what's the best way to have the bar change with your character's health? A little while ago, I figured bars would be the best way but with the lack of a transparency option as well developers moving away from DMF's because of the webclient, what's the best way to go about it now?

2) Player owned houses(objs). What's the best way to go about that? My intention is to have a player be able to "purchase" a house, be able to get into it (through a door teleporter most-likely) and then be able to place objects around the interior. While that's all well and good, I figure that if the server is taken down, all of that will be erased. What's the best way to do it?

3) I'm currently redesigning what players see when the first connect to the server. I'd like for them to be greeted by a DMF window asking for a Username and Password but I'm a bit confused on how to do it. The tutorial I'm following for the username/password system is:

http://www.byond.com/developer/Yusuke13/PasswordLoginDemo

Is the best way to have two inputs on the DMF window? How would I go about transferring the input into the code for the login? Would there be an easier way?

4) I see that bar's are a bit glitchy in my webclient. I have a slider that when brought to 100, it has a few HUD options pop up. It works flawlessly in DS but when holding the slider in webclient, it shakes, it's hard to get to 100, etc. Any ideas?

Thanks, guys!
1) It's hard to say what the "best" way is because it depends heavily on your design. If you want graphics that conform to the same pixel grid as your map, then a HUD (screen objects in client.screen) is the way to go. Otherwise, a skin bar works if you want automatic compatibility between Dream Seeker and Webclient (since skins translate automatically to webclient interfaces). For a webclient-specific skin, your options are actually limitless with the full power of JavaScript, HTML, CSS, etc.

Only a handful of developers are actually designing for the webclient though, as far as I know.

2) There are libraries and tutorials on map instancing, saving, and loading.
* Map instancing: loading a copy of a region of the map for individual players or groups to explore. Multiple copies can exist simultaneously for multiple groups.
* Map saving & loading: saving a region of the map to a file that persists when the server is down or rebooting, then loading the map from the file into the world.
There are nice libraries by Forum_account, Lummox JR, and IainPeregrine.

3) I don't understand why people wouldn't just use BYOND login and nothing else. I already have to log into BYOND, I don't want to log into the games too. Whatever you're tying to the in-game account, you can tie to the BYOND key. But in terms of how to actually do that, I suggest you use a browser with an actual sign up/in page that uses an existing system, because with just skin inputs, you're sending sensitive information (the password) as plain text between the client and server, which is not safe.

4) Report it as a bug, probably include a test project and maybe even a gif of it happening. If you're using the latest webclient, it would go in Beta Bugs.
1) To make the health bar change with the character's health you should add a proc that will return the characters HP after he gets damaged (return src.HP - Damage) and then adjust the health HUD using matrix. If you don't want to use DMF's you can design an health bar icon yourself (or generate it through code) and add it to the client's screen as a HUD.

2) In order to generate an house interior for each player you should play with Z levels. You can create a new z level with the house interior looks for each player. Then the client would costumize their own house interior (z level).

3) For that end you want to play with winset and winshow. If you don't want anything else appart from your login window to be shown when a player logs in then you want to double click in the window and uncheck the visible option (you can also do this with the winset proc (check the skin reference)). After the player submits the username and password you want to use winshow to hide the login panel and then you call winshow again to show the map (actual game) window. You can transfer the input into the code by using winget proc.

4) I am not very familiar with the webclient stuff so I am not sure what is wrong with your slider but you can use javascript and html to accomplish that with ease , like this:
<!DOCTYPE html>
<html>
<body>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> //If u want to use the Jquery function


<input type="range" id="myRange" value="100">



<script>
function GetResultJavascript() {
var x = document.getElementById("myRange").value;
window.location = 'byond://?value='+x;

}

//OR with Jquery (either use the GetResultJavascript or //GetResultJquery. It is your personal choice.
//You can trasnfer the sliders value to byond using the //winset and topic stuff

$(document).ready(function(){ //This makes sure that the GetResult function can only be called when the page is loaded
function GetResultJQuery(){
var x = $("#myRange").value;

window.location = 'byond://?value='+x;


}
});

</script>

</body>
</html>