R0J0hound's Recent Forum Activity

  • Joannesalfa

    If you mean graphics, then I too find that as a bottleneck on my pc with html5.

    ryanrybot

    Yeah, that's basically what it is and it's ending up much simpler to get going than I originally supposed.

  • Unsatisfied with the graphics performance of web browsers on my machine I wanted to see what kind of performance I would get making my own wrapper. The idea was to run an exported html5 game with the V8 JavaScript engine and then only implement the parts of the browser that the game needs to run.

    Here's an example of the results so far. A python/javascript hybrid that can run an exported C2 game. ...well actually a small subset of C2 games.

    Packaged example:

    https://dl.dropboxusercontent.com/u/542 ... withpy.zip

    Wip wrapper script:

    https://dl.dropboxusercontent.com/u/542 ... nwithpy.py

    You could try dropping in another exported game but it may not work, because a lot is not implemented. Basically it has enough to draw objects and handle mouse events so far. The performance is better than I expected considering I don't think I've done it in the fastest way possible and it's running in python.

    The goal is to get rendering, input and sound working, as well as some AJAX for file access. I probably won't be implementing everything else such as video, networking or form controls. This probably won't ever be a complete browser engine, just enough of it to run games.

  • irina

    I don't know, I haven't touched that capx in a while.

  • Solano

    Here's the capx I used to make the ring image. It uses the Canvas Plugin.

  • irina

    You can rotate particular objects in the same way as the player polygon is isolated. When "loadobj" is called you can provide a "group" tag that you can use in the rotate function later so you can only affect those points when rotating. Zooming can be done by scaling. There is no function for it but it's just a matter of multiplying all ( or just a certain group) of points by a number. You can change the scaling center by doing this: x=scalefactor*(x-centerx)+centerx.

  • Uniqui22

    Here's how yo can loop over the pixels to find how many are not-transparent:

    It's very slow though, so instead you could just calculate the approximate area of the sprite using the area of a circle or box.

  • Try Construct 3

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

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

    You'd need to use the paster_3d_5.capx with the "rotate" function to be able to rotate the points on other axis. Where you'd rotate is right before where "draw3d()" was called then you'd need to undo the rotation right after.

    Basically:

    Call "rotate" 10 "y"

    Call "draw3d"

    Call "rotate" -10 "y"

  • int() and floor() round down to negative infinity. -33 is less than -32.7023072454 so that's down.

    int(-32.7023072454) = -33

    floor(-32.7023072454) = -33

    ceil() rounds up to positive infinity.

    int(-32.7023072454) = -32

    round() rounds to whatever direction is closer.

    round(-32.7023072454) = -33

  • irina

    Both those can be done by transforming the points around. To tilt the view you can rotate on the y axis. In the capx the z axis is toward the screen, so to increase block heights you'd need to specify the Cubs be taller when using the function to create one.

    The polygon sorting won't be satisfactory with the camera tilted though.

  • Nesteris

    I've thought about it but it has the same issue as converting from CC to C2. They're much too different so it would require more coding than I have time for.

  • Confirmed, looks like a bug. Filed a report here:

    My best guess is since "on collision" is only triggered once per overlap that is somehow not being cleared, and when loading the id's of everything changes or something like that.

  • Problem Description

    The save state increases over time when saving and loading. It seems to happen when creating objects that are then destroyed "on collision".

    Attach a Capx

    [attachment=0:2oj2q7yq][/attachment:2oj2q7yq]

    Description of Capx

    The capx creates a sprite every tick that immediatly gets destroyed on collision. Then every second the state is saved then loaded.

    Steps to Reproduce Bug

    Basically exactly like the capx, but...

    • Every tick create a sprite so it overlaps a second object.
    • Using the "on collision" condition check for a collison between the sprite and object and then destroy the sprite.
    • Periodically save then load the game state.

    Observed Result

    After a few saves and loads of the state, the save state gets bigger and bigger. Looking at the JSON string the section after "collmemory" gets longer and longer.

    Expected Result

    That the savestate would remain the same size

    Affected Browsers

    • Chrome: untested
    • FireFox: YES
    • Internet Explorer: untested

    Operating System and Service Pack

    Windows Vista sp2

    Construct 2 Version ID

    r199

    Further discussion on the bug found here:

R0J0hound's avatar

R0J0hound

Member since 15 Jun, 2009

Twitter
R0J0hound has 157 followers

Connect with R0J0hound