AnD4D's Forum Posts

  • Ok, $50 if someone can help!

  • tgfcoder

    I imagine, if they're using the platform behaviour, they'll use the set gravity angle modifier, rather than physics.

    To make the character spin, you'll need to have some invisible triggers I imagine.

  • Hi guys!

    I've been working on a project for the last couple of weeks, and recently created an AI system for 4 cpu players, however, I later decided to expand it slightly, and so I am going through the code and fixing things here and there so I can use as many ai players as I want.

    However, I've hit a snag. For some reason my ai stop fighting (both each other and human players) seemingly randomly upon a spawn.

    Not sure why, and that's why I'm here.

    I have tried recreating it as a smaller file, but there's something in my code that is causing a conflict. I was wondering if some kind person out there might be interested in giving my code a quick debug. It still has a couple of glitches, but that's because I haven't finished updating it all to the new system. I just want to know why they stop fighting.

    In any case, if you think you're good enough with C" to help me out, please let me know and I will PM you the code. The file is quite small (under 2mb) but it does have over 300 events. Many are not important, and I think I'm close to figuring out the problem.

    Anyway, hope someone out there can help!

  • r160.2

    https://copy.com/LiqBG6usE9o1j0cX

    I've disabled a massive amount of your code, simply because it was quicker to start from scratch. It can now create an unlimited number, and they will find their way.

    Your code is rather messy I'm afraid. I'm not a tidy coder, but even I found myself getting lost in it all.

    Hope I've helped!

  • We would need the link to Newsgrounds or even the capx to help you.

  • Nice. One thing though, I had to stop because that subtle shake every time I fired a bullet felt like it was about to give me eye-strain and a headache :)

    Do the bullets get destroyed if off-screen? I noticed that on occasion I was killing the enemies before they'd even appeared.

  • Colludium

    Yeah, I'm using CocoonJS's physics. I'm not sure how much of a difference it will make. asm.js doesn't allow (as far as I can tell) the disable physics collision command... which, sadly, my game relies quite heavily on.

    Since finishing this game, I've finished 2 others, published one, and working on 2 more. It's just a shame because this is the game I'm most proud of. I keep waiting thinking that things will sort themselves out.

    Do you think if I used 'every 0.01 seconds' instead of tick it would work better? I'm worried it wouldn't make a difference, but may interfere with my game somehow.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Colludium

    Sorry for the delay! Thank you for your message. I've given it a go, but sadly it doesn't appear to do anything at all to the motion.

    I had: Robert.Physics.VelocityX+dt*(Robert.Physics.Mass*Gravity)*cos(GravityAngle)

    I've also tried to just add DT to my current force, but on my mobile device gravity is suddenly really powerful, so things are barely able to lift from the floor.

    It's frustrating, seeing as my game has been finished since November (really finished since September, but made a few tweaks). A few versions of C2 back I was getting 55fps, so it wasn't a big deal, then it suddenly went down to 15, and has slowly worked its way back up to 30.

    If I could just get DT working correctly for my physics, I wouldn't mind so much.

    Anyone have any ideas on how to sort this out??

  • Colludium

    Sadly I'm using force to allow me to alter the direction of gravity on an object. This means a slower, more progressive look and feel is required.

    Thank you for your message though. I will look into how I could perhaps use impulse.

  • Definitely! It looks brilliant.

  • Question about physics forces.

    If I have 'Every Tick apply force 10' to an object... does this mean that if I was getting 60 frames per second and said object moves (let's say) 600 pixels in a second....

    If I was only getting 30 frames a second, would the object have less force applied to it, and therefore move half the speed, and travel half the distance?

    I only ask because I believe this is happening to my game. On my mobile device, I'm only getting 30fps, and everything else is set up with DT, but I can't do that with physics, as I believe Ashley has already said that physics already has DT applied. I have frame-rate independence on, but I'm still getting slow speeds. If I use gravity, on the other hand, the item drops at normal speed no matter the frame rate. It just appears to be forces that are affected.

    Just wondering if anyone else has experienced this, and come up with a clever way to get around it.

  • Following on from another post I just saw in regards to the recent Candy Jam (Protesting King trademarking individual words, such as the word "Candy"), I entered with this little project.

    Took me a day, so don't expect too much :)

    The King's Saga

    For those with smaller monitors, similar to my laptop, you may want to zoom out slightly so you can see the whole screen.

    ENJOY!

  • Was this made using C2?

  • Brilliant! You've helped me loads lately, so thank you very much indeed.

    I've tweaked it slightly so that it will check the closest every 3 seconds to make it even less intensive, but it will retain the knowledge of who is closest and will look at them constantly (For at least 3 seconds).

    Very clever. It will take me a while to actually get my head around, but it works great so far!

  • It seems what I'm actually looking for is "Pick second closest to".

    Still no idea though...