Prominent's Recent Forum Activity

  • Problem Description

    I'm trying to duplicate the tilemap plugin, but it causes c2 to crash when inserting into project.

    I've renamed the ID of the plugin as well.

    Attach a Capx

    this is the new plugin:

    http://1drv.ms/1EcJ1lo

    Description of Capx

    When you insert into new project, c2 crashes.

    Steps to Reproduce Bug

    When you insert into new project, c2 crashes.

    Observed Result

    When you insert into new project, c2 crashes.

    Expected Result

    To insert without crashing.

    Operating System and Service Pack

    win vista sp2

    Construct 2 Version ID

    212.2

  • I duplicated the tilemap plugin, renamed the id.. but whenever I try to add the new plugin into a project, construct2 crashes.

    Anyone have any ideas why? It doesn't give any error so I'm not sure what is happening.

  • Is there any way to scale tilemaps?

    I want to resize the width/height so that the tiles also scale up or down with it, appearing larger or smaller.

    I know there is a way to scale layers, but there is no way to position the layers so that isn't a workaround.

  • This is an experiment I made with the Q3D plugin.. so you can do something like this http://imgur.com/ncnBOpH

    I also used my Crocotile 3d modeling editor to create the environment.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • For circular collisions, you'll need to find the normal of the surface where the collision occurs and the vector perpendicular to it. Then you have to project the velocities onto those vectors and apply the momentum stuff to the projected vectors I think..

  • Sumyjkl , I think the answer to that is on the page you linked..

    I'll try to rewrite it in more gamer language.

    obj1_finalVelocityX = ((obj1_mass - obj2_mass) / (obj1_mass + obj2_mass)) * obj1_currentVelocityX + ((2 * obj2_mass) / (obj1_mass + obj2_mass)) * obj2_currentVelocityX

    obj2_finalVelocityX = ((obj2_mass - obj1_mass) / (obj1_mass + obj2_mass)) * obj2_currentVelocityX + ((2 * obj1_mass) / (obj1_mass + obj2_mass)) * obj1_currentVelocityX

    That is just for the X velocities, and you can do the same for Y.

    Depending upon how the objects collide(which side) you'd adjust either the X velocities or the Y velocities. So you'd need a way to determine which side is colliding.

    One way is to determine how far the object overlaps each other in the x and y axis, and depending upon which depth is shorter, use that axis.

    The RIGHT side of obj1, should check with the LEFT side of obj2. abs(obj1.boundingboxright-obj2.boundingboxleft).

    The LEFT side of obj1 should check with the Right side of obj2. abs(obj1.boundinboxleft-obj2.boundingboxright).

    Similarly for the Top, and Bottom..

    Then check which value is smallest, to determine which velocities to adjust.

  • Can you describe what your end result would be like? How do you imagine it working?

  • I don't know of any way- but you could search online for nwjs related discussions on the matter.

  • It might take a bit of work, but you could maybe use families to help reduce the amount of events:

    You could set up a function that checks the position of an object in relation to the entire screen width/height.

    Get the distance via a percentage of the width and height..

    So if the object has x position of 25 and y position of 10, and the screen at original scale is 100 x 100..

    25/100 is 0.25

    10/100 is 0.10

    Then you take the stretched scale.. say the screen should be 130x110..

    the object's new position would be 0.25x130 for the x axis, and 0.10x110 for the y axis.

    You'd then have to adjust the object's height and width by doing the same calculations.

    130/100 is 1.3 , so the size increase by 1.3 times.

    the object's new width should be 1.3 times bigger. 16x1.3 is 20.8 for the new width

    Do similarly for the height..

    Do this for every object in the game that needs resizing/repositioned..

  • Browsers don't allow that sort of behavior.

    You'd have to do some kind of workaround where it isn't really the cursor you're controlling, but maybe a sprite that looks like a cursor, and moving that instead.

  • You might be able to overwrite the width/height of the canvas that is used when drawing the game to adjust it to the desired proportions (you'd use javascript to do so).. I'm not sure if it would have any side-effects though.

    edit: I think you'd modify the css width/height.

  • My guess is that it is running the event every tick (every game loop cycle), which amounts to quite a lot. You could try adding a condition of "trigger once while true" to make it only do it once.

Prominent's avatar

Prominent

Member since 28 Apr, 2012

Twitter
Prominent has 9 followers

Trophy Case

  • 12-Year Club
  • Popular Game One of your games has over 1,000 players
  • Famous Game One of your games has over 10,000 players
  • Email Verified

Progress

15/44
How to earn trophies