R0J0hound's Recent Forum Activity

  • It's one of those number precision things with computers. There is a limit to the number of digits of a number can be stored. JavaScript uses 64-bit floating point numbers to store numbers and according to this:

    http://en.wikipedia.org/wiki/Double-pre ... int_format

    It can store 15-17 significant digits, which is on par from what you found.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • isasaurio

    I suppose you could just give the ball an elasticity greater than 1 to make it bounce more.

    bladedpenguin

    Only the main timescale works. Individual timescales aren't used because all the chipmunk objects need to have the same timescale for the simulation.

  • You'll need the time when he reaches full speed. Then you can calculate it with:

    Acceleration = 2*distance/(time^2)

    If he reached full speed after one second the acceleration would be 150pixels/sec^2, but I'd guess the max speed was reached before one second, so it wouldn't be correct.

    You can calculate the speed for any range of frames with:

    Speed = distance/time

    Where time = frames/60

    From your info the speed from 75 to 90 pixels would be 90pixels/sec according to that formula, so he'd already be at max speed.

  • With some programming languages you can, but with python and js you can't, at least not fully.

  • Joannesalfa

    I have, but I'm wrapping the html5 api to sfml. It's not an issue using a graphics library since I'll only be using a small subset of it. The issue currently is I haven't been able to build the V8 library yet.

    That game seems to go fast, but I have no idea if it's faster.

    Nesteris

    Because it's interpreted. So is Javascript for that matter but it's faster because portions of the code is compiled to machine code when it's run.

  • Well according to benchmarks JavaScript is anywhere from 3 to 60 times faster than python.

    http://benchmarksgame.alioth.debian.org ... g2=python3

    Python is still garbage collected and yes it can be used for games, even 3d ones. Usually though for 3d the engine part is made in C and python is used for the scripting parts that don't need to be fast as possible.

  • Lunarovich

    I've had a look into it and the bug occurs when I use:

    for x in instances[/code:2a9uzrdq]
    in my code.
    
    "instances" is an array so x just loops over the indices of the the array (0, 1, 2...).  But when it fails x's value is "random".  Looking in rot.min.js the Array object has these two methods added:
    Array.prototype.random
    Array.prototype.randomize
    
    Adding methods to the Array object will break Array.foreach since it will now loop over the the methods after the indices.  I can fix it in that particular case in my code, but any other plugin or part of C2 itself that uses Array.foreach will break as well.
    
    The solution would be to do something like this to redefine the other prototype methods of the array to compensate.
    [url=http://kenegozi.com/blog/2009/04/13/javascript-and-the-extended-array-prototype/]http://kenegozi.com/blog/2009/04/13/jav ... prototype/[/url]
  • Not much progress as of late. The culprits are technical difficulties mainly, so I have to change my approach.

    Nesteris

    It's a cool idea, but I don't have enough time for such a project. Python would be a cool language for the editor, but no so much for speed in the game itself. I'm using it here because it has allowed be to make the wrapper fairly quickly, but the side effect is it runs slower.

  • —

    What object are you pasting to the canvas?

    When pasting an object to the canvas the object's non-webgl draw function is used. When webgl is on and the browser supports webgl, then plugins do stuff to get ready to draw with webgl, and have no need for the non-webgl draw function to work. For instance pasting a tilemap object with webgl on will have that problem. One solution is to set webgl to off in the project properties, but for most that's not an acceptable solution. You could use the Paster object instead as it doesn't have this issue.

  • A solution that's kind of hacky is to use a paster object as well.

    1. Paste the tilemap to the Paster object

    2. Load the Paster.imageUrl to a sprite

    3. paste that sprite to the canvas.

  • rexrainbow

    I haven't looked into getting it working with the minifier as of yet.

  • TiAm

    Did some tweaks to get that capx working. This can draw a third as many sprites as NW.js can and have the same performance on my pc.

    https://dl.dropboxusercontent.com/u/542 ... 3bench.zip