Open jrichardsz opened 3 years ago
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