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 Boat #592

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

Added Boat #592

wants to merge 15 commits into from

Conversation

Litorom
Copy link
Member

@Litorom Litorom commented Dec 27, 2023

The ultimate and so useful feature has been added. Introducing the boat, the float on water that consumes no stamina!

All jokes aside:

Additions:

  • Boat Entity
  • Boat Item

Notes:

  • Breakable via any tool item
  • Boats are faster than the player to add a benefit and reason to use them

@El-Virus El-Virus self-requested a review December 30, 2023 13:51
@El-Virus
Copy link
Contributor

Ah, CodeQL reminds you that the input system has been changed, do consider syncing your branch to solve this.

@El-Virus
Copy link
Contributor

Right, you'll also have to modify your code to use the new input system.

@BenCheung0422
Copy link
Member

What about following the rule of "everything costs stamina"? Using boat on water still costs stamina, but it consumes stamina per a certain distance travelled continuously.

Copy link
Member

@Makkkkus Makkkkus left a comment

Choose a reason for hiding this comment

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

My main impression from this is a feeling of confusion, but that is not your fault I suppose.

I don't know if I fully addressed your concerns, but the following is what I managed to find.

import minicraft.gfx.Screen;
import minicraft.gfx.SpriteLinker;

public class RideableEntity extends Entity {
Copy link
Member

Choose a reason for hiding this comment

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

Why does this class exist? It does nothing different from Boat.

return !stopped;
}

public boolean move2(double xa, double ya) {
Copy link
Member

Choose a reason for hiding this comment

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

move and move2 should probably use the corresponding methods in the Entity class.

Copy link
Member Author

@Litorom Litorom Jan 25, 2024

Choose a reason for hiding this comment

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

I’ll try

public Boat clone() {
return new Boat();
}
}
Copy link
Member

@Makkkkus Makkkkus Jan 25, 2024

Choose a reason for hiding this comment

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

This class must probably override the die() method to make sure dying works as intentional.


private int tickTime = 0;

private Direction pushDir = Direction.NONE; // the direction to push the furniture
Copy link
Member

Choose a reason for hiding this comment

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

Check if the fields above are already defined in the Entity class.

@BenCheung0422
Copy link
Member

For people interested, this is my version of implementation for boat: https://github.com/BenCheung0422/minicraft-plus-revived/tree/boat

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