GameForger's Forum Posts

  • Not sure what you mean, maybe try this: On start of Layout -> destroy Asteroid

    Can you show your code?

  • Thanks but I just need the correct Angle_of_motion when Acceleration is added, the rest works fine. I've send you PM and edited your sample how to use 100% Physic in your game^^

    Maybe you can figure out what is going on with the angle? <img src="smileys/smiley7.gif" border="0" align="middle" />

  • anyone?

  • +++ Update +++

    I made the code more readable and changed my initial approach. I Studied some Geometry:

    Polar and Cartesian Coordinates

    I looked for the right way to Convert the Polar Coordinates (Angle and Force) to Cartesian Coordinates (VelocityX VelocityY). So when the Spaceship is about to exceed Max_Speed I want to get the Angle of current motion + Acceleratio * dt.

    Then use that Angle and set VelocityX VelocityY with new Angle but old Speed.

    Here is the CAPX

    (at update_Spaceship/Apply_Input marked with comments (3x))

    (Use Arrow Keys and Ctrl)

    This is my approach:

    <img src="https://dl.dropbox.com/u/34146606/Source.png" border="0">

    Accel_Angle seems to not change at all once Max_Speed is reached <img src="smileys/smiley5.gif" border="0" align="middle">

    Still not sure if I picked the right formulas. <img src="smileys/smiley24.gif" border="0" align="middle">

  • The red Ship looks cool :D

    But sorry it runs too slow on my machine, its an old 2.4 Ghz (1FPS or so) and the ship is off screen too fast to judge handling.

    You used Construct right? ;)

    I think using Custom Behavior is no option for me. Its just not interactive enough for me. I have to do all the calculations, I would have to write my own Boxed2d Physic for things that collide, no thanks <img src="smileys/smiley6.gif" border="0" align="middle" />

    I prefer letting Physic behavior work it out with proper input and tweaking. The rotation already works really well with so little effort.

    I just want the math to work right (Angle_of_Motion). I'm just not seeing the flaw, if you or anyone could help me with that, I'm all happy ^^

    But thanks for your suggestions.

  • The tossing works already in the game. Making the limit work well really is the problem.

  • Segoi: I don't see how custom behavior should work this out without using the same math problem

    Magistross: I could do that but I find it dissatisfying. When the ship gets a hit, say from an explosion and is tossed around, it shouldn't slow down instantly (very slow ships). I want to mix Arcade action feeling with a physical responsive world, in a way that you are still in control of the ship most of the time <img src="smileys/smiley2.gif" border="0" align="middle" />

    I think I messed up the angle_of_motion, but I don't know how. <img src="smileys/smiley5.gif" border="0" align="middle" />

  • Can anyone take a look at the math?

  • Can you show an example where you are stuck?

    What do you mean with red box and blue box? Different enemies? Do you mean collision with overlap?

  • You can add another Global called Enemy_Sprite and make it random with choose(1,2,3,4...)

    Then you make if conditions

    -------

    | IF Enemy_Sprite = 1 -> Spawn Enemy1 at ...

    -------

    | Else

    | IF Enemy_Sprite = 2 -> Spawn Enemy2 at ...

    -------

    | Else

    | IF Enemy_Sprite = 3 -> Spawn Enemy3 at ...

    -------

    .....

    When does the overlapping occur?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Whiteclaw is right it messes everything up. And its really just the math, the script works fine (when you toggle the maximum capping of )

  • No I want the Physic for bounce off and stuff. It's really just a math problem I can't put my finger on.

  • bump

  • You really should work through the tutorials if you have trouble understand this.

    Made a quick example:

    dl.dropbox.com/u/34146606/SpriteSpawn_Simple.capx

    dl.dropbox.com/u/34146606/SpriteSpawn_Complex.capx

  • The easiest way is a global variable 'path' = random(floor(4))

    If path = 1 create at XY

    If path = 2 create at XY

    ....

    A more complex way is to create several invisible Spawn-sprites in advance.

    Then just System -> pick Random instance (SpawnSprite)

    SpawnSprite -> Spawn Object...

    Hope that helps ;)