R0J0hound's Recent Forum Activity

  • This is a repeat topic of

  • Joannesalfa

    Not really a limit but the result needs to be put in a texture so C2 can render it. With canvas2d it's simple, just directly modify the canvas which can be drawn like any other image. With webgl it's trickier. The image needs to be copied into a texture. What's currently done is a whole new texture is made instead of just replacing the current pixels. If it was changed it would be faster I suppose, and perhaps could help with the memory leak, but I've been avoiding most coding lately.

  • Joannesalfa

    It's interesting but not really usable for this. It's not a matter of using something that can use webgl or canvas2d, it's a matter of getting something to work with c2's renderer.

  • 1) layout size is only limited by what numbers you can store in a 64bit floating point number. Off the top of my head that you could use a number as big as 10^308, but you'll want to use something much lower. Read up on floating point numbers in Wikipedia to see why.

    2) this is done elsewhere on the forums by using the line of sight and pathfinding behaviors. The big layout isn't helping with that though since both those behaviors use a grid and the bigger the layout the larger the grid, so more stuff needs to be processed.

  • xoros

    It independent of C2's collision detection, so it doesn't trigger a collision event. The built-in physics does, but for this plugin it's better to use the collision triggers it has since you can get more info about the collision.

    striimix

    It's not exactly a simple change. Right now a vector is calculated from the object's center to the origin, and that is used to update the sprite's position from the physics position, and vise versa. I just need to update the math to use the COM instead of the center, which is tricky enough to require a re-think of a lot of the code. I need to handle moving the com when resizing and changing animation frames and collision shapes while at the same time keeping the object stationary.

    Calculating the COM isn't an issue as Chipmunk provides functions to do that for all of it's shapes. The tilemap would be a special case which would be an average of the tile's COM. But I probable won't do that since tilemaps can't rotate and are usually static so it would be a needless calculation.

  • newt

    I disagree partially. Sure you can do any algorithm in C2, but it's by no means fast enough for something like this on my PC. Also with me staying with bundled plugins it ended up being more tedious to work with than it could be.

  • Very cool!

    http://rosettacode.org/wiki/Mandelbrot_set

    https://dl.dropboxusercontent.com/u/542 ... lbrot.capx

    I tried a sprite approach to draw the pixels with this one. The trick was to set webgl to off, "clear background" to no and make the layer transparent. One of these days I should actually learn how mandelbrots actually work.

  • [quote:11qmxxg4]Now Construct 2 isn't its own programming language, but instead based off JavaScript.

    I disagree. C2's event system is most certainly it's own language, and isn't really anything like Javascript.

    But this is a fun idea, I went with this one:

    http://rosettacode.org/wiki/Catmull%E2% ... on_surface

    Go big or go home, right?

    https://dl.dropboxusercontent.com/u/542 ... /cube.capx

    It took a while to debug it, but it had to be done today. I wouldn't know what I did in a week. <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

    It only take obj files with four sided faces, and I didn't look into the hole cases.

  • mindfaQ

    Paster creates the url to download the same way as Canvas. It's very odd if one saves as a png and one as a jpeg.

    You can look at the canvas.imageUrl string and see if it says "image/png" or "image/jpg" in the first dozen characters or so. The filename extension could be wrong. For some reason your friend's computer firefox could be defaulting to jpg instead of png.

    If you look in the runtime.js and search for "canvas.toDataURL()", you can force it to use png to see if that helps by adding 'image/png' as a parameter so it would look like "canvas.toDataURL('image/png')".

  • cheesewhiz999

    You can set the "max speed" to be higher.

    ome6a1717

    Also note that the deceleration will slow the object down.

  • mindfaQ

    According to the html5 specifications the file should be a png by default. jpegs can be saved, but this plugin doesn't ask for a jpeg.

    What browser are they using? Firefox and Chrome saves pngs for me.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • If you save to old position of the sprite in some variables, you could then use a loop and lerp to create particles in between the positions.