Comments (6)
I believe controller support will be possible using the gamepad API. I can look into this, but I don't have a controller to connect to my computer so it may be difficult to test.
from tritris.
I don't really have experience with the gamepad API yet, but I should be able to help with that.
I'll finish a current project first, because I have so many open project's and then I'll give it a try. Might still take a while though.
Would you accept pull requests regarding this?
from tritris.
I have created a separate function for handling input (https://github.com/Goel25/tritris/blob/main/utility.js#L30). This should make it easier to add controller support. You'll just have to connect the controller, then in that function, if a controller is connected, return a boolean value of whether the button on the controller corresponding to keyCode
is pressed.
from tritris.
I'm sorry I didn't have time for this yet.
Am currently drowning in a massive backlog with urgent stuff crashing in. I've rescheduled my go-to date to the end of July but it will probably be delayed even further :/
from tritris.
No worries! Multiplayer will be released in a few weeks and, if you've done it by then, I can transfer the gamepad support to there as well.
from tritris.
Thanks to @SuperC03 controller support has been added!
from tritris.
Related Issues (12)
- Hard drop HOT 1
- Something feels off when trying to move a piece last second HOT 2
- Multiplayer support HOT 1
- Control variety HOT 1
- Make the pieces less sticky HOT 1
- Error when clicking any button on game page (prevents Tritris from playing) HOT 1
- No license HOT 1
- Mobile Controls HOT 10
- keyboard layout HOT 2
- lookahead display HOT 4
- The documentation doesn't make "phasing" very clear. HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tritris.