playMaker

Author Topic: Bullet system [SOLVED]  (Read 7250 times)

Fat Pug Studio

  • Beta Group
  • Hero Member
  • *
  • Posts: 1294
    • Fat Pug Studio
Re: Bullet system [SOLVED]
« Reply #15 on: October 05, 2017, 07:01:57 AM »
I'm on remote desktop now, i'll check what could be the problem when i get home. I don't get no warnings, strange.
Available for Playmaker work

agito1987

  • Playmaker Newbie
  • *
  • Posts: 37
Re: Bullet system [SOLVED]
« Reply #16 on: October 05, 2017, 08:32:51 AM »
Made a new project, empty scene with only a cube spawning bullets. Killable disables bullet after 3 sec.
Once every bullet is used the warning pops up. (So the warning is not displayed immediately.)

agito1987

  • Playmaker Newbie
  • *
  • Posts: 37
Re: Bullet system [SOLVED]
« Reply #17 on: October 06, 2017, 05:11:58 AM »
Ok super weird…

Today I started the project again. Unibullet still takes the bullets from poolbos. BUT I don’t have any warnings?! Don’t get why it didn’t work yesterday and today it does.
Without me doing anything =/.

Still thank you for your time again  ;D

Fat Pug Studio

  • Beta Group
  • Hero Member
  • *
  • Posts: 1294
    • Fat Pug Studio
Re: Bullet system [SOLVED]
« Reply #18 on: October 06, 2017, 10:09:21 AM »
You should report that to the dev, i'm sure that should not be like that.
« Last Edit: October 10, 2017, 04:24:13 AM by krmko »
Available for Playmaker work

agito1987

  • Playmaker Newbie
  • *
  • Posts: 37
Re: Bullet system [SOLVED]
« Reply #19 on: October 10, 2017, 03:48:42 AM »
Just an update.

Unibullet at the moment does not work with the killable function of Core GameKit.
The dev said he will look in to it and possibly add this functionality in the future.

If you write your own code you can work around it. If you are like me primarily a playmaker user that wants to use the Core GameKit and its killable function. You should wait till the asset implements this function.

Fat Pug Studio

  • Beta Group
  • Hero Member
  • *
  • Posts: 1294
    • Fat Pug Studio
Re: Bullet system [SOLVED]
« Reply #20 on: October 10, 2017, 04:56:27 AM »
I'm sure he'll do it sooner or later, he's a good guy. I don't know, i'm still using it, it's much easier to use then bulletml for example.

But i don't know how does it not work with killable, if you put killable on bullet, it despawns and gets back to pool boss, right?

Available for Playmaker work

agito1987

  • Playmaker Newbie
  • *
  • Posts: 37
Re: Bullet system [SOLVED]
« Reply #21 on: October 10, 2017, 05:17:06 AM »
Yes it works.

But this functionality is the reason for the warning once you have used all your bullets.
"This bullet is already added in m_bulletList"
Right now you need to call "UbhObjectPool.instance.ReleaseBullet (ubhBullet)" method when returning Bullet to pool.

Fat Pug Studio

  • Beta Group
  • Hero Member
  • *
  • Posts: 1294
    • Fat Pug Studio
Re: Bullet system [SOLVED]
« Reply #22 on: October 10, 2017, 05:22:25 AM »
Hmm, that excessive loging can cause low performance, it's best to comment out the debug line until Nishioka sorts it out.
Available for Playmaker work

agito1987

  • Playmaker Newbie
  • *
  • Posts: 37
Re: Bullet system [SOLVED]
« Reply #23 on: October 10, 2017, 05:56:31 AM »
Yeah that’s my problem now. I don’t know how bad this issue is? 
 
So, you think by disabling the debug line it would be still ok to implement unibullet right now in my project? 
 
My biggest fear is once everything is setup, that I need to replace it further down the line should it become a problem in the long run. Or that the asset will be updated and need to replace everything I setup. 

Fat Pug Studio

  • Beta Group
  • Hero Member
  • *
  • Posts: 1294
    • Fat Pug Studio
Re: Bullet system [SOLVED]
« Reply #24 on: October 10, 2017, 06:27:56 AM »
I don't think it will pose a problem. You can check it out by yourself, make a pool of, i don't know, 100000 bullets, and make them spawn and despawn in a period of minute or two and watch the profiler.

You should usually turn off some of the debug stuff that you don't need in the final build anyway.
Available for Playmaker work

Fat Pug Studio

  • Beta Group
  • Hero Member
  • *
  • Posts: 1294
    • Fat Pug Studio
Re: Bullet system [SOLVED]
« Reply #25 on: January 25, 2019, 06:19:38 AM »
Hey agito1987,

i made some UBH actions:

https://github.com/Oshigawa/Playmaker/blob/master/UBHStartShotRoutine
https://github.com/Oshigawa/Playmaker/blob/master/UBHStopShotRoutine
https://github.com/Oshigawa/Playmaker/blob/master/UBHStopShotRoutineAndPlayingShot
https://github.com/Oshigawa/Playmaker/blob/master/UBHReleaseBullet

Makes things a lot easier, no need to set properties, call methods and releasing bullets work great with Core Game Kit, finally. The greatest thing is that you won't lose references because you're using get/set property.

I'll merge StopShotRoutine and StopShotRoutineAndPlayingShot in one action when i find some time.
« Last Edit: January 25, 2019, 07:52:42 AM by krmko »
Available for Playmaker work