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

Calling some code when player gets hurt #25

Closed
gfwilliams opened this issue May 9, 2017 · 1 comment
Closed

Calling some code when player gets hurt #25

gfwilliams opened this issue May 9, 2017 · 1 comment

Comments

@gfwilliams
Copy link

Hi,

I've been playing around trying to add 'force feedback' to games with a shock machine controlled via Web Bluetooth, and QuakeJS looked like an awesome game to try and add it to.

Would it be possible for me to add such a thing? Is there anywhere obvious in the code that I could read the current player health from?

I had a quick look around but didn't find anything, and I have a feeling that Q3 uses a virtual machine for the game logic, so I'm not entirely certain if something like the health would be accessible in any meaningful way? The only thing I can think of right now is to try and intercept the draw calls for the HUD, but that's properly hacky.

Sorry for posting this as an 'issue', but I thought the answer might be of interest to others as well.

Thanks!

@inolen
Copy link
Owner

inolen commented Nov 14, 2017

To do this, you would definitely have to modify the game source to call into the appropriate web APIs and recompile.

@inolen inolen closed this as completed Nov 14, 2017
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