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

[pull] main from fishfolk:main #3

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

Conversation

pull[bot]
Copy link

@pull pull bot commented Jan 23, 2024

See Commits and Changes for more details.


Created by pull[bot]

Can you help keep this open source service alive? 💖 Please sponsor : )

zicklag and others added 30 commits October 14, 2023 20:12
Migrates Jumpy to use the new Bones framework, unifying `jumpy` and
`jumpy_core`, removing the direct dependency on Bevy and moving the
whole game to Bones ECS.
You can also toggle fullscreen with the F11 key.
…les. (#866)

Jumpy will now read the `JUMPY_ASSETS` and `JUMPY_ASSET_PACKS`
environment variables.
We will be making nightly builds manually when something interesting
happens.
…870)

Uses the new Lua plugin system in bones, and adds an anchor item with
artwork by @HarsulinsGhost.

Co-authored-by: Harsulin's Ghost <harsulinsghost@katharostech.com>
Implements asset pack loading, allowing players to install their own
assets without modifying the core game.
The blunderbass is not fully complete, but this adds a work-in-progress
version to the devpack, and makes some Rust updates necessary for the
new item including:

- Adding `#[repr(C)]` for some more types like `Bullet` and
`BulletHandle`.
- Adding a lua binding to the `GlobalRng` resource so you can generate
random foats in Lua.
…ion causing AI to sink into ground (#883)

I seem to have set the update of saved positions used to determine if
kinematic has moved in the wrong spot, ended up in a situation in which
AI thinks it had not moved, but was inching down by -0.1 each frame,
sinking into ground.

I was able to repro fairly consistently and feeling pretty confident
this should fix the AI sinking into ground described in #882. (Though I
do not believe this is related to the losing control of player bit).

EDIT: #853 (objects stuck in walls) also appears to be resolved by this
fix.
Includes a fix for user inputs being dropped randomly.

Resolves: #882
…886)

Whenever the same key or button had multiple input events that happend
in the same frame, only the first event would be honored, leading to
issues where the "release" events were not being picked up and buttons
would get stuck in a "pressed" state.

Resolves: #882
This was accidentally missed from the latest commit.
closes #890

---------

Co-authored-by: Zicklag <zicklag@katharostech.com>
The previous release had not included the update to the Cargo.lock, so
this makes another release to fix that.
might help catching outdated Cargo.lock
While working on the jellyfish I noticed that the kick bomb wasn't
working.

When spawned they didn't get an `ElementHandle` component (or
`MapElementHydrated`). Without an element handle the
`update_idle_kick_bombs` system always skipped over them, preventing
them from being used.
Hi 👋 I've been wanting to contribute to jumpy for a bit so I
started tinkering with the jellyfish item.. and it went more smoothly
than I thought! I think I met all the original requirements but there
were a few small things I wasn't certain about (see bottom).

Closes #577

## Behavior

- Item behaves like the musket:
  - It has a limited amount of ammo: 1 use
  - It reloads immediately when dropped
- Players can only use the jellyfish while idle (i.e. can't be walking,
falling, etc.)
- The flappy jellyfish explodes if any of the following happen:
  - It goes outside the map
  - It collides with a player
  - The driver dies

## Outstanding Questions

- Is `LoadedMap::is_out_of_bounds` fine for explosion on out of bounds?
  - Is there a better way to detect this?
- Should the explosion have an emote region?
  - e.g. the sword creates one 3.5x larger than the damage region
- The item asset has 2 frames but I only used 1
  - Should it be animating while grabbed or on the ground?
- Should the jellyfish go on the player's head while driving?
  - I tried but couldn't get the sprite to rotate
dignifiedquire and others added 30 commits July 3, 2024 17:06
matching PR to fishfolk/bones#407

---------

