[RELEASED] BulletPro - 2D Projectile Workspace

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 - M****aximized 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

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!!

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?

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.

2 Likes

can support 3D game?

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.

1 Like

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?

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).
7488446--921749--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.)

How to use my own prefab (3d) as a bullet

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.

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

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).

1 Like

Homing on XZ plane not working.


the enemy bullet is not chasing my player, it spawn away from player.

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!

1 Like

I’m making a platform shooter and not sure how I feel about tracing around all my terrain with bullet receivers. Is there a way to use Unity’s collision system with Bullet Pro? The tilemap can automatically make colliders which is very expedient. But I am also wondering about the performance benefit of your system. To go to the trouble of having this custom collision system, it must be much more performant. In your tests, what is the performance benefit compared to using Unitys collisions?

You could add regular Unity colliders to the bullets, through the Bullet Behaviour system which lets you attach any prefab to a bullet - but it’s really not the intended use, and the Receiver system exists because Unity’s collision system is too heavy for handling hundreds of bullets.

If you’re using TilemapCollider2D, an alternative would be using Bullet Behaviours but without colliders, and then process collisions with the OverlapPoint() function from the TilemapCollider2D class.

When you are using Bullet Pro to make a platform shooter, how do you recommend handling collisions between the player and the ground, walls, ceiling, platforms, etc? Use regular colliders on the player and terrain and then also use bullet receivers on the player to collide with bullets and also line the terrain with bullet receivers so bullets will hit the terrain as well?

Exactly, collisions between the player and the ground/walls don’t involve bullets, so they should use Unity’s default collision system. There’s no interaction with BulletPro here.
Then, on top of that, you add BulletReceiver components to anything that could get hit by a bullet (such as player hitbox or obstacles).

1 Like

Thank you for your help! I am wondering if a bullet receiver can be attached to a tile, so that when I draw or edit my terrain tilemap, the bullet receivers are placed along with the tile automatically. That would make it much more manageable. I’ll have to look into that. From your end do you see any issue with doing it that way? Thanks again for helping me understand the system.

1 Like

You’re welcome!
There should be no issue with placing bullet receivers directly on tiles, just make sure you don’t exceed the receiver limit as set in your Project Settings.
This limit defaults to 200 at once, you can manually raise it if needed. (Edit → Project Settings → Bullet Pro)

1 Like