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

Added invisible period after spawn #32

Open
wants to merge 33 commits into
base: main
Choose a base branch
from

Conversation

welleyth
Copy link
Collaborator

No description provided.

@welleyth welleyth linked an issue Jun 14, 2024 that may be closed by this pull request
@MAKMED1337
Copy link
Owner

Maybe if object is invisible return his bounding box as null/empty point ?

@welleyth welleyth requested a review from MAKMED1337 June 15, 2024 23:24
Copy link
Owner

@MAKMED1337 MAKMED1337 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very strange idea with invisibility, that is ignored half of the time.

core/src/com/po/fuck/model/Entity.java Show resolved Hide resolved
core/src/com/po/fuck/model/GameObject.java Outdated Show resolved Hide resolved
core/src/com/po/fuck/model/GameObject.java Outdated Show resolved Hide resolved
core/src/com/po/fuck/model/GameObject.java Outdated Show resolved Hide resolved
@@ -11,6 +11,8 @@ public interface Collidable {

Polygon getCollision();

boolean isInvisible();
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does it mean ? Very strange logic, it does not even affect collide.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It affects it. return objects.stream().filter(x -> !x.isInvisible() && x.collide(other)).collect(Collectors.toList());

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But what does invisible state mean ? If it still collides, and it only affects physics.

Comment on lines +110 to +111
// TODO: this is a temporary solution, we need to add a way to check if the enemies are dead
// without relying on collidable collection.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think that enemies should leave the room.

@welleyth welleyth requested a review from MAKMED1337 June 16, 2024 12:46
Copy link
Owner

@MAKMED1337 MAKMED1337 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still don't like the idea with invisibility that can be tested, why are we getting "internal" object state ?

core/src/com/po/fuck/model/Entity.java Outdated Show resolved Hide resolved
core/src/com/po/fuck/model/Entity.java Outdated Show resolved Hide resolved
@welleyth
Copy link
Collaborator Author

I still don't like the idea with invisibility that can be tested, why are we getting "internal" object state ?

We are not getting an internal state. We are checking whether it is invisible. I consider it normal.

@welleyth welleyth requested a review from MAKMED1337 June 16, 2024 13:37
@MAKMED1337
Copy link
Owner

I still don't like the idea with invisibility that can be tested, why are we getting "internal" object state ?

We are not getting an internal state. We are checking whether it is invisible. I consider it normal.

Then what does invisible mean ?

@welleyth
Copy link
Collaborator Author

I still don't like the idea with invisibility that can be tested, why are we getting "internal" object state ?

We are not getting an internal state. We are checking whether it is invisible. I consider it normal.

Then what does invisible mean ?

It means that object currently cannot collide with anyone.

@MAKMED1337
Copy link
Owner

MAKMED1337 commented Jun 16, 2024

It means that object currently cannot collide with anyone.

So why is there a method collidesIncludingInvisible ?

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.

Avoid stuck situation when spawning GameObject intersecting Entity
2 participants