Co-authored-by: Max Whitehead <max.blackllama.alt3@gmail.com>
The version string widget was editable, and was stealing focus from menu
nav.
…AI but no player (#1008)

Remove ability to add AI player to first slot, reserved for at least one
player.

FIx being able to start game without a real player.

Closes #974  and #956
Update dependencies, including bones / iroh.
…1017)

Use AudioCenter from bones now that it has been moved there, and remove
from Jumpy.

Added a trait extension to continue playing music from kira
`StaticSoundSettings`, to avoid having to put all of the params in
`play_music_advanced`, as the looping is configured a bit differently.

The addition of `force_restart` in PlayMusic event has been helpful, now
music does not restart each time switch menu pages.

Resolves #1016
)

Should address at least part if not all of the issues with the current
.gitattributes
We updated download-artifacts to v4 but not upload, seems to have broken
release pipeline, hopefully this fixes.
Add support for some environment variables, only available in debug
builds, that allow for quickly loading into a single-player game.

## Examples

To launch straight into a single-player match with Fishy, the default
player, on Keyboard1:

```shell
TEST_MAP='Dev Level 1' cargo run
```

You can also specify another player:

```shell
TEST_MAP='Dev Level 1' TEST_PLAYER='Sharky' cargo run
```

And even provide a hat:

```shell
TEST_MAP='Dev Level 1' TEST_PLAYER='Sharky' TEST_HAT='Cowboy Hat' cargo run
```

Or, auto-select a player, launching directly to the map select menu
(again, optionally with a hat):

```shell
TEST_PLAYER='Orcy' TEST_HAT='Unicorn Hat' cargo run
```

All of these examples set Keyboard1 as the control source for the
player. You can provide a different source like so:

```shell
TEST_CONTROLLER='Gamepad' TEST_MAP='Dev Level 1' cargo run
```

