chrisbrobs's Recent Forum Activity

  • Thanks for this infomation about using sprite object to replace box object to make a boundary.

    Another question, where to use box object?

    In your cap, when black sprite idle(no keyboard pressed), it

    had not been push when ball sprite hit it. It looks like a wall to block the ball. How to do that?

    In my cap, the black sprite will be push back until ouside the window. I see the position x of black sprite is less then 0 in debug mode.

    If black sprite will not move whe ball hit it, it will not been push ouside the window. That is a good solution.

    1, You could still use the box objects for the walls and floor, but you need to fill it with a colour (untick its 'use' transparent attribute for the fill colour)

    2, To stop the black sprite moving when the ball collides : Give the black sprite a 'solid' attribute (tick the box that makes it solid)

  • Has this problem been solved?

    I find a similar problem between a plateform behavior sprite with a rectangle shape and a ball behavior sprite with a circle shape.

    The circle (ball behavior) sprite will kick another outside the screen.

    here is my test case:

    http://dl.dropbox.com/u/5779181/collision_problem.zip

    Wait a moment, you will see the black sprite gone.

    (environment: construct 0.99.97 in winXP)

    I had a quick look at your cap, and noticed that your 'walls' are made out of box objects with a 'transparent' fill ? Thats why the player and wall collision isnt working. The box object's outline is not thick enough(pixels) for it to register a collision.

    Here's the cap file with the walls made out of a normal solid sprite.

    http://dl.dropbox.com/u/22173473/colisionprob2.cap

    The black sprite now has something to stop it leaving the screen.

    Hope this helps.

  • I'm not at home testing this, just looking at the screeshot, but I notice, your many apps have a ui with lots of text and buttons and sliders always. I understand how this can be done with objects and events, but its a tedious process. Are you using a particular plugin or technique that's cutting out some of the tedium, or are you just more patient than me?

    Hi Lucid

    i know what you mean when you say 'tedious' !

    In this project the U.I is basically 'box objects' and a couple of 'sprite buttons', with text objects on top of them. As long as the 'snap to grid' option enabled (on a very low setting ) it is suprisingly easy to create.

    Dont get me wrong though, i have about 40 different 'back-up' versions each using different and various combos of sprite buttons, edit boxes, list object...Etc, and its took me about a week to to get to this stage.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Couple of tutorials about game physics, collisions, elasticity, gravity etc.

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

    Might be usefull ?

  • Simple tool for Particle testing. The next version will allow for 'import and 'Saving' for the various settings.(or a print out)

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

    Old version

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

    Note, the values in red cannot be changed yet.

  • prawnsushi

    "But now i have to ask this question : is it possible to add an animation frame at runtime?"

    You could have a look at the events in this app i made (sprite sheet splitter). I had to find an easy way to import images and add them to a sprites frames at runtime.

    http://dl.dropbox.com/u/22173473/Sprite%20splitter.rar

    contains cap file and images.

    Hope this helps.

  • (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.

chrisbrobs's avatar

chrisbrobs

Member since 10 Aug, 2010

Twitter
chrisbrobs has 1 followers

Trophy Case

  • 14-Year Club
  • Email Verified

Progress

15/44
How to earn trophies