File under:

Stars and Ships

A HTML5/Javascript/Processing engine for an unfinished game.

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);

This is a HTML5 canvas powered demo I was writing some years ago. I have lost my notes and designs for it, but clearly I was aiming for some kind of space trading/management game. The ships wouldn't be moving that fast in the actual game, I wanted it to be turn-based, and this is just the graphics test showing all the ships moving to their correct destinations.

The graphics are all vector based, so it scales smoothly to any display size.