chrisbrobs's Forum Posts

  • (monsharen)

    So thats how you do it!i was only getting a ball that constantly bounced around the screen. i will have a look at your capx. cheers.

    (Tom)

    I'm doing doing the old 'crash course in jscript' and it doesn't include descriptions for a lot of the equations, so thanks for your help.

  • Thanks to everybody for your help.

    I managed to find a good tutorial on Object collisions for games and apps and i will checkout the Js websites you have mentioned.

    Heres a link to the files and tutorials if anybody is interested -

    http://dl.dropbox.com/u/22173473/Collisions.rar

    Only (150k) containing - 2 Game physics tutorials (gravity a elasticity)

    The Html/jscript file i that i mention in the post.

  • You can test your Browsers canvas rendering speed here -

    http://labs.skookum.com/demos/canvastest/

    The website includes various tips and guides regarding browser and canvas speed problems.

    http://skookum.com/

  • I downloaded a couple of Javascript tutorials about 'Baasic physics', and i'm stuck on page 1.

    Note. I have done a bit more research and think i understand most of it, but i can't work out what the symbols marked in red mean?

    // Version 3 - Basic collision (viewbox), perfectly elastic (no energy loss)

    var ball = {

    x: 300,

    y: 200,

    r: 15,

    vx: 0,

    vy: 0

    }

    // Update ball (with Physics! =)

    // 1 - apply velocity to position (vx -> x)

    ball.x += ball.vx;

    ball.y += ball.vy;

    // 2 - apply drag/friction to velocity

    ball.vx *= .99;

    ball.vy *= .99;

    // 3 - apply gravity to velocity

    ball.vy += .25;

    // 4 - check for collisions

    if (ball.y + ball.r > canvas.height) {

    ball.y = canvas.height - ball.r;

    ball.vy = -Math.abs(ball.vy);

    }

    // Draw ball

    ctx.save();

    ctx.translate(ball.x, ball.y);

    ctx.fillStyle = "#fff";

    ctx.beginPath();

    ctx.arc(0, 0, ball.r, 0, Math.PI * 2, true);

    ctx.closePath();

    ctx.fill();

    ctx.restore();

    }, 1000 / 77);

    please could somebody have a look at the above and post a quick line breakdown.

    thanks in advance.

  • What graphics editor are you using?

  • The cap crashed because it could not locate the sounds?

    Looking at the events on layout 3, you have opted to include 'event sheet main' which contains-

    (main event sheet)

    + Sprite: is jumping

    -> Sprite2: Set animation to "jump"

    I think this is were the animation gets messed up ( i couldn't run it to check )

    Maybe you could add another condition to the above, that only triggers the jump animation if the player is not carrying the gun?

    + Sprite: is jumping

    Sprite2 value 'gun' = 0 )or whatever variable your using)

    -> Sprite2: Set animation to "jump"

    Hope this helps.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You could check out the Examples and tutorials list -

    http://www.scirra.com/forum/viewtopic.php?f=8&t=8169

  • > sorry you could not open the cap. did i link the wrong file? is anyone else having a problem opening the cap?

    >

    It says Background.png is missing. Sorry for not clarifying that.

    ---------------------------------------------------------------------------------------------

    I have the same error message when trying to open the cap?

  • "i have some enemy actors simulating 'space invader' movement. as they incrementally approach invisible barriers on either side of the screen, they are suppose to drop down in unison, and reverse course"

    Here's a very simple SPACE INVADER clone i made in Construct 99.6 (i think)

    You might be able to adapt the events to work in Construct 2 ?

    http://dl.dropbox.com/u/22173473/space%20invader%20example.rar

  • Post regarding error with monsharen's example removed.

    It runs perfectly ok. Sorry

  • Brilliant. I was wondering how something like that could be done with Construct.

  • Kill all the aliens and zombies.

    You have a limited amount of ammo.

    <img src="http://dl.dropbox.com/u/22173473/zombie.png">

    http://dl.dropbox.com/u/22173473/Zombie3D.rar

  • Round(value)

    Rounds value to its nearest whole number, eg. Round(6.9) gives 7

    ...from Construct Manual, which some good man put together

    Errm...I didn't read that page

    Anyway i managed to solve the problem by adding some markers.

    <img src="http://dl.dropbox.com/u/22173473/solved.png">

    + System: For each Green

    + puzzlecubes: puzzlecubes overlaps markers

    + puzzlecubes: Value 'numb' Equal to markers.Value('marker')

    -> puzzlecubes: Set animation frame to 10

    -> puzzlecubes: Set X to markers.X

    Thanks to everybody who posted.

  • "PixelRebirth

    + System: puzzlecubes.Value('x') Equal to round(puzzlecubes.X)

    + System: puzzlecubes.Value('y') Equal to round(puzzlecubes.y)"

    "Noga

    ...and, I think it is difficult for a player to pixel precise position those blocks, you could add a range. If a block is between i.e. 550-554, it'd snap to the right position"

    What do these expressions actually do?

  • My attempt to make a simple presentational/promotional thing with a Paralax scrolling.

    I saw a flash tutorial on the internet that had about a trillion lines of code.

    Only took a couple of events using Construct 2.

    http://dl.dropbox.com/u/22173473/c2paralax/index.html

    Left / right arrows to navigate.