Search Unity

[RELEASED] BulletPro - 2D Projectile Workspace

Discussion in 'Assets and Asset Store' started by AlbinosMou, Oct 18, 2020.

  1. AlbinosMou

    AlbinosMou

    Joined:
    Mar 6, 2015
    Posts:
    12



    Greetings, I’m here to present BulletPro, which will be your most practical solution to set up any projectile configuration for any 2D gameplay!

    BulletPro stands out by its instantaneous ease of use for every game genre that would require hitbox management: tower defense, platforming, top-down action games, and of course the most complex bullet hell patterns.


    This plugin is compatible with any version of Unity from 2018.4 to 2020.1, and comes with the following arguments:

    1 - Maximized ease of use:
    • BulletPro can create any 2D gameplay that involves projectiles, without a single line of code, in the most comfortable workspace: see images below.
    • But for experienced developers who prefer to use code, there are also scriptable bullet behaviours, and an Online Script Reference to this API - BulletPro can easily be extended.

    • WYSIWYG bullet layout editor: stack layout modifiers, draw stuff, work from textures, and so much more

    • Multiple alternative workflows:
    • Convert AnimationClips to bullet behaviours
    • Make any prefab into a bullet
    • Make use of infinite nesting levels so your bullets also shoot bullets
    • Instant integration workflow: when needed, change your assets in Play Mode!
    2 - Endless design space:
    • No limiting presets: instead, hundreds of combinable parameters that allow for any behaviour. Everything is modular!
      Of course, there are still dozens of example patterns provided in the package so you can use them as a basis.
    • Easily randomize any of these parameters, and/or make it depend on other external data, such as game difficulty.


    • Works with any collider shape: circle, line, composite/custom.
    • Lasers!
    • Homing behaviours!
    • Fully functional in any 2D space: XY, XZ, or any rotated plane.

    3 - Greatest performance available:
    • Handles collisions in the most efficient way, using GPU calculations
    • Handles sprite animations, VFX and SFX
    • Complete pooling system
    • Works on any device with hundreds to thousands of bullets.


    Here are the most important links once again:


    I hope you will enjoy using BulletPro as much as I enjoyed making it! I’d be glad to read your reviews and answer your questions.

    Cheers,

    Simon
     
    Last edited: Nov 14, 2020
  2. brittany

    brittany

    Joined:
    Feb 26, 2013
    Posts:
    44
    Great work on this asset Simon! It is really fantastic.

    Imagine that you have a run n gun game and you want a "muzzle flash" sprite animation to play at the emitter origin when a bullet is fired and also you want an "explosion" sprite animation to play once a bullet collides. Is this built into the system, where you can slot these animations in? If not, do you have any recommendations for a good way to do this while using the system? Would you add it to the bullet prefab?

    Thanks for your ideas!!
     
  3. bsimser

    bsimser

    Joined:
    Sep 8, 2014
    Posts:
    97
    Just got this as part of the megabundle. Will be interesting to try it out. Documentation looks great! One question is the first example in the video isn't in the included scenes. Is it a commercial game or something? What is it from?
     
  4. AlbinosMou

    AlbinosMou

    Joined:
    Mar 6, 2015
    Posts:
    12
    Thank you for your feedback!
    And sorry for the late response - I didn't get notifications from this thread, but I typically reply within one day via mail or discord.

    There are two built-in ways to achieve this, but one is clearly cleaner than the other:
    1) The hacky-but-faster way: you can fire a static bullet at the same time you fire your actual bullet. The static bullet can have its sprite animated to play the muzzle flash, then die.
    2) The clean way: bullets have an option called "Attach Prefabs and Behaviours". It allows you to attach the prefab of your choice as a child of a bullet whenever it gets fired. Not only the prefab can play your muzzle flash effect, but it will also carry a custom script that gets various bullet callbacks, such as OnBulletBirth, OnBulletDeath, and so on. Using this feature is all explained in the part 8 of the docs.


    It's part of a playable browser game I did to showcase the asset's possibilities. In place of the Inktober Challenge, I made one different bossfight a day during October 2020. It's called Doodleshots, and it's still playable for free on my website : click here
    The point was making complete fights in a really short timespan (around 30mn per scene), so the gameplay only relies on BulletPro and nothing else.
     
    Last edited: Aug 23, 2021
    bsimser and brittany like this.
  5. leooi

    leooi

    Joined:
    Sep 3, 2021
    Posts:
    6
    can support 3D game?
     
  6. AlbinosMou

    AlbinosMou

    Joined:
    Mar 6, 2015
    Posts:
    12
    Hello, yes you can use it for any 3D game (or 2.5D), as long as the shooting action takes place on a single plane. (ie. the bullets travel along the same plane)
    This plane can be any rotated plane with any direction (not just XY or XZ!), this kind of project is always supported.
    Your bullets can also carry Mesh Renderers instead of Sprites, with the shader of your choice.
     
    leooi likes this.
  7. DoctorRafikii

    DoctorRafikii

    Joined:
    Sep 4, 2021
    Posts:
    1
    Just got this in a bundle, great tool so far! But I have one question. What is the easiest way for a bullet & player collision to kill the player? I have collisions working as I can see the bullet disappear on collision, but it doesn't execute my killplayer function?
     
  8. AlbinosMou

    AlbinosMou

    Joined:
    Mar 6, 2015
    Posts:
    12
    Thank you for your feedback!

    Your bullet dies upon collision because both the Bullet and the BulletReceiver have their "kill bullet on collision" boolean set to true. For enabling other effects, you need to use the Events provided in the BulletReceiver component. For instance, OnHitByBullet() will be automatically invoked and pass a reference to the Bullet component that hit it, as well as the exact position of impact (Vector3).
    upload_2021-9-11_20-23-5.png
    You can plug your code in this event, that's where it bridges with your own game logic so you can use this information and kill your player.

    (Protip: if you need to obtain more data from the collision, your bullet can have any number of Custom Parameters, of any type. For instance, an amount of damage, an elemental property, a text, or even a reference to a ScriptableObject with complex effects of your own.)
     
  9. leooi

    leooi

    Joined:
    Sep 3, 2021
    Posts:
    6
    How to use my own prefab (3d) as a bullet
     
  10. AlbinosMou

    AlbinosMou

    Joined:
    Mar 6, 2015
    Posts:
    12
    Hi, you can attach any prefab to a Bullet Component thanks to Bullet Behaviours, which effectively uses your prefabs as bullets if you turn off the other default modules such as Rendering or VFX.

    To make use of BulletBehaviours, you just have to follow these four steps:
    1) Create a BulletBehaviour script into your project. (Assets > Create > BulletPro > Behaviour Script)
    2) Add this script to your prefab.
    3) Drag that prefab in the "Attach Scripts & Objects" section of your bullets.
    4) Register the prefab in your Scene Setup's Bullet Behaviour Manager.

    The full user manual gives a more detailed explanation in its part 8.
     
  11. unity_ULEttr3FrCE33Q

    unity_ULEttr3FrCE33Q

    Joined:
    Jul 16, 2019
    Posts:
    10
    Why cant I use other than line and circle colliders in bullet receiver? I have straight walls in my game which cant use the circle collider type. Also the line collider only works on y-axis and on top of that it doesn't for some reason register collisions even though the circle collider does
     
  12. AlbinosMou

    AlbinosMou

    Joined:
    Mar 6, 2015
    Posts:
    12
    Hello, although circles and lines are the only two primitives available for performance reasons, you can switch your bullet receiver to Composite Mode, which allows for any shape by combining multiple Circle and/or Line receivers.

    Line receiver is aligned with the object's local Y-axis so you can rotate the object's transform in any fashion. They're precisely designed for your use case (straight walls). It's often a good practice to have this kind of component on a separate GameObject (especially if you intend to use Composite Receivers afterwards), so its Transform can be moved, rotated and scaled at will.

    Finally, if you encountered problems with the collision detection, I suggest you make sure that both your Receiver and your bullets belong to the Scene Setup's plane (ie. make sure they have the same Z-coordinate if you play on the XY plane, or the same Y-coordinate if you play on XZ, and so on).
     
    unity_ULEttr3FrCE33Q likes this.
  13. leooi

    leooi

    Joined:
    Sep 3, 2021
    Posts:
    6
    Homing on XZ plane not working.
    upload_2021-9-29_18-7-21.png
    the enemy bullet is not chasing my player, it spawn away from player.
     
  14. AlbinosMou

    AlbinosMou

    Joined:
    Mar 6, 2015
    Posts:
    12
    We just discussed this in Discord, but I'll also answer here for future reference: the issue has been found and the fix will be deployed in version 1.3.1.
    It should most likely be available by next week. (Asset Store validation time)
    Edit: 1.3.1 is now available, the issue has been fixed!
    My sincere apologies for the inconvenience, thank you for your patience!
     
    Last edited: Oct 6, 2021
    leooi likes this.
unityunity