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

Outdated dependencies #2

Open
0-wiz-0 opened this issue May 17, 2024 · 6 comments
Open

Outdated dependencies #2

0-wiz-0 opened this issue May 17, 2024 · 6 comments

Comments

@0-wiz-0
Copy link

0-wiz-0 commented May 17, 2024

Hi! I'm trying to package this for pkgsrc.
I have two bigger problems:

github.com/hajimehoshi/oto
# github.com/hajimehoshi/oto
../.gopath/pkg/mod/github.com/hajimehoshi/[email protected]/context.go:69:12: undefined: newDriver

oto 0.7.1 does not support NetBSD. The current version is 3.2.0, versions from 2.0.0 do support NetBSD.

github.com/caarlos0/sshmarshal
# github.com/caarlos0/sshmarshal
../.gopath/pkg/mod/github.com/caarlos0/[email protected]/marshal.go:29:6: MarshalPrivateKey already declared through dot-import of package ssh ("golang.org/x/crypto/ssh")
        ../.gopath/pkg/mod/golang.org/x/[email protected]/ssh/keys.go:302:6: other declaration of MarshalPrivateKey
../.gopath/pkg/mod/github.com/caarlos0/[email protected]/marshal.go:35:6: MarshalPrivateKeyWithPassphrase already declared through dot-import of package ssh ("golang.org/x/crypto/ssh")
        ../.gopath/pkg/mod/golang.org/x/[email protected]/ssh/keys.go:308:6: other declaration of MarshalPrivateKeyWithPassphrase
*** Error code 1

This project is dead. Its github page says:

This is now merged into x/crypto!

which explains the error message quite well.

@BigJk
Copy link
Owner

BigJk commented May 17, 2024

Hey!

  • I just committed a version bump that should fix the crypto problem
  • Regarding oto. You can try building the project with go build -tags no_audio, which should disable any usage of oto

If this doesn't solve the problems just let me know and I will dig deeper :)

@0-wiz-0
Copy link
Author

0-wiz-0 commented May 17, 2024

Thanks, that helped!
Now I see

# github.com/BigJk/end_of_eden/cmd/game_win
/usr/pkg/go121/pkg/tool/netbsd_amd64/link: running gcc failed: exit status 1
ld: cannot find -ldl: No such file or directory

On NetBSD (and macOS and other BSDs), dlopen() and friends are in libc, not libdl.
I'm not sure where the -ldl comes from, any suggestions?

(I've worked around it in the package.)
Next: which files should be installed? I see

bin/definitions
bin/docs
bin/fuzzy_tester
bin/game
bin/game_ssh
bin/game_win
bin/tester

Thanks!

@0-wiz-0
Copy link
Author

0-wiz-0 commented May 17, 2024

I'll just keep on adding stuff here, let me know if you want different tickets:

  • I ran game but it needed assets installed under a relative path. Do I understand correctly that game needs to be run in the directory where assets are? Is anything else needed?
  • after nearly losing against two cleaning bots, I picked up a new card in a ? room, losing my remaining two hit points. The game only noticed after the next time I took a (0 point) hit from a monster in a fight (in round three!), and then I got an unknown state error about game-over (something like that) before I got the you lost screen.
  • something's not completely right with my terminal settings, I often don't see what I have selected (except when there are bigger changes like when the card "pops up". I also don't know how to select targets or end turns without the mouse.

@BigJk
Copy link
Owner

BigJk commented May 17, 2024

Feel free to just keep dumping stuff here 😄

  • The game_win building problem is because of the bundled terminal emulator that is using https://github.com/hajimehoshi/ebiten for rendering and requires cgo. Not sure how ebiten works or needs to be setup on NetBSD
  • You probably want to distribute the bin/game (terminal version) and the bin/game_win (windowed version with a bundled minimal terminal emulator). The other binaries are only useful for developing the game or advanced mod creators.
  • Yep atm assets should be in the working directory of the game
  • The game is still very experimental and more a POC what could be done in the terminal, so there are probably a whole bunch of errors like that at the moment. I will keep investigate that one further when I find the time 👍
  • Hm... What terminal are you using? You should be able to use TAB and the arrow keys to navigate the cards and enemies. ENTER to select a card/action. SPACE to end a turn.

@0-wiz-0
Copy link
Author

0-wiz-0 commented May 17, 2024

Hm, I tried building ebiten 2.6.3 (the one that's currently used by end_of_eden) and didn't get an error. How can I find out which dependency wants to add -ldl?
(ebiten main doesn't work on NetBSD right now because of ebitengine/purego#249 though.)
Ah, one more bug report for your code:

  • I used Knockout on a Cleaning Bot that was already in its Block phase, but it still had 2 block in the current and next round.
  • I used the 'Upgrade a card' action in a ? room but didn't lose 5HP like promised.
  • I had a couple Unknown State: RANDOM stops already, nothing seems to work when that happens.

As for terminal: I don't remember the detailed settings for my first try. Now I'm using iTerm2 on macOS, ssh to NetBSD, end_of_eden runs there. TERM is tmux-direct. Thanks for the tip with SPACE, that helps. I think I'm missing some text because my terminal default is black on white. I just tried white on black and I now think that the game requires this setting - I could see all text :)

@BigJk
Copy link
Owner

BigJk commented May 17, 2024

  • Regarding -ldl I'm not sure from the top of my head. If you can build the terminal version (./cmd/game) without the -ldl problem then I can only assume that it is still a ebiten problem. Did you successfully compile and run a ebiten example?
  • I found the problem with the missing damage. Thanks :)
  • Unknown State: RANDOM is happening if no next content could be found. This is because most of the games content is still completely missing
  • Regarding the terminal. I probably need to force the white on black from the games side but it would take a while to go through all the printing and set everything to white. I will put it on my bucketlist though

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

No branches or pull requests

2 participants