The Castle Doctrine Forums

Discuss the massively-multiplayer home defense game.

You are not logged in.

#1 2013-06-07 09:12:34

metaldev
Member
Registered: 2013-06-04
Posts: 22

anti-magic dance and police

I would like to post some brainstorm i had this morning about the game:

1) magic dance houses where you have to move to certain coordinates before proceeding have been mentioned and i agree they are annoying.
I feel like showing all blueprints is kind of a 80% solution to this.  Maybe I am wrong, but here are some possible suggestions:
- having pets only chase you on a line of sight type rule, (maybe the same type of rule that that applies to the family vs exit)
- pets meow/bark revealing the area around them as soon as they start reacting to you (this is kind of like jason's 32 slots idea for revealing the map)
If these types of things are implemented,  maybe the feeling of the older versions can be restored... where the blueprint is only revealed to what you have seen in the house, and you can explore it.  Anyway this is just an idea, but I am pretty sure this would end most magic dance houses even without knowing the entire blueprint.


2) once your house has been robbed, it really is like losing everything because once this happens you will just get raped over and over until you have nothing.  It is probably almost never worth continuing. Imo this nullifies one of the more interesting choices of the game:  Is my life worth continuing?
Suppose houses get "swarmed by police" (x number of police units are dispersed randomly into the house) after a successful robbery or murder, maybe the number can be based on how bad the robbery/murder was.  policeman = pitbull logic + gun.  They would disappear after the owner returns and has a chance to fix things.  It would be very hard or impossible to do anything in there with police.  Now, picture a scenario where I am robbing a house, and I have found access to the safe.   I now have an interesting decision:  do i forgo the safe and get the wife first? or do i stop the risk and call it a day? I know that the police will arrive as soon as I touch the safe, so i must decide now if i want to go for gold.

Last edited by metaldev (2013-06-07 09:26:24)

Offline

#2 2013-06-07 10:58:17

ukuko
Member
Registered: 2013-04-06
Posts: 334

Re: anti-magic dance and police

metaldev wrote:

Suppose houses get "swarmed by police"

I've thought about this myself as a reason to stop a robber returning to the scene of the crime before the owner has returned. A message saying something like 'It's not safe for you to return to this house right now.' would suffice without having to introduce any complicated new game mechanics.

I'm still on the fence about whether this would be a good thing or not, though.

Offline

#3 2013-06-07 11:42:04

metaldev
Member
Registered: 2013-06-04
Posts: 22

Re: anti-magic dance and police

ukuko wrote:
metaldev wrote:

Suppose houses get "swarmed by police"

I've thought about this myself as a reason to stop a robber returning to the scene of the crime before the owner has returned. A message saying something like 'It's not safe for you to return to this house right now.' would suffice without having to introduce any complicated new game mechanics.

I'm still on the fence about whether this would be a good thing or not, though.

Yea... i thought about the message first too.   The reason i thought adding actual police units is better is twofold:
1) If implemented, it is still at least (in principle) possible to get more out of the house:  if you can get a police to go into a trap or they happen to spawn in places that don't hinder you.   So the idea that you can double burglarize is preserved - it should just be VERY hard,  and even HARDER each time with more police spawned (and as a bonus: even suggests the often improbable and chaotic consequences of real-life robberies and murders with the random placement of police)

2)  assuming the code is reasonably written, i wouldn't imagine would be too hard to add.  The feature would consist of:
- allowing a pitbull to use a gun against the player
- drawing the policeman assets
- modify the server to spawn police into a house after successful robbery
- balancing the # of police spawned based on the robbery/murder events

But of course this isn't my code and i could be talking out of my butt.

Last edited by metaldev (2013-06-07 11:45:54)

Offline

#4 2013-06-07 15:53:36

Matrix
Member
Registered: 2013-04-06
Posts: 137

Re: anti-magic dance and police

metaldev wrote:

2)  assuming the code is reasonably written, i wouldn't imagine would be too hard to add.  The feature would consist of:
- allowing a pitbull to use a gun against the player
- drawing the policeman assets

Yes, how fast this would be implemented is indeed related to how well the code is written.

However this

metaldev wrote:

- modify the server to spawn police into a house after successful robbery

is pretty much not related to the quality of the code. This is a different kind of problem.

For example, if I show you a specific house and tell you to place 3 policemen inside you will probably show those 3 spots right away and you would probably have no problems explaining the logic/rules behind it (i.e. why you placed them exactly where you did). But image that then I change the "challenge" slightly and I ask you to tell me those same placement rules for an arbitrary house. You would probably list the same rules and add a few more that would be suitable for other house designs, but there is probably a specific house where all those rules would fail (i.e. no policemen would be placed). The hard part is coming up with a non-trivial ruleset where it's guaranteed that it can be applied to any of the possible houses.

Offline

#5 2013-06-07 16:31:03

metaldev
Member
Registered: 2013-06-04
Posts: 22

