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

Is compatible with mobile devices? #78

Open
jrichardsz opened this issue Nov 7, 2020 · 5 comments
Open

Is compatible with mobile devices? #78

jrichardsz opened this issue Nov 7, 2020 · 5 comments

Comments

@jrichardsz
Copy link

I opened on my mobile and I got these problems:

  • Is not responsive
  • After the character selection, a black screen appear and nothing happens
  • After approximately 1 minute, map appears
  • After that, I can't see my character. I think is because the not responsive behaviour
  • Map does not response to the touch actions

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

@Larkenx
Copy link
Owner

Larkenx commented Nov 7, 2020

Hey there, I’ve never tried to make it compatible with mobile but it’s a fun idea :)

@jrichardsz
Copy link
Author

Yes, very fun :D

In which part can I start?

@Larkenx
Copy link
Owner

Larkenx commented Nov 17, 2020

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

@Larkenx
Copy link
Owner

Larkenx commented Nov 17, 2020

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

@Larkenx
Copy link
Owner

Larkenx commented Nov 17, 2020

lastly the code for resizing the game screen is probably really not mobile friendly and would have to be extensively refactored

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants