Giter Club home page Giter Club logo

Comments (6)

leognon avatar leognon commented on July 30, 2024

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.

Maingron avatar Maingron commented on July 30, 2024

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.

leognon avatar leognon commented on July 30, 2024

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.

Maingron avatar Maingron commented on July 30, 2024

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.

leognon avatar leognon commented on July 30, 2024

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.

leognon avatar leognon commented on July 30, 2024

Thanks to @SuperC03 controller support has been added!

from tritris.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.