Re: anti-magic dance and police

Matrix wrote:

how you a specific house and tell you to place 3 policemen inside you will probably show those 3 spots right away and you would probably have no problems explaining the logic/rules behind it (i.e. why you placed them exactly where you did). But image that then I change the "challenge" slightly and I ask you to tell me those same placement rules for an arbitrary house. You would probably list the same rules and add a few more that would be suitable for other house designs, but there is probably a specific house where all those rules would fail (i.e. no policemen would be placed). The hard part is coming up with a non-trivial ruleset where it's guaranteed that it can be applied to any of the possible houses.

I agree. i don't think it is reasonable to try to place them logically in any house with code.   
That is why I think it should just choose random blank spaces to put them in (and the worse the crime the more units get added).  Trivial? Yes. But randomness can be very powerful, and is very often mistaken for intelligence.

Offline

#6 2013-06-07 16:36:22

metaldev
Member
Registered: 2013-06-04
Posts: 22

Re: anti-magic dance and police

Actually - now that I think of it, it could be a nice violation of the game MO.   
The game is 100% deterministic. 
Except:  when you commit a serious crime,  the consequences can never be fully predicted.

Offline

#7 2013-06-07 23:44:21

jasonrohrer
Administrator
Registered: 2013-04-01
Posts: 1,235

Re: anti-magic dance and police

Having pets "turn on" only after they see you would indeed thwart magic-dance stuff.  But it wouldn't help at all with combination locks (so blueprints would still be needed).

The idea about police spawning it investigate the scene is a really good one.  It sounds like you're talking about this happening to the house itself once it is robbed once (so that all subsequent robbers will encounter police), but others in this thread are assuming the police only effect the robber upon returning (and not other players who try to rob it).

