Hi everybody!
Can anyone give me some tips on what are the proper settings I should set in terms off css / js in order to make my game responsive not only in Chrome or other browsers as well as the version that I'll be pushing with Cordova.
This is my current css, following oficial Wade templates:
html, body {
width: 100%;
height: 100%;
margin: auto;
padding: 0;
position: absolute;
left: 0;
top: 0;
right: 0;
bottom: 0;
overflow: hidden;
z-index: -1000;
background: #000;
-webkit-tap-highlight-color: rgba(255, 255, 255, 0);
-ms-touch-action: none;
-webkit-perspective: 800px;
-moz-perspective: 800px;
-o-perspective: 800px;
perspective: 800px;
}
canvas, #wade_main_div {
margin: auto;
position: absolute;
padding: 0;
left: 0;
top: 0;
right: 0;
bottom: 0;
border: none;
outline: none;
-webkit-backface-visibility: hidden;
-moz-backface-visibility: hidden;
-o-backface-visibility: hidden;
backface-visibility: hidden;
-moz-user-select: none;
-khtml-user-select: none;
-webkit-user-select: none;
user-select: none;
-moz-transform: translate3d(0, 0, 0);
-webkit-transform: translate3d(0, 0, 0);
-o-transform: translate3d(0, 0, 0);
-ms-transform: translate3d(0, 0, 0);
-webkit-transform-style: preserve-3d;
-moz-transform-style: preserve-3d;
-o-transform-style: preserve-3d;
transform-style: preserve-3d;
}
.loadingImage_class {
margin: auto;
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
z-index: 2;
}
and my html:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Game Engine</title>
<script src="https://code.jquery.com/jquery-3.2.1.min.js" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous"></script>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<!-- Optional theme -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">
<!-- Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<link rel="stylesheet" href="/css/game.css" media="screen">
<script src="js/wade_4.0.js" charset="utf-8"></script>
<script src="js/game.js" charset="utf-8"></script>
<script type="text/javascript">
document.addEventListener('DOMContentLoaded', function(){
wade.init('js/game.js');
});
</script>
</head>
<body>
<div id="container" style="border:0; width:100%; height:100%;">
<div id="wade_main_div" width="800" height="600" tabindex="1">
</div>
</div>
</body>
</html>