Any combination of one or more of these four environment variables will
skip straight to either the map select menu or directly into a match if
a map is provided. Fishy with no hat on keyboard1 is the default if only
a map is given.
…te (#1032)

This updates bones and uses new matchmaking flow. Includes using the new
matchmaker rng seed, and gilrs update.

Some other little fixes included:
- "Waiting for players" text now displays again when matchamaking
- If start matchmaking online and switch to lan tab, matchmaking is now
cancelled.

Gilrs update confirmed fixes: #989
Fixes #933 

Disabling only gamepad input seems to make the input behave as one would
expect. Arrow keys, backspace, etc work like normal, and bound keys
(e.g. A, D) only update the text and no longer move the caret.

Unfortunately I don't have a controller to test with, but I assume this
will work with those kind of inputs too.

---------

Co-authored-by: Max Whitehead <max.blackllama.alt3@gmail.com>
Follow-up to #1023, partially reverting it as there is a simpler fix,
and fixing the remaining bugs.
Replace `std::process::exit(0)` with proper use of the
`bones::ExitBones` resource.
Fixes #963

## Changes

-
[6781542](6781542)
`PlayerSlot` is now (sort of) a state machine, starting out `Empty` then
progressing through `SelectingPlayer` and `SelectingHat` until becoming
`Ready`
- Slot for a network player only uses the `SelectingHat` and `Ready`
states for simplicity
- Angled brackets `<` and `>` show around the thing being selected
(player/hat), brackets now don't show when ready
-
[a2393c4](a2393c4)
fix bug where label has incorrect text for 1 frame when pressing Menu
Back to remove player from slot
-
[f636d33](f636d33)
Upgrade bones to latest
- Set gitattributes for `*.ftl` files so that they are treated as text
for diffs and not binary files
- Ignore advisory `RUSTSEC-2024-0370` proc-macro-error is unmaintained
(see [related bones issue](fishfolk/bones#479)
and [the advisory](https://rustsec.org/advisories/RUSTSEC-2024-0370))

This also fixes a bug I was seeing on `main` where another player in a
LAN lobby pressing A/D would behave as if everyone pressed A/D, e.g.
pressing D to select the next skin would change to the next skin in both
slots.

**Rationale for the rough state machine:**

Previously there were 3 states for a player slot: Empty,
SelectingPlayer, and Ready + SelectingHat. This state was maintained by
two booleans, `active` and `confirmed`, which tell you whether the slot
is not empty and whether the player has readied-up respectively.
Together they represent the 3 states as: (`active/confirmed`)
`false/false`, `true/false` and `true/true`; with `false/true` being an
invalid state.

Now that there are four states to the ready-up process, one way of
implementing this is to add a third boolean, but this introduces 3 more
invalid states. Let's say the boolean is called `selectedPlayer`, these
are the possible boolean combinations and the states they represent
(`active/selectedPlayer/confirmed`):

```
false/false/false Empty
false/false/true <invalid>
false/true/false <invalid>
false/true/true <invalid>
true/false/false SelectingPlayer
true/false/true <invalid>
true/true/false SelectingHat
true/true/true Ready
```

The implementation I opted for is a simple state machine. While it added
a lot more code to some areas of this module I found it made reasoning
about some sections much easier. It also made explicit certain edge
cases in the `handle_match_setup_messages` system where e.g the client
could theoretically receive a confirmation message from a peer when it
had not yet received any player selection messages. A warning log is now
generated in the unlikely case this occurs.
…ready (#1040)

Fixes #1036 and couple other things along the way

Not entirely sure what caused this - but I think I introduced it when
updating for new matchmaker interface in bones.

We would allow online matches to continue if >1 players are ready and no
unconfirmed players. The issue is that in online remote players who had
not made a selection were in `Empty` state, and not tracked as
unconfirmed. Now for any local + required players, I initialize them to
new PlayerSlot type `SelectingLocalControlSource`. `Empty` may be used
for online slots that are unused (the last 2 slots in a 2 player game)
in online, or for lan, optional slots that may be joined by additional
players/AI, but are not required. And remote required players are set to
`SelectingPlayer` with default fish + no hat - as next message expected
from them is change in player, and they don't need to select control
source, we know they are remote.

This seems to have fixed the match starting without all players ready,
as all required players are initialized to something other than `Empty`.


### Other fixes / changes

#### Remembering Hats:

I noticed that if you select a hat and then deselect it going back to
fish select - the other online players would still see this hat, but
local player resets to None. If player selected hat, went back to fish
select, then readied up with no hat, the remote players would see hat,
but not the local player. This could cause desync. Now When you go back
to fish select, your hat is remembered.

#### Always display default fish:
We were no longer displaying default fish in online when player had not
yet selected a control source/fish. Now regardless of if have actually
selected a fish, the default fish + no hat is shown (If the slot is a
required player that we are sure will select one eventually / must ready
up). In local for unjoined slots, no default fish is shown until joined
or AI is set.

#### Show when remote players ready
In online when a remote player is ready, this is now displayed.

@nelson137 feel free to review (if you want) as I know you were just in
here. Player select sure is complicated lol, but feeling good about the
changes I think we're making it more manageable 😅
Fixes #990.

Reorder the spawners in the level asset so that players 1 & 2 spawn on
opposite sides of the map.
Fixes #1014 (for now).

It sounds like a proper fix entails significant work; but to fix the
immediate issue we can move the rope tiles away from any others so that
those adjacent to them are blank.

## Before

<img width="256" alt="before-asset"
src="https://github.com/user-attachments/assets/41e8ffb8-4034-492b-9f17-ce182656679b">
<img width="256" alt="before-game"
src="https://github.com/user-attachments/assets/e30bf931-ca2a-46a7-86b8-c2e6971e4155">

## After

<img width="256" alt="after-asset"
src="https://github.com/user-attachments/assets/86342a5c-cab9-4caf-948b-ce01f68393b0">
<img width="256" alt="after-game"
src="https://github.com/user-attachments/assets/df8c7c46-8a4d-4828-8370-fad89c108bdb">
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants