-
Notifications
You must be signed in to change notification settings - Fork 56
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
Is compatible with mobile devices? #78
Comments
Hey there, I’ve never tried to make it compatible with mobile but it’s a fun idea :) |
Yes, very fun :D In which part can I start? |
So I haven’t touched this project in quite some time and it’s not by any means an exemplary project as an FYI. Just something fun I did in college :) The player event handlers are all in Player.js here https://github.com/Larkenx/Rotten-Soup/blob/master/src/assets/js/game/entities/actors/Player.js and use ROT.js as a convenient enum for the key codes. You could try and add mobile events here somehow |
https://github.com/Larkenx/Rotten-Soup/blob/master/src/assets/js/game/entities/actors/Player.js Event handling is done here. Event handlers are added and removed before and after a player makes a move or “acts”. you could add some mobile event listening code there I think but I’ve never done anything like that before. alternatively could try writing a little “controller” Vue component in the UI code that triggers player events somehow but that sounds tricky too |
lastly the code for resizing the game screen is probably really not mobile friendly and would have to be extensively refactored |
I opened on my mobile and I got these problems:
Is it possible to make some javascript changes to enable mobile compatibility? If someone shows me the right way, I think I can do it!
Thanks
The text was updated successfully, but these errors were encountered: