Prowl's Recent Forum Activity

  • I want to test my game on android to ensure it works the way it does on a browser, and with touch functions, before I continue to my next phase of development.

    Tried doing some research online but found nothing helpful. Everything kept pointing to cocoonjs, but I'm guessing that requires some sort of purchase? Because it isn't listed as an export option. I'm not in a position now where I can pay for anything... and I'm just looking to personally test it at the point.

  • Hey Ram, had to spend a few days fixing my physics, setting up menu's, pause menu, etc, and now that I got all of that fixed I am back to exploring your timer idea.

    So I read up on, and understand the basics of how to create a timer, just dont know how about how to assign it's use in this instance. Every example Ive seen of making a timer you have a GV made for it, but how would I make it so that when one of those spawn points spawns an object, they don't all just add to, and use that same timer. I guess what I need is for each time a spawn is used, it creates it's own cooldown timer.

    I'll search some tutorials and video's and see if I find anything that works similar to this.

  • Yeah I figured it out, was a rough time. I just used what I was doing to set the angle of my objects with the bullet behavior, then I would apply impulse at my object.angle. Worked perfectly.

  • Very good stain, that did the trick, now I just gotta play with it to find out the best way to randomize it, and make 2 objects spawn without spawning on top of each other and going flying into random directions

  • Tried messing with that some, but I guess I'm not trying the right event action combo. Currently I'm trying to apply an impulse at an angle, and I guess im not sure what I would use within the angle field that would give me the actual angle the first object is moving at. Velocity x and Velocity y I guess just tells you the rate at which an object is moving at the y axis then the x axis... but I dont know how I would formulate that into an angle.

  • That's just creating it though isn't it? It's not creating the movement or setting the angle

  • Before I was using a bullet behavior where I could set angle towards position x,y then rotate clockwise random(-a,a) and get myself an easy angle variance.

    Now, I am using physics, because the collision of my objects as you could imagine was not having expected results.

    Currently, the best i have found, was I am doing

    Apply Impulse towards position, using a random(x,y), random (a,b)

    X,Y is +40%,-40% of the center point of my map's x coordinate, and a,b is 40% of the maps y coordinate. So I created myself a variance.

    Now, the result is, I do have a variance, but it seems to favor the center a lot, I have a decent idea as to why, because I've essentially created a box around my center point as the variance, and the most points actually cross the middle of that area.

    So, what would be a better way to actually create a variance for myself like I was doing with the bullet behavior?

  • Ok, so my original spawning object is coded like this.

    ObjectA Apply Physics Impulse 5 towards random(x,y), random (a,b)

    It's the best way I know how to select a point on the map as the area I wanted the object to go, but have a variance so it doesn't always go to that object.

    Now, when ObjectA dies, it spawns 2 ObjectB's. I want ObjectB to move at the same angle ObjectA was moving, and then add in a variance on it.

    I did this exact thing with Bullet behavior, but of course I had physics problems, so now I am trying to do it with Physics behavior, and well, it's kicking my Butt trying to figure it out. None of the objecta.physics. commands looks like they will tell me the angle of motion. I cant use ObjectA.angle from what I have seen.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Coll, I ditched the bullet behavior, it did fix my problem, although now I have had to go through and reprogram all of my movements since the set angle and rotate commands are no longer good. So now, I have all my initially spawning objects that you see working somewhat right (I do have them randomized as to where they fly, but it seems like they favor going to the direct center a lot, here is my code for that if you have any suggestions that would work better

    Apply physics impulse 5 towards (random(288,672), random(162,378)

    My center point is 480,270, I think I did like a 40% variance there, but it seems that the variance realistically is much less than that, and favors the center, wondering if there are any suggestions on that.

    My 2nd issue. This is an asteroids based (not replica) space shooter. So asteroid a dies, it spawns 2 asteroid b's. Before with my bullet code, I could set an angle for B based on A, but now, when I try to do similar with impulses, my object B will not move. Here is what I was attempting to use for that

    Apply Impulse 5 at angle objectA.angle+random(-20,20)

    The object does not move, which I don't get since it's applying an impulse, I would think it would atleast move somewhere. Any idea where I am going wrong there?

  • Borgi, was hoping you could provide more help. Before I was using the bullet behavior, and setting the angle for that wasnt too hard. Now I am using Physics behaviors, and moving objects with impulses. Now, should I be using the apply impulse at angle action, and if so, how exactly do I get that to do what I was trying to do originally.

    Currently I have.. Physics impulse 5 at angle objecta.angle +random(-20,20) but my object isnt even moving with that, and not sure why because it seems like it should work.

  • Did a count, my largest asteroid that spawns, game is supposed to spawn 5, only counted 2, I think some of it is from a spawning problem, and other part of it is a separate issue I'm having with mass, these smaller asteroids that have 1/4 the mass, and 1/5 the size, are colliding with, and making the larger asteroids bounce the other way, so I think some are getting turned around before they even enter the actual gameplay field.

    Going to have to figure out how to solve that issue.

  • Ram I stuck with the original way of coding you gave me, and got it to work, everything works perfect now!

    1 last tweak id like to do if possible. Is there a way, once an object comes out of one of those spawn points, to turn off that specific spawn point for a specific period of time?

    Reason why, I think I am having multiple objects fire out of the same spawn at close to the same time, and their collisions are making those objects reflect off and never come on screen, and it's throwing off the obtainable game score. So, object spawns, spawn point waits for 2 seconds before it can be selected as a random spawn point again... or any other clever way to alleviate that problem

Prowl's avatar

Prowl

Member since 15 Jun, 2015

None one is following Prowl yet!

Trophy Case

  • 9-Year Club
  • Email Verified

Progress

10/44
How to earn trophies