close
The Wayback Machine - https://web.archive.org/web/20201014025801/https://github.com/nesbox/TIC-80/issues/1162
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

btnp/btn functions not responding in certain carts on master #1162

Closed
technomancy opened this issue Sep 5, 2020 · 2 comments
Closed

btnp/btn functions not responding in certain carts on master #1162

technomancy opened this issue Sep 5, 2020 · 2 comments

Comments

@technomancy
Copy link
Contributor

@technomancy technomancy commented Sep 5, 2020

While I was testing #1161 I with some games written in Fennel I noticed that in certain carts, the btnp and btn functions seemed to never return true. Most carts it worked fine, but in Amethyst Waters (https://stefandevai.itch.io/amethyst-waters) I was unable to begin the game. It also came up with my Conway's Life implementation: https://tic.computer/play?cart=656

I bisected the history and found that this bug was introduced in #810. Prior to that patch, these carts both worked fine.

@nesbox
Copy link
Owner

@nesbox nesbox commented Sep 6, 2020

Amethyst Waters uses --input: keyboard tag and Conway's Life uses --input: mouse which means only these declared input types will be allowed in a game and btn() API won't work.
So, it's not a bug, it just wasn't working in 0.70 but works now :)

@technomancy
Copy link
Contributor Author

@technomancy technomancy commented Sep 6, 2020

Aha, I see! Thanks for the explanation.

So for Amethyst Waters the solution is rather simple; replace btn with key. For Life, it will be a bigger change since some kind of purely-mouse-based menu system will be needed for commands that used to use btnp.

In any case, I will close this since it's not a bug. However, I foresee this causing surprises to other cart authors. Perhaps this change could be made clearer on the release notes?

@technomancy technomancy closed this Sep 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.