hineios / FlyBoy

A boy dreams of being a superhero. One day, when he gets bitten by a fly, his dream comes true. However, nothing turned out the way he imagined!
0 stars 0 forks source link

Projectile System #9

Closed captainvera closed 6 years ago

captainvera commented 6 years ago

Project System proposal

As a 2D platformer, FlyBoy will have a LOT of "projectiles". They can be Boss attacks, FlyBoys' attacks among possibly others.

What I suggest is creating a general framework/class for projectiles that we can always use. This way we would have one general and tested implementation used at all times. We wouldn't have to handle things like:

for every single projectile we want to implement. Want to make the boss fire something? just do something like:

new projectile(start, end, dmg, speed)

New types of projectiles can be a very simple subclass with relevant info ( size, texture, etc).

Thoughts? @hineios @jcvicente  @MiguelRenda

jcvicente commented 6 years ago

I agree, as long as we also have the movement as an editable attribute in the subclasses, in case we want to change the way certain projectiles move and behave.

captainvera commented 6 years ago

@jcvicente I had thought about that, that would have to be implemented on the specific subclasses. My main problem with that is finding a "easy" way to describe more complicated movement. (Math functions aren't very intuitive)

captainvera commented 6 years ago

The way Blueprints work in UE4 makes it so that creating a large inheritance tree is nonsensical. What makes sense is building a robust base class that can be improved upon and creating a specific subclass (to overwrite movement functions and defaults) for each specific projectile.

captainvera commented 6 years ago

Before closing the issue I will create a scope of examples.

hineios commented 6 years ago

Some projectiles are not being destroyed on the lateral walls. The simple projectile i believe.

captainvera commented 6 years ago

Yup, they projectiles aren't finished yet, I'll review them now.

hineios commented 6 years ago

👍