Home LittleBigPlanet 2 - 3 - Vita - Karting LittleBigPlanet 2 [LBP2] Help!
#1
Anti-cheat for rhythm game?
Archive: 8 posts
I'm making a rhythm game. The set up is like this: Ive got a randomizer attached to four emitters that emit X,O, square and triangle shapes from them. On each shape, ive got a microchip with two tag sensors. One tag sensor is connected to a destroyer and a score giver with a +100. The other is connected to a sound effect and a score giver with a -100. Beneath these emitters is a bar with a controllinator connected to four tags corresponding to the first tag sensor on the shapes. Each corresponding button is connected to the tag corresponding the to the shape that matches the button (X button beneath the X shape, etc etc) Beneath this bar is another bar that has four tags corresponding to the second tag sensor on the shapes. So basically, it works like this: the shape falls to the bar where the player presses the button matching the shape when it hits the bar, thus making it dissapear and garnering 100 points. But if the shape passes the bar and hits the second one, the player loses 100 points. This all works perfectly. but i realized that a player could cheat if he just randomly mashed all the face buttons or just simply held all of them throughout the level. Ive been racking my brain trying to figure out how to solve this but everything ive tried seems to have failed. Here's one idea that should work, but for some reason doesn't. Ive got the X button on the controllinator as one of the inputs of an XOR gate and the other input is a tag sensor with a small radius. Then I have the corresponding tag on one of the shapes. And Ive got the gate outputted to a score giver with -100. What I want to happen is that when I press X when the object is not there, the player will lose 100 points, but when the object IS there the player won't lose 100 points but actually gains 100 points. The player DOES lose 100 points when the object isnt there but when it is, there's three, sometimes two "-100" flashing above the player with one "100 points" flashing. Sometimes one of the "-100" flashes above the microchip where the XOR gate is, even though Ive got "display over player" selected. just though Id mention it. Can someone tell me why this is not working? Or maybe suggest something else I could do? I'd be sure to credit you once this level is published. | 2011-07-26 08:36:00 Author: Unknown User |
Sounds like you're almost there. One thing you could do is turn the key inputs into pulses, meaning a key press will only result in the shortest of signals, and holding it won't be registered. You can do this by connecting the button to a counter set to count to 1, and connecting the counter's output to the counter's reset. Another thing that might help is preventing multiple key presses at the same time. Place a XOR gate and wire the four buttons into it, then its output should only become active when exactly one button is pressed. Place an AND gate for each button, wire the button (or pulse) into one side and the XOR output into the other, and all multiple inputs should be surpressed. | 2011-07-26 09:47:00 Author: Rogar Posts: 2284 |
@Rogar Thanks but it only solves half the problem. Players cant hold down a button but they can still mash the buttons. And the second thing you said doesn't work, there are certain patterns where you need to press two or more buttons at the same time. But I still need help with the mashing thing, I can't figure it out. Can you help me with that? I'd also prefer it if the player loses 100 points when they press a button when the shape isnt there. | 2011-07-26 12:14:00 Author: Unknown User |
Route the outputs from the four buttons via a four-port selector before going on to the rest of the logic, which should ensure that only one can be active at a time. | 2011-07-26 14:45:00 Author: Aya042 Posts: 2870 |
4-port selector works as an alternative to my XOR solution, but since he does want multiple inputs at times, neither works. Try this: wire the button pulse to a microchip's bottom input. On the microchip put a tag sensor, connect it to a +100 score giver, and connect it through a NOT gate to a -100 score giver. Do this for each of the 4 buttons. Each time you press a button, the corresponding microchip becomes active, and if its tag sensor sees that button's tag it should add 100 points, otherwise it should subtract 100. | 2011-07-26 16:32:00 Author: Rogar Posts: 2284 |
..he does want multiple inputs at times... Really? I see no mention of that in the OP. | 2011-07-26 16:37:00 Author: Aya042 Posts: 2870 |
It's in the double post reply you merged: And the second thing you said doesn't work, there are certain patterns where you need to press two or more buttons at the same time. | 2011-07-26 20:54:00 Author: Rogar Posts: 2284 |
Try this: wire the button pulse to a microchip's bottom input. On the microchip put a tag sensor, connect it to a +100 score giver, and connect it through a NOT gate to a -100 score giver. Do this for each of the 4 buttons. Each time you press a button, the corresponding microchip becomes active, and if its tag sensor sees that button's tag it should add 100 points, otherwise it should subtract 100. Whoa, that works perfectly! Thanks man! Strike that. Now the destroyer isn't working... Strike that strike. Got it working. Thanks guys. | 2011-07-28 05:01:00 Author: Unknown User |
LBPCentral Archive Statistics
Posts: 1077139
Threads: 69970
Members: 9661
Archive-Date: 2019-01-19
Datenschutz
Aus dem Archiv wurden alle persönlichen Daten wie Name, Anschrift, Email etc. - aber auch sämtliche Inhalte wie z.B. persönliche Nachrichten - entfernt.
Die Nutzung dieser Webseite erfolgt ohne Speicherung personenbezogener Daten. Es werden keinerlei Cookies, Logs, 3rd-Party-Plugins etc. verwendet.
Die Nutzung dieser Webseite erfolgt ohne Speicherung personenbezogener Daten. Es werden keinerlei Cookies, Logs, 3rd-Party-Plugins etc. verwendet.