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

clonehero: init at 0.23.2.2 #67643

Merged
merged 1 commit into from Dec 31, 2020
Merged

clonehero: init at 0.23.2.2 #67643

merged 1 commit into from Dec 31, 2020

Conversation

kira-bruneau
Copy link
Contributor

Motivation for this change

Adds Clone Hero to nixpkgs

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@kira-bruneau
Copy link
Contributor Author

kira-bruneau commented Aug 28, 2019

Tested with a Wii Remote Guitar connected through bluetoothctl.

@ajs124
Copy link
Member

ajs124 commented Aug 28, 2019

This doesn't display anything for me. Startup logs

Found path: /home/andy/.local/share/clonehero/clonehero
Mono path[0] = '/home/andy/.local/share/clonehero/clonehero_Data/Managed'
Mono config path = '/home/andy/.local/share/clonehero/clonehero_Data/MonoBleedingEdge/etc'
Preloaded 'ScreenSelector.so'
Preloaded 'libbass.so'
Preloaded 'libdiscord-rpc.so'
Unable to preload the following plugins:
        libbass_fx.so
Display 0 '2369M 23"': 1920x1080 (primary device).
Display 1 '2276WM 22"': 1920x1080 (secondary device).
Display 2 '2276WM 22"': 1920x1080 (secondary device).
Loading player data from /home/andy/.local/share/clonehero/clonehero_Data/data.unity3d
Logging to /home/andy/.config/unity3d/srylain Inc_/Clone Hero/Player.log
ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused

and opens a fullscreen monocolor (dark green/blue) window.

Assuming I'll get this working, I also have an XBox360 Wireless and a redoctane USB controller to test this with.

@kira-bruneau
Copy link
Contributor Author

kira-bruneau commented Aug 28, 2019

@ajs124 It looks like you launched the game before without the libXrandr runtime dependency and it's disabled native resolution detection. I had the hardest time trying to figure out how to get the game running because of this:

Screenshot from 2019-08-28 18:07:23

Try updating /home/andy/.config/unity3d/srylain Inc_/Clone Hero/prefs so that Screenmanager Resolution Use Native is 1 instead of 0.

@kira-bruneau
Copy link
Contributor Author

kira-bruneau commented Aug 28, 2019

@ajs124 If you look into /home/andy/.config/unity3d/srylain Inc_/Clone Hero/Player.log, you will probably see that it's setting your resolution to 1x1 pixels.

@kira-bruneau
Copy link
Contributor Author

kira-bruneau commented Aug 28, 2019

If you have other problems you can try running strace /nix/store/zmxy4v4x3165bv3pm2vigwjxy9n4l8v9-clonehero-user-wrapper.

This will show if some libraries failed to load, or some expected file is missing. I used this to find the runtime dependencies and fix text rendering issues on the keybinding configuration screen.

@ajs124
Copy link
Member

ajs124 commented Aug 28, 2019

I just deleted .config/unity3d/srylain Inc_, which got the output working, but not it just says "Failed to initialize audio device". Although that might be a problem with my setup, I guess.

@kira-bruneau
Copy link
Contributor Author

kira-bruneau commented Aug 28, 2019

@ajs124 Does the game not launch at all?

I have the following sound configuration in my configuration.nix:

{
  sound.enable = true;
  hardware.pulseaudio.enable = true;
}

@ajs124
Copy link
Member

ajs124 commented Aug 28, 2019

It didn't, but now it decided to work. This is one finicky piece of software… well, I'd say with that, this package probably looks good to me. I'm surprised you got it running at all.

@kira-bruneau
Copy link
Contributor Author

kira-bruneau commented Aug 28, 2019

I managed to get it working without any patches using steam-run. From there I just added libraries and other fixes until it matched the behaviour with steam-run.

Hopefully once you have it running it'll be more stable. It's been pretty stable for me once I worked out the issues.

@kira-bruneau
Copy link
Contributor Author

kira-bruneau commented Aug 28, 2019

@ajs124 It looks like the game requires pulseaudio. After removing hardware.pulseaudio.enable = true from my configuration.nix I ran into the following problem:

Screenshot from 2019-08-28 17:13:13

I had the same issue before adding alsaLib, so I'll try to see if the game tries to load some other library when pulseaudio is not available.

@kira-bruneau
Copy link
Contributor Author

kira-bruneau commented Aug 28, 2019

@ajs124 After looking into the issue further I found that I just needed to configure my default card.

I found it through aplay -l

card 1: Generic [HD-Audio Generic], device 0: ALC1220 Analog [ALC1220 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: Generic [HD-Audio Generic], device 1: ALC1220 Digital [ALC1220 Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

Then set it in my configuration.nix with:

{
  sound.enable = true;
  sound.extraConfig = ''
   defaults.pcm.card 1
   defaults.ctl.card 1
  '';
}

@stale
Copy link

stale bot commented Jun 1, 2020

Thank you for your contributions.
This has been automatically marked as stale because it has had no activity for 180 days.
If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity.
Here are suggestions that might help resolve this more quickly:

  1. Search for maintainers and people that previously touched the
    related code and @ mention them in a comment.
  2. Ask on the NixOS Discourse. 3. Ask on the #nixos channel on
    irc.freenode.net.

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 1, 2020
@ajs124
Copy link
Member

ajs124 commented Jun 1, 2020

I'm still interested in this, I just didn't really get around to playing clonehero much and therefore haven't managed to look into debugging this.

My audio setup is also pretty weird, if it works for 1-2 other people and there are no complaints about the package itself, this is good to go IMO.

@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 1, 2020
@kira-bruneau
Copy link
Contributor Author

kira-bruneau commented Jun 1, 2020

I would still like to get this merged in. I was just waiting on others to verify the package and review the changes. v.23.2.2 is out now, so I'll push an update.

@kira-bruneau
Copy link
Contributor Author

kira-bruneau commented Jul 22, 2020

Formatted with nixpkgs-fmt

@pikajude
Copy link
Contributor

Hey, I would like to have this too.

@kira-bruneau kira-bruneau changed the title clonehero: init at v0.22.5 clonehero: init at v0.23.2.2 Sep 24, 2020
@lukegb
Copy link
Contributor

lukegb commented Nov 25, 2020

Result of nixpkgs-review pr 67643 1

2 packages built:
  • clonehero
  • clonehero-unwrapped

@lukegb
Copy link
Contributor

lukegb commented Nov 25, 2020

Ran it with "clonehero"; ran for me and started playing sound (and I could open the keybind menu), although I couldn't actually navigate the menu.

@kira-bruneau
Copy link
Contributor Author

kira-bruneau commented Nov 26, 2020

@lukegb It's not really designed for keyboard use, but before you do anything, you first you have to select a profile. Which you can select by pressing Enter.

@thiagokokada
Copy link
Contributor

Result of nixpkgs-review pr 67643 1

2 packages built:
  • clonehero
  • clonehero-unwrapped

@thiagokokada
Copy link
Contributor

thiagokokada commented Dec 29, 2020

LGTM. Also did a play test with keyboard, seems fine (and I really suck at this game BTW).

Also, while this PR is from August 2019 it is up-to-date, so I think we should merge this.

@SuperSandro2000 WDYT?

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-already-reviewed/2617/312

@kira-bruneau
Copy link
Contributor Author

kira-bruneau commented Dec 30, 2020

@thiagokokada Thank you for your review! Yeah, I've been watching the RSS feed of their blog, but there hasn't been an update since November 25, 2019. Also, it's a lot easier with a guitar controller 😉

@SuperSandro2000 SuperSandro2000 changed the title clonehero: init at v0.23.2.2 clonehero: init at 0.23.2.2 Dec 30, 2020
@SuperSandro2000
Copy link
Member

Result of nixpkgs-review pr 67643 run on x86_64-linux 1

2 packages built:
  • clonehero
  • clonehero-unwrapped

@nh2 nh2 merged commit a8f2b9f into NixOS:master Dec 31, 2020
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.

None yet

9 participants