Starman's Forum Posts

  • I am making a bullet hell game and i made an object pooling system and once the bullets get outside of the screen they get disabled and stop moving. To enable the bullets i use a bulletSpawn function which picks random disabled bullets and sets the position, speed, move angle, etc. unfortunately, i stumbled with a big problem, the game is unable to go above 60 fps with more than 400 bullets even if they are disabled, the game literally ran better by creating/destroying objects. So i wondered, is my object pooling system not well programed or do i even need to make one?

  • The code on your screenshot looks correct - is should pick one bullet instance with disabled=false.

    The problem must be in some other event. Or maybe there are no disabled instanced. Try running the project in Debug Mode and check.

    Oh, i just realized what i did wrong. Last time i did that code i place "is disabled" at the bottom rather that at the top, which caused to select a bullet that wasn't disabled. I recreated the code just for this screenshot and accidentally did it correct.

    Thanks for helping me anyways!

  • I have multiple bullet objects which have a boolean called "disabled" and once they leave the screen they turn on the boolean "disabled" and they stop moving. What i am trying to figure out is how to pick only one of the multiple bullets with the boolean "disabled" on, so i can turn off the "disabled" boolean.

    I tried to do it in this way, but i didn't work.

    does somebody have a way to achieve what i am trying to do?

    Thanks!

  • You do not have permission to view this post

  • You want to use a repeat loop to spawn bullets.

    For example if you had 2 bullets spawn, one on either side, in 5 degree increments, you would use

    + System: Repeat 16 times

    -> System: Create object Bullet on layer 0 at (0, 0), create hierarchy: False

    -> Bullet: Set angle to Bullet.Angle+LoopIndex×5 degrees

    -> System: Create object Bullet on layer 0 at (0, 0), create hierarchy: False

    -> Bullet: Set angle to Bullet.Angle-LoopIndex×5 degrees

    Yeah! this is exactly what i was trying to find!

    ty

  • sorry, but i am not talking about the shooting speed but rather about the amount of bullets that spawns at the same time

  • i think i am not very good at explaining things so i am gonna leave this c3p here

    dropbox.com/s/qn558f14rf8ec1q/bullet_hell_test.c3p

  • i am trying to make an enemy shoot different amount of bullets at the player. for example, lets say i want to shoot 3 bullets at the angle of the enemy towards the player, one of the bullets will go directly towards the player while the other two will be slightly deviated from the player

    (the red line is the angle of the enemy to the player)

    i found a not very good way to do this. it requires copy and pasting code and changing the added angle all the time, which its not good if you want to shoot like 32 bullets at the player

    so if you guys know a better way to this, i would really like to know how

  • i am trying to make a enemy respawning system like in the classic Megaman games without enemy spawners. when an enemy exits the screen it won't respawn until its spawn point is not screen (the spawn point is the x and y coordinates where it was created and the coordinates where the enemy will respawn).

    my problem is that i can't find a way to prevent it to respawn on screen

    this was my attempt

    dropbox.com/s/fhdm9131ssehb7v/enemy%20respawn%20test.c3p

    i am just asking if you have a way to prevent it to respawn on the screen please. and sorry if my English is not that good

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • so lets say i make i want to make an object that moves down and right at the same time, and when it touches a horizontal wall it changes its direction to left but it keeps moving down (its something like an object with the bullet behavior with bounce off solids enabled)

    how could i do something like that? using the reverse action wouldn't be useful because it would only move in a diagonal line (down, left and up right only)

  • i would like to do a height or jumping illusion in a 2d top down game, something like in this video

    Subscribe to Construct videos now

    Tagged:

  • it was actually that! i never thought on enabling "bounce on solids" and that's why they go through the walls.

  • oh yea and that pink enemy doesn't have any pathfinding behavior, he just follows the player

  • i have a very bad problem where a pathfinding enemy that always chases the enemy goes trough the wall, this is really not a problem in a open area but in a place where there are too much solid walls, you can clearly see how sometimes a pathfinding sprite sometimes clips a bit through the walls. the real problem with that is that the player is able to knockback the enemies and that means that the enemies can be pushed inside solid objects

    youtu.be/Q1P0LESMFbM

    i recorded a video of my project so you can se what's going on

    (note that i am using construct 2)

  • i want know if you guys know a way to make something like the lerp expression that for example, you can use to make an object move to a certain point at a amount of time. i would like to do that but without that deceleration effect that lerp haves