Anyway, in terms of solving the core problem (one player exploiting a house by hitting it over and over), it's easy enough to solve that problem by simply removing the house from that player's list (fully consistent from that player's point of view---"the house is gone because I already robbed it once").

Offline

#8 2013-06-08 07:59:15

metaldev
Member
Registered: 2013-06-04
Posts: 22

Re: anti-magic dance and police

jasonrohrer wrote:

  It sounds like you're talking about this happening to the house itself once it is robbed once (so that all subsequent robbers will encounter police)

Yes, that is exactly what i meant. 
(and also you wouldn't need to remove the house from the original robber's list, since the police would strike a balance between artificially hiding the house and completely cleaning out the owner.)

Last edited by metaldev (2013-06-08 08:06:51)

Offline

#9 2013-06-08 21:43:18

metaldev
Member
Registered: 2013-06-04
Posts: 22

Re: anti-magic dance and police

I just thought of another suggestion of using the police mechanic to fight magic dance:

Suppose that insta-death placement traps were either cut or weren't outright fatal.
Instead they simply set off an "alarm" (a timer)
If the alarm is set off,  you have x moves before the police arrive (spawned either randomly or at the door by the server).  This still lets you have magic dance if you want,  but makes it much less effective.
These police would take a long time to go away to let this robber return.

Offline

#10 2013-06-10 11:26:49

jasonrohrer
Administrator
Registered: 2013-04-01
Posts: 1,235

Re: anti-magic dance and police

Wait, how are magic dance and the police suggestion related?

Police are a way of making all houses one-time robbable (or hard to rob a second time).

Magic dance is a problem with house design (very easy for house designer to set up a house where you have to move in a particular pattern to unlock something).

I have considered the "alarm" mechanic, maybe even with a separate alarm object that could be triggered by electricity and start a count-down to either reach the vault or get out.  However, I worry that such a mechanic would only strengthen an owner's ability to make a house that must be solved in exactly one way.  Imagine if the only way into a house set off the alarm, giving you 20 steps left, and there's some "magic" 20 steps that will lead you right to the vault, if you know what they are.  Pretty easy to design a house like that.  Not interesting to rob a house like that.  I.e., alarms would make magic-dance design even worse.

There's also the problem of the owner self-testing their own alarm.  Getting killed by your own dog is one thing (it happens in real life!), but getting "arrested" for setting off your own alarm during a self-test?  That would be pretty weird.

Offline

#11 2013-06-10 12:04:12

metaldev
Member
Registered: 2013-06-04
Posts: 22

Re: anti-magic dance and police

Yes, I agree with your critiques of this idea.
I didn't consider that having x steps left could be used to make it be the ONLY way to solve a puzzle - thereby making magic dance WORSE.

The more I think about it,  the more I think that adding some randomness to the animal movement could be the solution to magic dance.
- It would make it impossible to make a step by step magic dance.   
- It makes sense that you can't perfectly predict pet behavior.

There will probably still be magic dance but it won't be possible to make it grid-to-grid accurate,  and therefore won't be very intricate.
Pit bulls will become very dangerous, and therefore more judiciously deployed (and even more feared by robbers - kinda realistic too).

just my thoughts.

Offline

#12 2013-06-10 12:33:50

jasonrohrer
Administrator
Registered: 2013-04-01
Posts: 1,235

Re: anti-magic dance and police

Well, that is an interesting idea!

However, with so much at stake in this game (you lose everything, including hours of work, at the hands of death), I really like the idea that it's always fair and never random.

You make a valid point, though: the owner would be facing the same randomness and risk when deploying animals, so would have to deploy them carefully.

Offline

#13 2013-06-10 12:35:42

ukuko
Member
Registered: 2013-04-06
Posts: 334

Re: anti-magic dance and police

If animal movement had random elements you'd be faced with the problem of a non-repeatable self-test.

Offline

#14 2013-06-10 13:30:44

metaldev
Member
Registered: 2013-06-04
Posts: 22

Re: anti-magic dance and police

ukuko wrote:

If animal movement had random elements you'd be faced with the problem of a non-repeatable self-test.

That's true in theory,  but what if the server gives the client the random seed that was used in the successful test?

Offline

#15 2013-06-10 13:41:30

jasonrohrer
Administrator
Registered: 2013-04-01
Posts: 1,235

Re: anti-magic dance and police

Yeah, that's the way it would work, a seed would go along with the map for all self tests (and all robbery tapes).

However, I think Ukuko means that the owner would not be able to count on a reliable "solution" to their own house!

Also, I should point out that, while random animal movement might help somewhat with magic dance designs, it wouldn't address combination locks.

Offline

#16 2013-06-10 13:52:09

DrNoid
Member
Registered: 2013-04-06
Posts: 56

Re: anti-magic dance and police

I've got quite some experience with avoiding cheating with random number generators in games, and it's hard. I've made an open-source clone of GemTD that is pretty much cheat proof: http://usoog.com/games/gem-tower-defence Source code: http://dev.usoog.com/projects/gemtd/repository

The problem is: If you give the client the seed, the client knows how the dog is going to move and can thus easily adapt to it. If you don't give the client the seed, but only the numbers, the client can still ask for the next 50 random numbers and thus know how the dog is going to move.

So, you have to give the client numbers, one at a time, and those numbers have to depend on the state of the house, meaning that if he asks for a number, and then changes the state of the house to make that number work better, the number is no longer valid. One option would be to calculate the MD5sum of the house, pass that to the server together with the request for the next random number, the server does some freaky math with the MD5sum and the state of the RNG to get to the next random number and passes that back to the client.

Of course this means a round-trip to the server for every move. That would requite quite a different implementation, as HTTP requests are not going to be fast enough for that.

Offline

#17 2013-06-10 13:56:29

metaldev
Member
Registered: 2013-06-04
Posts: 22

Re: anti-magic dance and police

jasonrohrer wrote:

However, I think Ukuko means that the owner would not be able to count on a reliable "solution" to their own house!

That's true, but it would have to be this way by definition to leave out magic dances.  The solutions would have to be 'general'.  If they want a very specific solution, they would have to take that random risk themselves (highly unlikely).

jasonrohrer wrote:

Also, I should point out that, while random animal movement might help somewhat with magic dance designs, it wouldn't address combination locks.

I think your infinite backpack idea could really balance this.  Will blueprints still be available to show things that the player has explored?

Offline

#18 2013-06-10 14:00:43

jasonrohrer
Administrator
Registered: 2013-04-01
Posts: 1,235

Re: anti-magic dance and police

For the time being, the plan was to just disable blueprints and see how it goes.

Offline

#19 2013-06-10 14:05:28

zed
Member
Registered: 2013-04-16
Posts: 171

Re: anti-magic dance and police

There's another problem with using randomness with fixed seeds. You could
build a house whose solution depended on knowing the precise movement of some
hidden pets. The designer would keep rolling new seeds, or fiddling with the
setup of the pets if the seed is fixed, until the movement was as wanted. A
robber would have no idea how the pets were going to move, so wouldn't have a
hope of solving the puzzle.

Offline

#20 2013-06-10 14:14:48

metaldev
Member
Registered: 2013-06-04
Posts: 22

Re: anti-magic dance and police

zed wrote:

There's another problem with using randomness with fixed seeds. You could
build a house whose solution depended on knowing the precise movement of some
hidden pets. The designer would keep rolling new seeds, or fiddling with the
setup of the pets if the seed is fixed, until the movement was as wanted. A
robber would have no idea how the pets were going to move, so wouldn't have a
hope of solving the puzzle.

I don't think this is possible if a new seed is rolled on every self test. 
Or maybe I am misunderstanding you?


EDIT:  yes think i see what you mean,  if the pet is not life threatening and simply hitting buttons you could, at least in principle, make an even more arbitrary magic dance if you rolled rolled rolled on your self test.

Last edited by metaldev (2013-06-10 14:20:07)

Offline

Board footer

Powered by FluxBB 1.5.8