How can I upload Html5 released Program made with Cerberus X on the Internet?

sanghyeon

New Member
Joined
Jul 26, 2019
How can I upload Html5 released Program made with Cerberus X on the Internet?
I released my program with html platform. So I have html5 folder on my storage.
Then, How can I upload it on the Wepsite or Blog what html5 is supported?
 

magic

Active Member
3rd Party Module Dev
3rd Party Tool Dev
Joined
Mar 5, 2018
Basically you just bring all thing inside html5 folder into your server. If you use other people server you may need to rename CerberusGame.html to index.html first and zip all item in that folder to become one zip file before upload.

Use this version of index.html if you want. This one is my portrait size game

HTML:
<html><head>
<style type="text/css">
body{
    height: 100%;
    overflow: hidden; /* keeps scrollbar off IE */
    font-family: arial,sans-serif;
    font-size: 13px;
    color: #fff;
    background-color: #000;
    border: 0 none white;
    padding: 0;
    margin: 0;
}
canvas{
    border: 0;
    padding: 0;
    margin: auto;
    display: block;
    outline: none;
}
textarea{
    background-color: #000;
    color:rgb(221, 153, 51);
    border: 0;
    padding: 0;
    margin: 0;
    outline: none;
    width: 100%;
}


</style>
<script>

var CANVAS_RESIZE_MODE=1;    //0=locked, 1=stretch, 2=resize

var CANVAS_WIDTH=480;
var CANVAS_HEIGHT=800;

window.onload=function( e ){

    var canvas=document.getElementById( "GameCanvas" );
   
    var mouseDown=false;
    var startY=0;
    var canvasH=CANVAS_HEIGHT;
    var cmousemove=null;
    var cmouseup=null;
    var cmouseout=null;
    var fscreen=false;

    canvas.width=CANVAS_WIDTH;
    canvas.height=CANVAS_HEIGHT;

    function eatEvent( e ){
        if( e.stopPropagation ){
            e.stopPropagation();
            e.preventDefault();
        }else{
            e.cancelBubble=true;
            e.returnValue=false;
        }
    }
   
    function requestFullscreen(){
        var rfs=canvas.requestFullscreen || canvas.webkitRequestFullScreen || canvas.mozRequestFullScreen;
        if( rfs ) rfs.call( canvas );
    }
   
    function updateSize(){
   
        if( fscreen ){
            canvasH=window.innerHeight;
        }else if( canvasH<0 ){
            canvasH=0;
        }
       
        switch( CANVAS_RESIZE_MODE ){
        case 0:
            canvas.parentNode.style.height=canvasH+"px";
            break;
        case 1:
            canvas.style.height=canvasH+"px";
            break;
        case 2:
            canvas.width=document.body.clientWidth;
            canvas.height=canvasH;
            canvas.style.height=canvasH+"px";
            break;
        }

        //Note! Any resize code that modifies canvas.width/canvas.height/canvas.style.width/canvas.style.height should call this to update canvas...
        if( canvas.updateSize ) canvas.updateSize();
    }
   
    canvas.onfullscreenchange=function( e ){
        fscreen=(document.fullscreenElement==canvas);
        updateSize();
    }
   
    canvas.onwebkitfullscreenchange=function( e ){
        fscreen=(document.webkitFullscreenElement==canvas);
        updateSize();
    }
   
    canvas.onmozfullscreenchange=function( e ){
        fscreen=(document.mozFullscreenElement==canvas);
        updateSize();
    }
   

    window.onmousemove=function( e ){
        if( mouseDown ){
            var dy=e.clientY-startY;
            startY+=dy;
            canvasH+=dy;
            updateSize();
            eatEvent( e );
        }
    }
   
    window.onmouseup=function( e ){
        if( mouseDown ){
            canvas.onmousemove=cmousemove;
            canvas.onmouseup=cmouseup;
            canvas.onmouseout=cmouseout;
            mouseDown=false;
            eatEvent( e );
           
        }
    }
   
    window.onresize=function( e ){
        updateSize();
    }
   
    updateSize();
   
    BBCerberusGame.Main( canvas );
}
</script>
</head>

<body>

<div><canvas id="GameCanvas" width="480" height="800" tabindex="1" style="height: 800px;"></canvas></div>


<script language="javascript" src="main.js">Javascript not supported!</script>



</body></html>

Edit: I just realize this tool https://www.cerberus-x.com/community/threads/app-or-plugin-for-easy-deployment.652/#post-6294
Probably you need to check out
 
Last edited:

Phil7

Active Member
3rd Party Tool Dev
Joined
Jun 26, 2017
I put a link to a windows executable online. Just download it from dropbox and unzip it.
This tool is in early alpha state, so please test it only in a copy of your cerberus project folder.
 
Last edited:
Top Bottom