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

True keyboard mode #17

Open
Tenchi2xh opened this issue Apr 23, 2017 · 7 comments
Open

True keyboard mode #17

Tenchi2xh opened this issue Apr 23, 2017 · 7 comments
Assignees

Comments

@Tenchi2xh
Copy link

Something I felt terribly missing from the original Pico8 was the lack of true keyboard support. I had tons of ideas that I could just not implement because there was no real keyboard input (create a tiny terminal, text adventure, an OS etc.)

Could it be possible to have a true keyboard mode, either activated programatically or with an environment variable?

That would effectively extend PX8 to be a Fantasy Microcomputer in addition to a Fantasy Console!

@hallucino hallucino self-assigned this Apr 23, 2017
@hallucino
Copy link
Member

Have you some example to have a better understanding ?

@Tenchi2xh
Copy link
Author

Basically a mode where when you boot, you don't have 2 joypads, but instead each key on the keyboard is a different event.

For example, instead of btn(4) and btn(5) being the two buttons on the controller for example, btn(n) would represent the key of ASCII n being pressed.

@Tenchi2xh
Copy link
Author

Tenchi2xh commented Apr 23, 2017

So if I want to make a game where you move using the W A S D keys (Z Q S D in France I think) I would have something like (in Python):

if btn(119):   # or more easily btn(ord('w'))
  # go up
elif btn(115):
  # go down
...

@hallucino
Copy link
Member

It seems a good idea, I need to figure out how to do that

@hallucino hallucino added this to the 0.0.4 milestone Apr 30, 2017
hallucino added a commit that referenced this issue May 18, 2017
@hallucino
Copy link
Member

You could try this feature with:
btn('a') or btnp('a') for example, it should work with python

@hallucino
Copy link
Member

hallucino commented May 19, 2017

  • Add API
  • Add python binding
  • add the lua binding
  • add the doc

@hallucino
Copy link
Member

@Tenchi2xh do you want to test it ?

@hallucino hallucino modified the milestones: 0.0.5, 0.0.4 Jul 14, 2017
@hallucino hallucino removed this from the 0.0.5 milestone Jan 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants