R0J0hound's Recent Forum Activity

  • If each hexagon is a different object instance you can do this:

    http://www.scirra.com/forum/custom-grid-shape_topic54226_post340446.html#340446

    If you want to do it with math instead here is a formula for it:

    http://dl.dropbox.com/u/5426011/examples14/hex_grid.capx

  • You can create multiple instances of the array and dictionary objects. If you save the uid of a dictionary instance to a sprite instance variable you can use that to associate the objects together and pick them with events.

  • You mean like an inventory?

    You could use a "Dictionary" object to store what objects you have.

    For example say you have a game where you collect bananas among other things and like you said you don't want to add an instance variable per object type. When you collect a banana add it with an action like this:

    Dictionary: Add key "bananas" with value self.Get("bananas")+1

  • It's referred to as "depth sorting" or "z ordering".

    A common way to do it would be to put all the object you want to sort into a family and use this event to sort:

    System: for each family1 ordered by family1.y

    --- family1: send to top

    It works best if the object hotspots are on the bottom. You can also do it without families by using one object and having different animation frames represent the different objects.

  • You can format the whole text object but not just lines of it. To have different formatting per line create a different text instance per line.

  • You can do it with the physics behavior. Turn off gravity with the action "set world gravity to 0" and use "apply force toward position". The position is the black hole and the force would be something like k*1/distance(object.x, object.y, blackhole.x, blackhole.y). "k" is basically how strong the black hole is. Change "k" it to whatever value you like, a higher value should give good results.

    The objects will just move toward the center of the black hole unless you give the objects some velocity 90 degrees from the direction to the blackhole.

    Here is a further discription with some useful diagrams:

    http://www.physicsclassroom.com/class/circles/u6l4b.cfm

    And here is where I got the gravity formula:

    http://en.wikipedia.org/wiki/Newton%27s_law_of_universal_gravitation

  • Is it a bug? The behavior was by design in CC:

    http://www.scirra.com/forum/picking-problem_topic41776_post257714.html?KW=picking#257714

    So is it a bug now or was it in r99, I happy either way as long as it is consistent.

  • Try Construct 3

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

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

    There are no limits that I know of. I tried to reproduce the problem and I had no problem playing 4+ sounds.

  • I think the jump height does vary with the framerate.

    Jumping is just projectile motion and you can calculate mathematically the jump height with this formula:

    jump_height = (jumpStrength^2)/(2 * gravity)

    In the case of the example the calculated jump height should be 50 pixels.

    When I ran the capx I measured the jump height and it was 56 pixels. On my machine it was running a about 30fps.

    The platform behavior currently changes the y position like this:

    y = y + v_velocity * dt

    If it's changed to this:

    y = y + v_velocity * dt + 0.5 * gravity * dt * dt

    Then the measured jump height will match the calculated jump height regardless the framerate.

    Ashley my proposed fix is to change this:

    ..\Construct 2\exporters\html5\behaviors\platform\runtime.js lines 582-583

    this.inst.x += this.dy * dt * this.downx;
    this.inst.y += this.dy * dt * this.downy;

    to this:

    this.inst.x += (this.dy * dt + 0.5 * this.g * dt * dt) * this.downx;
    this.inst.y += (this.dy * dt + 0.5 * this.g * dt * dt) * this.downy;
  • Create a text object and add an event "start of layout: set text to renderer" and see if it says webgl. If it says canvas2d can you run any other webgl shader demos from around the internet from firefox?

  • My post was about just modifying the group "grp_TilingPieces". Your event elsewhere that moves the sprites with delta time is correct.

  • Well I'd go with chrome for your testing for now.

    The computer I'm on right now has a very old graphics card so webgl shaders don't work at all. It only support opengl 1.4 and I think you need support for at least opengl 2.0 to get shaders working in the editor.

    It is probably falling back to canvas2d in firefox. You could try setting "webgl.prefer-native-gl" to true and see if that works. I imagine it will if the effects are working in the editor.