Colludium's Recent Forum Activity

  • Interesting (= weird)... Your version definitely didn't work as you wanted when I tested in Chrome on my desktop (using mouse) and my fix made it work. I've just tested my version using cocoonjs (on i9100 and LG G) and it works on both.

    Hang on - whilst I was typing I was messing around with it. Are you trying to hold down on one of the color squares and then have the bullet head towards a second touch on the black square?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I see what you're trying to do.

    Try this capx. I used a global variable to note the ID of the touch when the colored squares were touched and used that to eliminate any touches that were continued onto the black square. Works a treat (I'm quite happy because it was an experiment for me too)!

  • Is there any layer zoom or parallax going on? Of so, put the layer name in brackets that your black square is on - like Touch.X("game"). Then use the same layer reference for all of your instructions. That's caught me out a few times. The only other thing I could suggest would be to post a capx....

  • AnD4D,

    Ahhh - something subtle like a gravity force won't be so easy to 'fix', at least not for my brain! The only thing I can think of doing would be to forcibly accelerate the object by changing the physics x and y velocity vectors - the same effect as a force but taking dt into account. It might be convoluted and I know that forcing velocities on box 2d can upset it, but here goes:

    every tick:

    object - set physics velocity

         x component = object.physics.velocityx + dt*force*cos(force_angle)

         y component = object.physics.velocityy + dt*force*sin(force_angle)

    where force_angle is the vector direction you want the force to act in. It might be worth a try...

  • Try this:

    -> Touch, On Touched BlackSquare

         - set green dot vector towards Touch.X, Touch.Y

    This ensures that the first touch is registered as long as it's on the black square.

    If you want the green dot to follow the touch point then something like this should work:

    -> Touch, is Touching BlackSquare

         - set green dot vector towards Touch.X, Touch.Y

  • I have tried to keep away from applying forces in physics because I suspect that you're right and that framerate does make a difference to an object's behavior. Instead I always apply impulses because, by implication (force x time), there has to be a consideration of dt so any framerate problem should be more readily smoothed over by the physics engine. I'm not certain how box 2d implements this but that could be the solution you're after.

    Edit: Just to add that the more I think about this the more convinced I am that you should always strive to use impulses when looking to cause an effect on an object, if you can get away with it. The effects of an impulse will be different to a force but the results might be more reproducible - a constant force applied over 1 second might have framerate application errors whereas an impulse of equivalent magnitude should always have the same effect. The difference, of course, is the impulse is instantaneous whereas the force can cause a progressive change of behavior, so they are not always interchangeable. Just my 2 pence... I'm sure Ashley could clarify for certain.

  • OK, there are a couple of extra things you need to do and then you're done:

    1. C2 works with 0 degrees angle facing to the right, so angle all of your thruster flame images 90 deg to the right in the sprite editor.

    2. Change your space ship so that all images face to the right as well. (although these first 2 steps aren't strictly required for a simple project, this will help you when your projects become more complicated).

    3. Add a new image point to EVERY frame of the spaceship where you want the thruster to be pinned.

    3. Add 2 events in your spawn spaceship event:

         Set spaceship.angle to 90 degrees (so it faces down)

         Spaceship:spawn thruster at imagepoint 1

    That should do it. Let me know if you get stuck.

    If you set them both into a container then you won't need the spawn thruster command, but you will still need to position the thruster to imagepoint 1 before pinning it.

    Edit - the imagepoint 1 on every frame is just where the thruster will be set to. If the space ship animation frame doesn't have the imagepoint 1 when the thruster's position is set then it will move to the default instead. The pin location will then be set irrespective of where the next imagepoint 1 position is set (ie it doesn't pin to the imagepoint number, only the x,y position).

  • How do you identify which thruster you want to pin, or is there only 1 for C2 to choose from? As long as you have both identified in the same block of event code then it should work. Just a thought as well, if you're using just one thruster then you will need to reposition it after each enemy spawn.... Its hard to help without a capx to view....

  • Families seems like your best option.

    Edit - quickdraw fail!

  • - thanks for the response.

    But how do I select the app inside AdMob if it doesn't yet exist in iTunes.. do I use the "add your app manually" button inside Monetize New App? Sorry for the basic questions but I've learned it's better to be cautious than try and undo a huge mistake later.

    Ed

  • OK, so this is another opportunity for me to prove how little I understand...

    I've just managed to get my head around setting up AdMob and MoPub to show ads via CocoonJS (this was a frustrating and unintuitive process even with the awesome help of Syzmek's tutorial - I think I aged a couple of years setting it up). That was easy, though, because my free app was already on Android so I could easily reference it in AdMob. Now I want to release an ad supported version of my app on ios (I only have a paid version there at present)...

    How should I go about this - am I missing something here? As I understand it, this is what I need to do:

    1. Submit app to iTunes and wait 1 week or so for approval.

    2. Select app in AdMob and set up monetization.

    3. Set up MoPub referencing the AdMob details.

    4. Add MoPub info into CocoonJS cloud compiler.

    5. Compile the app and submit it to iTunes - wait 1 week or so for approval.

    6. Oh, hang on, how can step 5 be step 1?

    To those that have done this already, do you first submit a free app to iTunes and then add the ads for a version 1.1 or is there some way of submitting the app for limited distribution that will still allow it to be registered by AdMob?

    Thank you for not judging me...

  • Check the collision polygon for the button. Sometimes that can bite, especially if your button has some transparency. The touch object detects within the collision polygon...

Colludium's avatar

Colludium

Member since 26 Aug, 2013

Twitter
Colludium has 11 followers

Connect with Colludium

Trophy Case

  • 11-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • x3
    Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • RTFM Read the fabulous manual
  • Email Verified

Progress

18/44
How to earn trophies