podpathos's Forum Posts

  • try this

  • Thanks R0J0hound for pointing out difference.

    But difference beatween what is overlaping at offset in CC and C2 is exactly that what leads to some problems in case you would like to make built-in platform behavior work "perfect" with smal sprites: to prevent sinking, penetrating sprites in obstacles for 1-3px.

    Why is that so:

    As I understand it, collision happens when sprite is on obstacle and it functions like triger. On the other hand 'overlaping at offset' in C2 funcions exactly the same as collision(=overlaping 1px), but not as triger, more like while: 'overlaping at offset 1' is basically equal to while it's coliding - if sprite rectancle is the same size of the collsion box.

    If solution to this is that you make collision rectangle smaller one px from sprite size, and then if sprite with platform behavior due to not working accuratly with small sprites sinks in ground, and you then set its position so that is visibly on obstacele (set SpriteY to Obstacle.Y-obstacle.Height/2-sprite.Height/2) it is not colliding whit it so you can't jump.

    If you make it collide so it can jump you can't use overlapinng left or right(overlaping at offset 1,0 or -1,0) becouse it is overlaping like colliding, standing on the line of obstacle...

    Yet again I think that what counts for overlaping in CC is better, because in C2 it's overlaping at offset of 1 is basicly same as collision detection.

  • Thanks for your help, but I made this example in order to understand

    overlaping at offset. I moved some sprites one pixel to show that it works only if sprite is not on obstacle but moved one pixel from it. In Construct Classic this works as I think it should, but in C2 something is wrong. I know that you can make it work but that is not the point, because: "For example, testing for an overlap at an offset of (100, 0) will temporarily move the object to the right 100 pixels, test for the overlap, then move it back again." (Manual)

    I would like to know how overlaping at offset works.

    Thanks again.

  • I have following situation:

    <img src="http://dl.dropbox.com/u/37009800/Construct%202/Need%20Help/overoff.png" border="0">

    Sprite on right side shouldn't overlap left or right because he's not inside obstacele, he's on it. Am I doing something wrong here?

    capx

  • It's not pixel rounding issue, it's the way C2 platform behavior works. Many people have noticed this before.

    Read this, this, and this.

    Your only solution is custom platform engine with loops, becouse C2 is against the old school <img src="smileys/smiley2.gif" border="0" align="middle">, but thats not so hard to pulloff and most of all with custom platform engine you can have variable jumps <img src="smileys/smiley36.gif" border="0" align="middle">

    in this you never hit ceiling (pixel rounding On)

  • Thanks man, I see it all much clearer now.

  • I have the following situation with event order

    <img src="http://dl.dropbox.com/u/37009800/Construct%202/Need%20Help/EL.png" border="0" />

    I would like to understand the difrence in event order and logic of execution in C2 (i know is from up to botom), but in this case (not working sheet) when you klick and 'active'=0 and 'c'=0 then it change them to 1 and in same event, I guess, check if 'active' is 1 and 'c' is 1 so it sets 'active' to 0 but not 'c' so it can't reset conditions ('active'=1, and 'c'=0 can't triger enything). Em i right? Or is it something else in question?

    I think that C2 need some nice basic tuts about event logic, I can't always grasp what's accualy happening.

  • here is a quick and drty example, with some suggestions for animations of tree and background via moving tilebackground.

    for each tree you need

    variable start.x at the center of screen

    variable start.y at some negative value

    start.angle (random of 360)

    and then you position each tree on elispe:

    tree.x is start.x+cos(start.angle)*width.of.tree

    tree.y is start.y+sin(start.angle)*(width.of.tree/2 or width.of.tree/3, or something else but les than width.of.tree)

    set tree.angle to angle(start.x, start.y,tree.x,tree.y)

    when you press left/right you add/substract value of start.angle for each tree - so each tree rotates

    of course you add some vaule each tick to start.y to move trees down at some speed

    here you go

    look at my idea for moving background I think it would suit you game (by the way i like your game concept)

  • i believe your problem comes from fact that C2's platforms behavior is not designed for small sprites

    read this and this.

    custom platform behavior with loops may be way to go, or somekind of custom collision detection...

  • for splitscreen concept with canvas plugin check this post

    i guess two layouts on one screen is not possible. but you can create "two" levels on one layout so that one player can't enter region ("level") of another, and with canvas plugin you can simulate second camera - to separate "levels" and player visualy.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • this is what I noticed (8x8px sprites):

    <img src="http://dl.dropbox.com/u/37009800/Construct%202/Help%20Others/Collsion%20small%20object%20problem/PLATFORM.jpg" border="0" />

    if you wanna use such small sprites I guess you must make your custom movement/collision detection - check for overlapping in advance and calculate position in which object must be to prevent penetration when actual overlaping happens...

  • Glad to have been of help. You gave me something to amuse myself. Keep on with your game.

  • I'm not sure that understand what is a problem, but try to set scale to 0.83 (0.8333..-800/960)

  • I guess that custom movement is best for that, but I did something relatively useful with platform behavior and slopes from 45-90/270-315 degrees.

    play wiht parameters to get better results

    platform behavior custom slopes