Is there a way to make a Charge Beam for use in BGE?

Okay lots of tags to cover. So I’m working on a game reminiscent of the Metroid Prime trilogy and I’m having some difficulty with making Samus’s Charge Beam power up (here’s a reference video). More specifically I’m not sure how to texture a sphere to look like there’s 2 concentric spheres similar to this:

So what does it have to do in my game?
Similar to the source material, before you acquire the Charge Beam, you only have access to a crappy pea shooter that does minimal damage but allows for a higher rate of fire. After you acquire it, you have the ability to hold down the shoot button and build up energy. After releasing a fully charged shot:

  • It will be about 2.5 times the size of a uncharged shot.
  • Do much more damage than an uncharged shot.
  • A makes a different sound while charging and once fired.
  • It also gets brighter at it’s max size.

How I’m Approaching This Idea Right Now
Right now I’m thinking I can use the Action Editor to animate the scaling of my projectile and potentially the light intensity. (Please correct me if I’m wrong or if there is more practical way of doing this)
The Part that I don’t know how to do is make it so that the damage my projectile causes to an enemy gradually increases until it is fully charged and fired.

If there is a way to do this with logic bricks, I would like to know how.
Thank you to those who took the time to read this, extra thanks to those who are able to lead me in the right direction.:grin:

Needs property ‘Charge’ in player

if mouse is clicked----------and1-----------add 1 to charge

if charge is less than max- --and1

if mouse is clicked- - - - (python1)
if charge > 0--------------(python1)


import bge

def main():
    cont = bge.logic.getCurrentController()
    own = cont.owner
    mouse = cont.sensors['Mouse']
    if not mouse.positive and own['Charge']>=1:
        emitter =  own.childrenRecursive['NameOfProjectileEmitter']
        added = own.scene.addObject('projectileName',emitter, 0)
        added['Charge']=own['Charge']
       
        own['Charge']=0

How do you calculate the damage of the projectiles in your game right now?
How do you differenciate between different bullet types?
How do you calculate the different damages of these bullet types?

As of right now, I’m barely anywhere in the development process. The projectiles are stored on a hidden layer and summoned to an empty. I only have a single projectile type with no values assigned to it except physics and movement. I plan on labeling the enemies with property (like tagging them) and having a hit register once the projectile object collides with them adding a negative integer value to the enemy’s health points. The projectiles will be swapped by either mouse wheel or the ‘tab’ key.

'I just posted the .blend file in Works in Progress and Game Demos. There is still much to do.

The reason why I asked is, that any solution to your above question strongly relies on the implementation you chose on your damage dealer (the entity that calculates the damage on the it object).

A possible solution is to give a projectile a property e.g. “strength”. This “strength” can be a factor of your damage calculation.

Simple example: hitobject.health = max(0, hitobject.health - projectile.strength)

Obviously there can be much more factors in your formula (e…g velocity, weight, hit angle, protection, damping, effects, …).

Lets assume the projectile has a “strength”. You can change the strength of each individual projectile. It does not matter how you do it as long as the strength is known when you calculate the damage on the hit object.

For example you can change this property over time when “charging”. This way the projectile has a specific “strength” when fired. This strenght will be used by the damage dealer.

Think a little further: How about discharging projectile? As longer it flies as less strength it has. Means it reduces the strength over time. This can be a nice effect on too. As closer the target is as more damage the projectile will do. As more far away as less damage.

I hope you get the idea.