admin管理员组文章数量:1024717
Background: making a choose your own adventure type game, but as a website. Based on choice A or B (only 2 choices) the story will go that direction.
The setup: Let's say 5 phones, used for inputs Big screen, used to display video and the questions Basically like kahoot to this point.
So, I want to collect the inputs from the phones, get the majority lets say A, send that to the big screen to continue the story in the correct direction.
How would I go about this? I would like it to have a live updates, can be on intervals, not constant.
I would prefer to use JS based frameworks and mongoDB. It needs to be all online too, not locally.
Thanks in advance!
I've used chatgpt but then it only worked locally and didn't use a DB i believe. It used AJAX, NODE.js, Express. I asked to make it usable online, but it started talking about several things I've never heard about like heroku and time is ticking...
Background: making a choose your own adventure type game, but as a website. Based on choice A or B (only 2 choices) the story will go that direction.
The setup: Let's say 5 phones, used for inputs Big screen, used to display video and the questions Basically like kahoot to this point.
So, I want to collect the inputs from the phones, get the majority lets say A, send that to the big screen to continue the story in the correct direction.
How would I go about this? I would like it to have a live updates, can be on intervals, not constant.
I would prefer to use JS based frameworks and mongoDB. It needs to be all online too, not locally.
Thanks in advance!
I've used chatgpt but then it only worked locally and didn't use a DB i believe. It used AJAX, NODE.js, Express. I asked to make it usable online, but it started talking about several things I've never heard about like heroku and time is ticking...
Share Improve this question asked Nov 18, 2024 at 12:50 Li-MingLi-Ming 11 Answer
Reset to default 0I think the chatgpt thing is a good draft, maybe you have to do some improvements to do.
With node.js you can create a backend server, that gives a rest-api for communicating with your db. Phones can call this rest-api to update the counter and your big screen can fetch in a given intervall, from your backend server to give a live-update. (This concept is called AJAX) Make sure to track session IDs and maybe some sort of uuid to ensure every phone can give only one vote on each decision and to relate the phones to the correct big screen. (If you want that multiple games can be done simultaniously)
Express is just a node.js Framework so you haven't to write that much code on your own.
If something is unclear do not hesitate do ask, I will update the answer.
But please keep in mind that SO is not the place to give you hundreds line of code, so you do not have to write them at your own. If you have a problem with your code, make a new question, post a minimal example, that reproduce the error. Describe what it should do, what you have tried to solve it, etc.
https://stackoverflow/help/how-to-ask
Background: making a choose your own adventure type game, but as a website. Based on choice A or B (only 2 choices) the story will go that direction.
The setup: Let's say 5 phones, used for inputs Big screen, used to display video and the questions Basically like kahoot to this point.
So, I want to collect the inputs from the phones, get the majority lets say A, send that to the big screen to continue the story in the correct direction.
How would I go about this? I would like it to have a live updates, can be on intervals, not constant.
I would prefer to use JS based frameworks and mongoDB. It needs to be all online too, not locally.
Thanks in advance!
I've used chatgpt but then it only worked locally and didn't use a DB i believe. It used AJAX, NODE.js, Express. I asked to make it usable online, but it started talking about several things I've never heard about like heroku and time is ticking...
Background: making a choose your own adventure type game, but as a website. Based on choice A or B (only 2 choices) the story will go that direction.
The setup: Let's say 5 phones, used for inputs Big screen, used to display video and the questions Basically like kahoot to this point.
So, I want to collect the inputs from the phones, get the majority lets say A, send that to the big screen to continue the story in the correct direction.
How would I go about this? I would like it to have a live updates, can be on intervals, not constant.
I would prefer to use JS based frameworks and mongoDB. It needs to be all online too, not locally.
Thanks in advance!
I've used chatgpt but then it only worked locally and didn't use a DB i believe. It used AJAX, NODE.js, Express. I asked to make it usable online, but it started talking about several things I've never heard about like heroku and time is ticking...
Share Improve this question asked Nov 18, 2024 at 12:50 Li-MingLi-Ming 11 Answer
Reset to default 0I think the chatgpt thing is a good draft, maybe you have to do some improvements to do.
With node.js you can create a backend server, that gives a rest-api for communicating with your db. Phones can call this rest-api to update the counter and your big screen can fetch in a given intervall, from your backend server to give a live-update. (This concept is called AJAX) Make sure to track session IDs and maybe some sort of uuid to ensure every phone can give only one vote on each decision and to relate the phones to the correct big screen. (If you want that multiple games can be done simultaniously)
Express is just a node.js Framework so you haven't to write that much code on your own.
If something is unclear do not hesitate do ask, I will update the answer.
But please keep in mind that SO is not the place to give you hundreds line of code, so you do not have to write them at your own. If you have a problem with your code, make a new question, post a minimal example, that reproduce the error. Describe what it should do, what you have tried to solve it, etc.
https://stackoverflow/help/how-to-ask
本文标签: databaseTrying to connect input devices to a DB to an output device on the webStack Overflow
版权声明:本文标题:database - Trying to connect input devices to a DB to an output device on the web - Stack Overflow 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://it.en369.cn/questions/1745616990a2159350.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论