Bertie Booster's Recent Forum Activity

  • On my 5 year old PC   <img src="smileys/smiley19.gif" border="0" align="middle" />

    FPS-60

    Object Count 82

    Mem used 26.94

    Spec Q6600 Core2Quad , 3GB Ram,2 X Radeon HD4870 in Crossfire, 3 year old Win 7 X86 install.

  • Your event Pin is pinned is checking to see if the logo is pinned. If it is pinned then it pins it...... If it isn't pinned then it doesn't pin it.

    Can you see what you've done?

    Setup another event such as System -> on start of layout instead of the Pin is Pinned and it should work fine.

    An alternative is to simply "invert" the Pin is pinned event (right click it/select invert) then if the logo isn't pinned it will pin it.

  • You might find this article useful:

    scirra.com/tutorials/67/delta-time-and-framerate-independence

  • Why don't you simply populate your array with the desired values and then use n=floor(random(100))to select a random value from the array at n,1?

  • <img src="http://s16.postimg.org/lowgyjtk5/textbox.jpg" border="0" />

    (I've only put the webstorage thing in as a placeholder, don't try and replicate that part).

    With the System/Create Object action you can create anything that's in your game at runtime then once you've created it you can assign it whatever properties you choose.

    In the above example I created a textbox you could just as easily create text or better still spritefont text it's all the same process System/Create Object.

  • <img src="http://s22.postimg.org/4zq0mxjdd/css.jpg" border="0" />

  • Try Construct 3

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

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

    Thanks for all of those! Curious about a couple:

    > A 32px square with collisions set to bounding box causes much more stress on the fps rate than the same square with the collision boundary set to (1,1),(31,1),(1,31)(31,31).

    ???

    > Try rotating a square 45 degrees if it doesn't affect the objects interaction it can reduce collisions.

    Why would this be? Maybe because there are generally more vert/horz surfaces than diagonal, and rotating the square means you touch most objects with just the tip of your col poly?

    Collisions really do eat up a lot of cpu. Col cells really help, but if you have a lot of moving objects in a small space, it can still get very laggy, very quick. However, with some thought, there are usually optimizations that can be done (many involving checking cols less often).

    Ah this wont always be the case, but in certain types of games such as grid based games, bringing the coll polys in from the edge has the effect of stopping them from colliding with adjacent cells.

    Again rotating 45 deg wont always work but it can reduce the contact points/area of contact on a face which can help reduce collision count.

    I'm advocating being creative and spending time playing with the coll polys to see if you can optimise, the results can be dramatic.

  • That is a very very nice solution RojoHound, I'm a lover of nailing grid positions with arrays this works very well indeed.

  • I assume that when you created the CD you immediately pinned it to the sword?

  • I've done this though not in C2 but here's how I accomplished it loosely based on the original game logic.

    First decide which objects you want the boulders to fall from. I selected boulders and gems. in classic BD they call these objects round.

    assign a boolean var to each rock instance eg isRound and set to false by default.

    Now you'll need to acquaint yourself with the "overlapping at offset" event.

    Say you have a 3x3 grid and your rock is on the middle square.

    123

    4R6

    789

    On start of level for each rock:

    Check if it's overlapping a round object at offset x=0, Y=(1 X tilesize)corresponding to square 8.

    If it is then set the isRound var to true. The rock can now roll

    Make a timed loop

    System every 0.2 seconds

    System for each rock

    add a second condition so it only checks rocks that you permit may fall.

    if isRound is true

    then:

    Check if it's overlapping an object on the square to your left.

    if it is then check if it's overlapping an object on the square to your right.

    If it isn't overlapping anything on the left ie the square is empty then check if it's overlapping anything in the square left one, down one if it isn't then fire the "Roll" function) if it is overlapping at either of those two points try the same thing on the right ie is X overlapping at X + tilesize, Y=Y then X + tilesize, Y + tilesize.

    Back to the square of nine Rock is on 5 you check 4 then 7 if both empty roll rock left if either occupied check 6 then 9 if both empty roll right if either occupied then no roll possible but now is a good time to update the Rock vars as something may have changed since the last time So add an Else:

    Check if it's overlapping a round object at offset x=0, Y=(1 X tilesize)corresponding to square 8. (As at beginning)

    Game has moved all moveable instances and updated all instances to see if they are potentially movable.

    Roll function can be simple movement 1 x tilesize left or right and let gravity do the rest bullet works best.

    Use platform behaviour to detect if a rock is falling or has landed and toggle the isRound var otherwise you'll have rocks dropping off objects you don't want, round only!

    As in BD the same movements can be applied to the diamonds to achieve the correct drop effect for those too.

  • (I am the only one in a company lol)

    Not another CEO on this site??

    <img src="smileys/smiley36.gif" border="0" align="middle" />

    Welcome aboard, where exactly do you think you might need to register a company name?

  • It is quite complex, you aren't far off completing it though. Do you get to choose your assignments or are they set because if you can choose then for a later one I'll happily show you an alternative much more streamlined way of achieving this result.

Bertie Booster's avatar

Bertie Booster

Member since 21 Oct, 2013

None one is following Bertie Booster yet!

Trophy Case

  • 11-Year Club
  • Email Verified

Progress

12/44
How to earn trophies