Speak now
Please Wait Image Converting Into Text...
Embark on a journey of knowledge! Take the quiz and earn valuable credits.
Challenge yourself and boost your learning! Start the quiz now to earn credits.
Unlock your potential! Begin the quiz, answer questions, and accumulate credits along the way.
General Tech Bugs & Fixes 2 years ago
Posted on 16 Aug 2022, this text provides information on Bugs & Fixes related to General Tech. Please note that while accuracy is prioritized, the data presented might not be entirely correct or up-to-date. This information is offered for general knowledge and informational purposes only, and should not be considered as a substitute for professional advice.
Turn Your Knowledge into Earnings.
I'm working on a simple round&web-based multiplayer game. The idea of the game is very simple: The players get an array of audio files which they listen to and write the transcripts for in 5 minutes. the player who sends in the most right transcripts gets the most points. its fairly simple and i was able to implement it locally. at the moment i have the .php file which lets me do all this but only in single player. what i'm trying to say is that whenever a player logs him/herself in, the page is loaded anew. what i want to do is to start the game from the server everytime 3-5 players log themselves in, so that the players can play at the same time and their results can be compared at the end of the round.
the thing is, i don't know how to start with this session or server/client model for a multiplayer game. i have read that php isn't ideal for web based multiplayer games because real time data exchange could be problematic, but since that is not really the case here i don't think that should be a major problem. i googled my problem but i have failed to find a solution. any help or advice would be much appreciated. cheers.
edit: is a node.js server what i'm looking for here?
Socket.io/node.js is precisely what you want. If you want to start a tad simpler, you could use ajax and an timeout to poll the server every 30 seconds or whatever time period to get a response concerning other players around. So really either take the active approach with socket "The server has just told me someone joined, someone answered, etc" or the passive ajax approach "Let me ask the server if anything has happened."
No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.
General Tech 10 Answers
General Tech 7 Answers
General Tech 3 Answers
General Tech 9 Answers
General Tech 2 Answers
Ready to take your education and career to the next level? Register today and join our growing community of learners and professionals.