rexrainbow's Recent Forum Activity

  • I vote html5/JavaScript engine only ( current solution ) , unless scirra has more than 10 programmers for engine.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Hi there! It seems plugin is not available from link you provided in your first post, unless I'm missing something really obvious!

    https://dl.dropboxusercontent.com/u/577 ... rolling.7z

  • Nitro187

    Here is the origin code of loading, ( downloaded in 1st post )

    	// called when loading the full state of the game
    	instanceProto.loadFromJSON = function (o)
    	{
            var canvasWidth = this.canvas.width = o["canvas_w"];
            var canvasHeight = this.canvas.height = o["canvas_h"];
            var data = this.ctx.getImageData(0,0,this.canvas.width,this.canvas.height).data;
            for (var y = 0; y < canvasHeight; ++y) {
                for (var x = 0; x < canvasWidth; ++x) {
                    var index = (y * canvasWidth + x)*4;
                    for (var c = 0; c < 4; ++c)
                    data[index+c] = o["image"][index+c];
                }
            }
    		// load from the state previously saved by saveToJSON
    		// 'o' provides the same object that you saved, e.g.
    		// this.myValue = o["myValue"];
    		// note you MUST use double-quote syntax (e.g. o["property"]) to prevent
    		// Closure Compiler renaming and breaking the save format
    	};[/code:26psdbe6]
    
    "ctx.getImageData" only copy image data, not get the reference. Any modification of this data array would not affect the canvas image.
    [code:26psdbe6]var data = this.ctx.getImageData(0,0,this.canvas.width,this.canvas.height).data;[/code:26psdbe6]
    
    The solution of change the image of this canvas is using "ctx.putImageData", imo. Since this method needs an image data parameter, I use "ctx.createImageData" to create a new one, then fill it by saving data. Finally put this new image data back by "ctx.putImageData",
  • Nitro187

    Loading by official load action.

  • R0J0hound

    These code could fix the bug of loading.

    	// called when loading the full state of the game
    	instanceProto.loadFromJSON = function (o)
    	{
            var canvasWidth = this.canvas.width = o["canvas_w"];
            var canvasHeight = this.canvas.height = o["canvas_h"];
            
            var img_data = this.ctx.createImageData(canvasWidth, canvasHeight);
            var data = img_data.data;
            var cnt = data.length;
            for(var i=0; i<=cnt; i++)        
                data[i] =o["image"][i];   
            
            this.ctx.putImageData(img_data, 0, 0);
    	};[/code:31ka48yz]
  • You might see the source code of official websocket plugin first.

    To include external file, add

    "dependency": "file_name"

    in edittime.js, see SDK for more detail.

  • I and made another tag text-like plugin: BBCode text plugin. (Demo)

    It might be more intuition, imo.

  • Set text properties by bbcode

    It supports bold, italic, text color, or size properties recently.

    See demo first,

    • type something at textbox

    Document, plugin and sample capx are included.

    It also supports scrolling and typing by rex_text_scrolling behavior / rex_text_typing behavior.

  • Update rex_tagText plugin, rex_text_scrolling behavior, rex_text_typing behavior -

    Now scrolling could be used while tag text has "class" and "style" tags ( sample capx ), previous version only could scrolling tag text which has "class" tags.

  • WilliamAnderson

    Yes, this plugin could show words with different colors.

  • tfkmaster

    I had updated tag text plugin again for this bug fix, sorry for missing this testing.

  • Turaco

    The value stored in CSV cell might be string or number. It is impossible to increase value in string cell.

rexrainbow's avatar

rexrainbow

Early Adopter

Member since 4 Apr, 2011

Twitter
rexrainbow has 84 followers

Connect with rexrainbow

Trophy Case

  • 13-Year Club
  • RTFM Read the fabulous manual
  • Email Verified

Progress

15/44
How to earn trophies