NetOne's Recent Forum Activity

  • Yea but arrays can be created and destroyed in events during runtime and can also be members of families with family variables and can also have thier own set of instance variables.

  • I always butt in at this point, like a broken record to say....

    With C3, previewing in the browser is usually gonna give some jank, and is not indicative of web hosted or exported performance. Just use it as a rough guide.

    Upload it to a server or export it to nwjs and, on the same machine you should see little to no meaningful jank and noticeably higher and smoother performance.

    edit and if you are on a laptop or tablet make sure you are not running on battery saver (or equivalent). in fact plug in and max the performance settings if you can.

  • Hey, was there an announcement for this?, I must have missed the announcement. (Im not on the social media sites). anyway looks great will have a proper dig around later. Awesome..

  • Tom shouldn't that tab be floating in the middle all the time? (On mobile) If not, it should.

  • Lolz yea.... hope nobody take offence.... iz just geme

    anyway no prob I hope you can find a way to integrate it into your game.

    Just FYI

    1)you can mess with the velocity and gravity but if out of range it may not be able to calculate properly so I would maybe have the enemy just face the player until within a certain range that you know works then run the calc.

    2) You can take out the choose and just replace with + or - depending if you want the high or low trajectory

    3) probably best not to make trails using bullet step like that it will kill perforamce just did it for the effect.

    4)sorry (edit) one more thing i just realised. the calculation is made from the pivot point of the "cannon" but the bullet is fired from the end of the "cannon" . you want these points to be as close as possible for best accuracy, i.e. if you had a long cannon where the pivot and exit are far apart you may start missing the target as the length of the cannon is not considered in the calculation. in fact it is best if they are the same point.

  • https://drive.google.com/open?id=1zGQeftlJl5_ljodZgmQxGdTAD_keFDg6

    basically same formula as above

    note there are allways 2 solutions for a given velocity as it is a squareroot. one is high and one is low, Ive randomly chosen one or the other here.

  • Sometimes I surprise myself. Try this. Just make a Cannon sprite (with an image point 1 at the end of the barrel), a Bullet sprite with bullet behavior and a Badman enemy sprite with drag and drop behaviour. Works perfectly and really cool. bullets allays hit the badman as long as in range. sorry I cant upload anything as Im at work. I just copied the formula off Wikipedia

    | Global number RangeX‎ = 0
    | Global number AltitudeY‎ = 0
    | Global number GravityG‎ = 5000
    | Global number BulletVelocityV‎ = 3000
    | Global number TanAngleA‎ = 0
    | Global number AngleA‎ = 0
    
    + System: Every tick
    -> System: Set RangeX to Badman.X-Cannon.X
    -> System: Set AltitudeY to Cannon.Y-Badman.Y
    -> System: Set TanAngleA to ((BulletVelocityV^2)+((√((BulletVelocityV^4)-(GravityG×((GravityG×(RangeX^2))+(2×AltitudeY×(BulletVelocityV^2))))))))÷(GravityG×RangeX)
    -> System: Set AngleA to atan(TanAngleA)
    
    + System: Every 0.3 seconds
    -> Cannon: Spawn Bullet on layer 0 (image point 1)
    -> Bullet: Set Bullet gravity to GravityG
    -> Bullet: Set Bullet speed to BulletVelocityV
    
    + System: Every tick
    -> Cannon: Set angle to -AngleA degrees
  • Sorry, I just saw you want to perfectly calculate the trajectory to hit the player.

    Yea that's gonna need some math. nooooooooooo..

    Im sure there was a few examples available over the years. is nOthing coming up when you search? (make sure to search the C2 threads as well) . Or there is probably tons of demos on you tube where you could just transfer over the maths into c3 events. I might have a go on the weekend if I have time.

  • Ok. did a little more digging. So.

    1) In trying to make an example project I can confirm that there is always black screen after default loader as layout images are loaded into gfx memory.

    2) However, this black screen time is acceptably small, fraction a second on a fast machine, even if I am loading in 30 large images ranging from 1000x1000 to 3000x3000 in size, looks like it is hitting around 300mb gfx memory.

    3) but my game seems to be loading in over 1.3GB for the layout. which seems a excessive for what Im doing so it looks like I may have some legacy large images in there that have been overlooked.

    So I will have a dig around my project to see what is causing the large gfx load

    but yea definitely looks like there is black screen during gfx load which will be obvious with large games on slow machines so I may raise a bug for that.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ive noticed that as I add more art to my layout I am getting a long black-screen after the default load screen before the game actually starts.

    Dubug indicates that this blackscreen occurs while loading gfx assets.

    Ashley, could we not keep the loader on until all assets loaded ? Otherwise it looks like the game has frozen.

    or am I doing something wrong ???

  • Bullet behavior has gravity, just use that.

  • Hi,Where is object count found? I cant locate that,that sounds like what I need.

    you would find it available inside system condition like "compare two values"

    then the expression would be enemysprite.count" is >= 1 etc.

NetOne's avatar

NetOne

Early Adopter

Member since 3 May, 2016

Twitter
NetOne has 4 followers

Trophy Case

  • 8-Year Club
  • Great Comment One of your comments gets 3 upvotes
  • Delicious Comment One of your comments gets 10 upvotes
  • Email Verified

Progress

11/44
How to earn trophies