porky's Forum Posts

  • Thanks for the hint! I eventually find the way:) It's basically same as Vee41 said, but since I have a lot of instances, so instead of global variable. I use instance variable and it finally worked!

    Here is the working example:

    <img src="https://dl.dropbox.com/u/1396615/bugImage/dynamicSpawn.jpg" border="0" />

    Thanks again:)

  • Thanks for helping:)

    Magistross: My goal is trigger this event ONCE(1 loop for each) at anytime when the condition matches.

    Tommyttk: I find in your example the "Trigger Once" is in front of "For Each", which is the magic make it works! but It is only trigger once in the whole game/layout. What if I want re-trigger this when the condition matches?

  • Magistross, I tried the way you said, not working:(

  • I get a headache on this. They seems don't like each other and it keeping spawning of objects.

    <img src="https://dl.dropbox.com/u/1396615/bugImage/ForEachTriggerOnce.jpg" border="0" />

  • Thanks guys for the explain and help! I have tried disable all collision for object movement, such as pushout solid thing, it doesn't help. I also use the same event sheet in another empty map, it runs double the fps. so I guess it might still because of too many objects cant handled by 3GS's weak CPU.

    But here is an idea: On the start of layout, can we remember all the instances location,rotation and other properties, save it into database, then destroy them when off-screen, and create them when on-screen? The InstancesBank seems can make it but I don't know how to spawn instances according to on/off-screen:/

  • Thanks guys it works perfect! complicated and out of my brain though xD

  • Thanks for lots of helping!

    BluePhaze: my capx is kinda of complex now and I used several custom plugin/behaviors in it so you might not able to open it:/ But I take some screenshot to explain it:

    This is the layout. As you can see I have many sprites obj block out the level in stead of tiledbackground, because sprites have image point so I can use them to generate visual objects, and sprite can be scaled up so it will make some blur effect I need.

    <img src="https://dl.dropbox.com/u/1396615/bugImage/TooManyInstancesImage1.jpg" border="0" />

    <img src="https://dl.dropbox.com/u/1396615/bugImage/TooManyInstancesImage2.jpg" border="0" />

    Ashley : I have iphone 3gs on iOS 6, ipad on iOS5(6 is not supported )

    Arima : I tried your suggestion and set most objects to invisible, the framerate doesn't change too much, but a little more stable. Is there anyway to test on-screen overdraw? because I do have several overlay from foreground to background.(I even have a full-screen overlay for gradient effect)

    And thanks for the suggested plugin, I will try it out:)

  • cincipon, Do you mean x=center.x*cos(a)-center.y*sin(a) ?

    Is there any constant or variable for orbiting speed?

  • Hi, I wonder if anyone know how to make a ellipse movement and tilted?

    <img src="https://dl.dropbox.com/u/1396615/bugImage/ellipse.png" border="0" />

    I know how to make a circle and standard ellipse. example:

    Object.x = center.X+cos(time*300)*200

    Object.y = center.Y+sin(time*300)*300

  • This might be an old question. so I want you guys give me a suggestion:)

    So the situation is:

    -My layout is farely big.

    -There isn't too much on-screen objects but it can be about 400-500 instances in the whole layout.

    -I tried use tiled-background as much as possible but for the graphic quality I can't reduce sprites anymore.

    -I also have many invisible tiledbackground objects for cheaper collision.

    -the averange FPS on ipad 1st gen is 20fps, iphone 3gs is 15 fps (with cocoonjs). it has no problem on PC.

    so should I trying to cut my map into several layouts? or is there any way can help?

  • Yes, I made one by MoveTo and PushoutSolid behaviors

    https://dl.dropbox.com/u/1396615/bugImage/PushOutSolidIssue.capx

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks rex! the push out almost solve the problem! Actually I was using the 8-direction for colliding with solid object, but there seems a bug when slide alone solid: if the moving object and solid are both square, slide to right/up direction can be much faster than to left/down. Do you have any clue about this?

  • Hi Asheley, I have tried many ways but I can't find a good way to use single behavior to reach the result. Is it possible for you to add similar feature for bullet movement? or maybe add 360 move direction for 8-direction movement behavior? so appreciated.

  • I'm not completely sure what you're on about, but you should look into using Pathfinder in conjunction with Moveto.

    I mean when moveto object hit the solid object in a angle, can it slide along the solid object? I have the similar example capx attached:

    dl.dropbox.com/u/1396615/bugImage/8DirectionCollisionIssue.capx

    I don't want to use Pathfinder in this case since the gameplay/control experience is not I wanted.

  • Link to .capx file (required!):

    dl.dropbox.com/u/1396615/bugImage/8DirectionCollisionIssue.capx

    Steps to reproduce:

    1. Run capx;

    2. Click and hold mouse to move red square object to cursor;

    3. When object hit wall, try move cursor to make it slide left and right;

    Observed result:

    Object slide speed to right is much faster than slide to left. slide up is much faster than slide down.

    Expected result:

    Object should slide with same speed in all direction.

    Browsers affected:

    Chrome: yes

    Firefox: yes

    Internet Explorer: yes

    Operating system & service pack:

    Windows 7

    Construct 2 version:

    r120.2