Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Volcano #133

Merged
merged 15 commits into from
Sep 30, 2021
Merged

Volcano #133

merged 15 commits into from
Sep 30, 2021

Conversation

Chosenundead15
Copy link
Contributor

Volcano is fully working, armed_grenade was made a component again as it was a dependency of volcano previously and is required to spawn them.

@kindaro
Copy link
Collaborator

kindaro commented Sep 29, 2021

Did you consider using standardized explosives from #113? Possibly it could be an economical way to achieve the effect of armed grenades and erupted items with much less code.

@Chosenundead15
Copy link
Contributor Author

Did you consider using standardized explosives from #113? Possibly it could be an economical way to achieve the effect of armed grenades and erupted items with much less code.

Didn't even notice the standarized explosive were merged already. I don't think they were when I started working on them. EruptedItem doesn't make sense to use it as is purpose is not to make explosive but a trait to spawn a lot of items from volcano(and don't have the collider be an obstacle). Having a volcano spawn swords should be valid for example. In contrast, having explosive implement the trait could make sense.

At the moment, ArmedGrenade already existed in the codebase and necessary for Grenades(initially sharing files) and Volcano, doing the refactor will add changes to Grenades that might be not the best idea to do for this Volcano PR, but I'm open to using the standarized explosive on armed grenades and agree it would be more economical. If doing the refactor first or merging this PR and refactoring later is better, I'm not sure.

@kindaro
Copy link
Collaborator

kindaro commented Sep 29, 2021

I should suggest to merge first, refactor later.

Why? Because a pull request accumulates merge conflicts over time, so the longer it exists, the more work it creates. Better to merge sooner.

But I am not an authority on this topic. This is nothing more than an advice.

@grufkork
Copy link
Collaborator

This looks good, but I'd like to raise the question of adding some kind of entity-component system to the game. ArmedGrenade is required to call eruption_update from its fixedupdate regardless of whether it is spawned from a volcano or not. What would be neater is if fixedupdates could be registered to the node, which then calls each of them. That way, it could even be possible to add an item as EruptedItem without modifying the regular fixedupdate. This would be a greater issue if you want to turn an explosive into an erupted item, as then you'd have to change the fixedupdate for all non-erupting explosives. I am facing the same issue for adding kickbombs, which behave exactly like a regular explosive except that if a player collides with it, it is kicked away. Being able to "tack on" behaviour like that would be very useful, and might allow any item to be erupted (especially once more items are generalised (guns are as of #136)) without modifying the source. Thoughts on this?

@olefasting
Copy link
Member

olefasting commented Sep 30, 2021

I agree with what is being said here, and I don't like "bidirectional" dependencies and think the grenades should be completely separated from volcano, except for the trait implementation, but I'll merge this and we can refactor later.

@olefasting
Copy link
Member

Also I agree withj @grufkork that an ecs should be discussed. It promotes better workflows, in my opinion, and it would eliminate a lot of the problems we discuss on other issues. I have not run into performance problems with MQ scenes yet, but from what I can gather, ECS will offer far bettet performance, as well. There are also libraries for this that offer parallelization etc.

We should probably create a separate issue for ecs, though

@olefasting olefasting merged commit d3bd50a into fishfolk:main Sep 30, 2021
@erlend-sh erlend-sh mentioned this pull request Oct 1, 2021
11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants