Stars and Ships

StarsAndShips A HTML5/Javascript/Processing engine for an unfinished game. This is a HTML5 canvas powered demo for a kind of space trading/management game. The demo show the ships moving to destinations. The graphics are all vector based, so it scales smoothly to any display size.

Javascript + Processing

Try the Fullscreen version!

Click on the ships or stars or drag the background to see more.

<canvas id="sketch" data-processing-sources="/projects/starsandships/stars.pde" width=500 height=500></canvas>
<script type="application/javascript">  
    var processingInstance;  
    function startSketch() {  
        switchSketchState(true);  
    }  
    function stopSketch() {  
        switchSketchState(false);  
    }  
    function switchSketchState(on) {  
        if (!processingInstance) {  
            processingInstance = Processing.getInstanceById('sketch');  
        }  
        if (on) {  
            processingInstance.loop();  // call Processing loop() function  
        } else {  
            processingInstance.noLoop(); // stop animation, call noLoop()  
        }  
    }  
    setTimeout("console.log('halfsize');halfSizeCanvas('sketch');", 1000);