One of the online development of ghost-hunting games, the development of ghost-hunting games
Friends who have seen a well-known mango TV program should be "who is undercover" will not be unfamiliar: N people involved, N-1 people get the same word (such as steamed buns ), when one person gets another word (such as Steamed Stuffed Bun), N people can only see their own words, so no one knows whether they are different from what others describe. The game uses the rotating speech system and tries its best to describe the words in its hands, so that they are not suspected, and they cannot let the real undercover guess that they are different from others until they guess who is undercover.
What's interesting about such games is thatThe scale of the description must be clear and not broken.The machine is more important than human intelligence ).
Catch ghostsThis game is similar and a bit like a killing game: [thanks to Zhang Rui, Wuhan, for bringing joy to our game, ruige V5]
Standard 9: 4 good people(For example, the word "man" is obtained)2 idiots(For example, the word "mom" is obtained)3 ghosts(The obtained content is: Ghost (2 words), which means you have drawn a ghost. This question contains 2 words)
Smart, you must have noticed that,The ghost doesn't know what this question is,Even animals? Scenario? And so on,Only two words are known, so:
Good people and idiots are in A group (although they do not know each other). Good people and idiots should work together to vote for all the ghosts after each round of speeches, and then win;
The ghost will pretend to be himself and will not be discovered. At the same time, in every round of speeches, he will fool everyone and himself to vote for good people or idiots until the number of people and ghosts match the number of ghosts at that time, or when a ghost dies, you can have a chance to guess what words a good guy uses (guessing that an idiot does not count as a victory). if you guess, the ghost will also count as a win, and this opportunity can be accumulated.
What is accumulation? There are three ghosts in total. When the first ghost was found and thrown to death, he had a chance to guess, but he thought the information was not clear and he could choose not to guess, when the Second ghost is thrown to death, there will be two chances. Similarly, if the second ghost is not guessed, there will be three chances when the third ghost is thrown to death. Of course, A ghost cannot communicate in the game process, that is, Whoever guesses it, and others do not talk nonsense.
Of course there is another judge, but the game development here replaces the judge role. Oh, by the way, when I played this game with my classmates, I realized thatWhat does a good question mean?After listening to the rules, I will elaborate on my questions.
The process is as follows:
JUDGE: Everybody is sitting around (queue or linked list or array is planned in the program to solve the sequence problem). Everyone has drawn nine pieces of paper I have written (the program's system sends random words, word Library maintenance), okay, please close your eyes in the dark (use the typical statement of the killing game ~), Ask the ghost to discuss who to start speaking.
Three ghosts: (quietly communicate with each other and determine the speaker) (in online games, the ghost typing and communication process will be added to facilitateLet's see 2.0 of the tricks, Which will be explained later)
JUDGE: Okay, please close your eyes. Open your eyes at dawn, and speak from A. Each round of speech can be used to describe words in your hands, comment on others' words, and summarize and analyze the situation on the spot ).
A :...... (The program takes turns to speak in queue order. One speaker can be seen by others, but others cannot speak until the Over button is clicked at)
JUDGE: Okay. Now we will start the second round of speech or start A (for the first time, we will make two rounds of speech and vote for the next round)
JUDGE: Give one minute to consider, start voting, raise your hand for the first time, do not follow the ticket, you can discard (of course, it is easy to do not follow the ticket in the program, set the result to be displayed only when the player clicks the drop or drop button)
JUDGE: Okay. C has been thrown out (assuming C has been cast). C is not a ghost (not a good person or an idiot). C can leave his last words (only the first dead devil can leave his last words, none of the dead following have their last words, and none of them have their last words. They can only guess words directly. So here is a ghost adventure technique, that is, the first round of suicide, to seize this last word opportunity. Haha, we should not discuss game skills here ~ It is easy to design in the program. Let C speak. Other people may not speak on JQ or the server side)
JUDGE: Okay. Start from D (starting from the next of the dead)
JUDGE: the old rule, one minute to consider, starts voting.
JUDGE: Okay. H is thrown out. H is a ghost. Guess it.
JUDGE: Sorry, I didn't guess. I started to speak.
JUDGE: the old rule, one minute to consider, starts voting.
JUDGE: Okay. A and F share the same number of votes. Now we are entering the PK stage. A speaks first (in the order of the last round), and then F speaks again.
JUDGE: Okay. Now, except for A and F, other people begin to vote and cannot withdraw. (if there is still A waiver, the game may not be able to play in an endless loop)
JUDGE: Okay. F is thrown to death. (if the remaining four vote with the same vote, A and F will speak again until there is A result ), F is not a ghost and has no last words (the first non-ghost has a last words). Please G start to speak.
The author will not go into details below. If I have no estimation or error, the above may already exist.
(1) All ghosts are thrown to death, and good people and idiots win;
(2) The word is guessed by any ghost, and the ghost wins;
(3) when there are good people + idiots = number of ghosts, the ghost wins (the ghost votes with the same heart, and then the ghost wins ).
Note (for better gaming, it has nothing to do with the program and can be skipped ):
(1) What does a good question mean?: In this example, the question is,ManAndMom, If yesManAndWomen(The two words are similar, and can easily guess the other word when you see one word), good people and idiots are easy to hold together, it is not fair to know nothing about the ghost. If yesBuildingAndCell(The two words are far away, basically there is no simple connection), the ghost is easy to fish, good people and idiots find their companions too much.
(2) Tips: Generally, it is better to have two or three words. For uncommon words, please let the judge enjoy it by yourself (for example, professional words such as cursor and object orientation, it is too difficult and difficult to have verse words such as mother-in-law and youzi, you can't guess it in your life ). First think of a common word, such as"Sea", The word is easy to associate with" rivers "," Mountains "," oceans "and other directly related terms. The second word starts from these Lenovo words, for example,"Green trees"(The same scenario, instead of thinking about tigers in the mountains, is very tiring for different categories ~), SoSeaAndGreen treesIs a set of good questions that are fair to both parties. It is best to select good words (such as the sea) that are easy to guess, and not silly words (such as green trees ).
(3) Let's get a 2.0 million figure.: This is a game skill, mainly written to expand your thinking. Tricks: Specify one of the three ghosts to speak first, and the three ghosts collude with each other to assume that they have a word (such as eyes ), then, throughout the game, we kept describing it around our eyes, confused our opponents with a certain aura, and voted with the same heart. It seems that ghosts are dominant, right? Tell you a piece of data. We have finished the model for nearly ten rounds of 2.0, only one dangerous victory, one victory (three ghosts are alive ), others were thrown to death because they were found to be a nonsense description.
(Just jump here. Here is the technical selection)
Okay, the business process has been described. Let's start the technical selection next step (select your sister, I will go to C #. Isn't the three-month Java program for catching up with the duck? Don't you have to choose ...... [Grievance])
C # + MVC is initially set. net + JQ + XML storage, in fact, the best commercial result is HTML5 + SinglePage, put in play, but this round of the game is coming soon 20 minutes, slow for a few hours, it is not suitable for fragmented entertainment time on mobile terminals. Otherwise, you will not speak for 10 minutes on the toilet, and the other eight people will leave early, so you should entertain acquaintances. Alas, every time these idea are considered to be commercially appropriate, it will become increasingly inappropriate. Let's move the focus back to the technology:
The three layers won't work. The business objects are placed in the Model. XML mainly stores the question library and configures game parameters. (During the test, the number of good people, idiots, and ghosts can be reduced by one, 6-person mode at to facilitate testing). JQ and AttributeFilter are used to restrict random speeches. In analyticdb 1.0, whether to allow audience watching is not considered, the overall participation is a bit like a QQ game entering a certain table in a room. Then, sit down and wait for everyone to open.
Haha, how is it? I am cheated. If I want to make an online version of this interface, it will be a little embarrassing. At that time, these images will all be links with blue underscores ~ The programmer is not an artist, you know!
At this point, this article "Introduction to the game process and technical selection" has been completed, and we are sure you are still away from it, so let's review the game process again, it would be better to show the six-person version with pen and eraser. If you know the game stage and roles, you can start to consider howDesign the division of duties of business objects and objectsThat is, the content to be updated in the next article, which will slightly involve the design model, but I do not mean to be humble, so I hope to receive technical feedback from everyone, in addition, you can give some advice, as shown in the following figure: "You can't read the XX book, who wrote it, and then do this division of duties, can't we do a few DDD projects to ensure program stability? "in this case, I would like to thank you!
OK. I want to review the error message in this article!