The Castle Doctrine Forums

Discuss the massively-multiplayer home defense game.

You are not logged in.

#1 2016-10-25 14:47:00

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

New "cheatproof" test server

I've implemented the ideas in the "sockproofing" thread, and have set up a
server.

The intention is to adapt the game to make cheating impossible, while
preserving as much as possible of the core of the original.

In short: robberies take place on the server, so map hack and undo cheats are
impossible. Then there are a variety of changes to make it unproblematic for
players to have multiple accounts. The most dramatic changes to keep in mind
are:
    * The initial $2000 is for building only; any leftover will disappear once
      you've designed your initial house.
    * In order to go robbing, you need to equip a "backpack", a new tool at
      the start of the tool list.
    * If you "die" while robbing, you only lose your tools (backpack
      included), not your life or house.
    * If you "die" during self-test, there's no consequence at all. You can
      just try again. You can still be ashamed.

It would be great if people tested it out. To do so, please go to
    http://thegonz.net/~tcd/
and register.

You'll need to obtain the modified client - you can find a windows build from
the above link, and instructions for obtaining the source.

Once on the server, you're very welcome to try to cheat. You should fail.

You can also just try to play the game properly. You should succeed.

Last edited by zed (2016-10-29 07:20:56)

Offline

#2 2016-11-01 14:08:31

cullman
Member
Registered: 2014-03-21
Posts: 424

Re: New "cheatproof" test server

I will check this out, has anyone else come?  Once we get our server side version working, which may be bouyed by your code, then I'm going to start advertising the game.

Offline

#3 2016-11-02 09:39:12

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

Re: New "cheatproof" test server

No real activity thus far.

Offline

#4 2017-02-10 14:10:36

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

Re: New "cheatproof" test server

Wow... I've never regretted making my stuff open source!  Amazing work here.

Thank you, Zed.  Will check it out this weekend (late to the party, I know...)

Offline

#5 2017-02-11 10:28:48

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

Re: New "cheatproof" test server

I like how the building balance is brown... like it's made of wood!

So... where does the red -200 come from after you leave your house and return?


And how the heck can this thing get off the ground?

I can't buy a backpack to rob, because I have no money.  Neither can anyone else, right?

Offline

#6 2017-02-11 10:34:51

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

Re: New "cheatproof" test server

The red -200 should be the reserve you're forced to leave in your house for others to rob.

There's no elegant mechanism for bootstrapping implemented - currently I have all the money! If you leave your house checked in, I'll suicide in there to give you some.

Offline

#7 2017-02-11 11:00:10

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

Re: New "cheatproof" test server

Okay... so the only way to get money in the game is to design a house with the initial 2000 that actually KILLS people, right?

Well, I should say, the only way to get backpacks is to design a house that kills people.  Those can be sold for money, then, or used to rob.

But people can't see that my house has 0 in it when they try to rob it?


How is value not destroyed when I use one-time tools while robbing?

And do we have the deflationary economy thing in place where you periodically (randomly) adjust everyone's balances to keep a total of $10K in the game?

Offline

#8 2017-02-11 11:01:01

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

Re: New "cheatproof" test server

Oh, wait, you died in my house with 25 backpacks?

Offline

#9 2017-02-11 11:30:51

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

Re: New "cheatproof" test server

Yes, initial houses have to be able to kill... I haven't done any rebalancing of costs, I don't know if that would be necessary.

The house list shows only the money sunk into the house itself, not what's in the vault.

Value is destroyed, and the periodic rescaling of the economy is in place. The "steady state" thing was a blind alley.

And yes, I gave you 25 backpacks, and you repaid my generosity by robbing me blind ;)

So how playable is it from across the ocean?

Last edited by zed (2017-02-11 11:31:15)

Offline

#10 2017-02-11 11:37:28

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

Re: New "cheatproof" test server

Well, I do notice a slight lag when taking a step robbing.  But it makes it feel more "thinky," so that's okay.

Something weird happens with the shroud, though.  When the map pans to a new, unseen area with walls that you don't know about, you see empty floor for a second before the map is received and you see the walls there, causing the shroud to come back.

Also, you take a step and THEN see the dogs move afterward.

Have you thought about waiting for the response from the server BEFORE showing the player's move happen?  I know it would feel less responsive, but maybe you need to show an icon (arrow near the player) to confirm that the move is in progress.  Then show the move happen once the map changes have been received by the server.  Then everything would be visually consistent (just a slow-to-respond version of the original look and feel).

Offline

#11 2017-02-11 11:39:34

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

Re: New "cheatproof" test server

Getting a lot of "someone else is in that house" messages.  Why are they showing up on the list if that's the case?

Offline

#12 2017-02-11 11:45:34

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

Re: New "cheatproof" test server

How the heck did you guess the timing in my house?  CHEATER!  smile

Offline

#13 2017-02-11 11:48:52

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

Re: New "cheatproof" test server

Yes, I was worried about it feeling unresponsive if nothing happened when you pressed a key. The arrow is a good idea though, that could work.

"Someone else is in that house" is the error message it gives, due to my inexcusable laziness, if the headless server doesn't respond. So I guess that's probably a bug, sorry!

EDIT: But actually, I checked my logs, and it doesn't seem to have been the headless server misbehaving. So I don't have an explanation.

Last edited by zed (2017-02-11 12:16:45)

Offline

#14 2017-02-11 11:49:58

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

Re: New "cheatproof" test server

Well I guess I could have cheated... but actually I just observed. The timing mechanism was in plain view. Terribly sporting of you.

Offline

#15 2017-02-11 12:33:10

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

Re: New "cheatproof" test server

Oh crap, you're right!

Offline

#16 2017-02-11 14:37:59

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

Re: New "cheatproof" test server

Okay, Zed old sport!  I cleaned you out, along with everyone else in the game, and built a fortress to hold my wealth.

It seems that without the Mayor constantly infusing the game with "gift" money, this will happen eventually.  No one can currently afford to even come into my house, as far as I can tell, and no houses are worth me going into.

Offline

#17 2017-02-11 14:55:34

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

Re: New "cheatproof" test server

Yep, you've quite thoroughly won!

I don't know what should be done in such a situation... I can't see a way to redistribute your wealth which wouldn't advantage sock puppeteers.

As it is, there's still one thing I can do, which I probably will just because I want to see your fortress: I can edit the database to gift myself some of your money.

Anyway, I guess we've learnt that $100000 is far too big an economy when there are only two players. It could automatically scale to the number of active players; that's gameable, Sybil attacking yet again, but maybe it wouldn't matter too much.

Anyway, thanks for playing!

Offline

#18 2017-02-11 19:36:56

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

Re: New "cheatproof" test server

Yeah, it's interesting that in fixing one problem, another problem is created.

Offline

#19 2017-02-12 02:17:17

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

Re: New "cheatproof" test server

Isn't that always the way? For now I've just hand-reset the total cash to 10000, and will give out small grants to any other genuine humans who want to give this version of the game a go.

As a lure to them - it seems Jason has left a genuine Rohrer Original on the server! I explored it a little, enough to see that there's quite a bit to it, but spending more than $2000 on scouting felt like cheating.

Offline

#20 2017-02-12 05:15:53

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

Re: New "cheatproof" test server

Some thoughts on solving the problem of "victory" - that is, one player ending
up with all the money.

The first problem is how even to detect it, given that the money may be
distributed across multiple accounts owned by the same player. For this, I'm
thinking it could work to make it an *explicit* victory condition which
players are encouraged to aim for. That could be done just by showing players
how close they are to the goal - if an account has a significant proportion of
the total cash in the economy, then when showing them their balance, show it
along with the total, e.g. as "$33423/$100000". This should encourage them to
get it to the maximum if they can. Then, replace the 'suicide' button with a
'retire' button.

If a player retires, they can get some sort of "you have won" message, and
then the problem is how to distribute their money to other players. I don't
think there's any neat solution to that; here's my less-than-neat solution.
Once a player retires their house becomes 'abandoned'. Abandoned houses can
only be entered without a backpack, can only be entered toollessly, and
multiple simultaneous checkouts are allowed. On becoming abandoned, the family
moves out and the wife loot is transferred to the vault. Moreover, some/all of
the vault cash is randomly scattered around the house (placed on the path of
the self-test solution) in the form of "mini-vaults" - implemented as an
overlay rather than a tile or a mobile, lest they interfere with the operation
of the house's traps. The first to reach a mini-vault gets a proportion of the
house's vault cash, and it's then deleted from subsequent checkouts. The house
layout is not saved on successful robbery, even of the main vault.

The idea is that players will race to explore the house toollessly, working
out piece-by-piece the original solution, and being rewarded as they manage to
explore more of the house.

Of course the original owner, now playing from a fresh start, could go in and
clear out their old house... but hopefully the futility of that will quickly
become apparent!

Retired houses can be marked as such in the house list, and shown with the
amount of loot left in them. So once they're cleared out, they can remain
permanently at the bottom of the list for people to have fun trying to beat
toollessly - having your house preserved in this way is the reward for
"winning".

The mechanism can be adapted to handle the related problem that all the cash
in the game could end up in the hands of players who've stopped actually
playing the game - after N days of absence, a player's house could become
'abandoned' with similar effects to the above, but with tool use allowed and
with the house deleted from the list once cleared out. It's still important
not to save damage, lest that leave the house in an unsolvable state.

With these changes implemented, it looks like the game could once again be
maintenance-free for the server operator. Maybe I'll have a go at implementing
it if I get bored some time...

Last edited by zed (2017-02-12 05:52:25)

Offline

#21 2017-02-12 13:04:41

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

Re: New "cheatproof" test server

Remind me why players need to buy a backpack to go robbing?

Why can't they rob a house "bareback" with nothing at all?

What does the $200 backpack requirement have to do with the conservation of value or sockpuppets?

You also have created a system in which the vast majority of players create $2000 houses with nothing to steal inside of them!  But of course there's no way to tell this from the outside.  So even after you get enough money to start robbing, most of your robberies produce $0 on success.

And if you place the burden on the admin to "gift" people starting money to kick the whole thing off, then the admin needs to detect the difference between real players and sock puppets.  Otherwise, double account players get twice the gift money as single account players.  Putting you back to square one.



Let's start from first principles again:

For the game to make sense, robbing a listed house has to be worthwhile and produce some benefit.

If robbing a house produces some benefit, than any account that figures out how to rob the house will reap that benefit.

An account that is colluding with the owner-account of the house in question has an advantage in that they can ask the owner for advice on how to rob the house.  Therefore, they can unfairly reap the benefit of robbing the house before non-colluding players figure it out and reap the benefit.

Your way of fixing this problem is to attach a benefit ONLY to one house in the game, Zed's house, so that you have control over the information about that house and can ensure that no other player has an unfair advantage in reaping that benefit.

But you then allow players to create a bunch of other houses, freely, for which there can be no inherent benefit to robbing.  On the house list, these houses are indistinguishable from your house, causing people to try robbing them pointlessly anyway.  But they can't afford to do any robbing unless they have successfully robbed your house to get some money.  And they can't afford to rob your house in the first place!


SO... for this to really work, the admin, or his trusted, non-player team, needs to produce a constant stream of houses with god-given money inside of them.  No one but the trusted non-player team should have access to information about how to beat these houses.

To avoid a bunch of waste-of-time player-created houses, players should start with $0 when they start the game.  They should immediately go out robbing, and rob repeatedly until they finally get some money, and then be motivated to build security to protect it.  Their family is safe until they have money, because who would bother robbing them?

Conservation of value isn't necessary.  Money CAN be created all the time, but only from sources that the players have no control over or information about.

As players rob your "seed" houses, more and more player-created houses will be built and be worth robbing.  However, sockpuppets still have no use, because of where the money came from originally.  Sock puppets can't create money.  They can only steal it for real from either a real seed house OR from a player who stole it for real from a seed house or from some other real player.  Yes, you can have multiple accounts, and freely transfer fairly-stolen real money between them, but this gives you no unfair advantage (aside from reducing your risk of a total wipe-out through diversification).

This is essentially what you have now, but there was only one seed house, and a fixed sum of money.

And you can't re-use seed houses.  I already robbed your main house, so if you re-fill it with money, I'll have a huge advantage when I go to rob it again.  I robbed you twice, even after you made changes, don't forget.


So, this makes maintaining the game a ton of work for the admins!

But you really don't want people wasting their time robbing $0 starter houses.  And you've gotta get rid of the $200 backpack thing, because starting players can't afford it anyway, so it's really not going to help to put seed money in the $0 houses through robber deaths.



I wonder if an algorithm for randomly generating the seed houses could work...  Then the thing could run itself.  It might not even matter if the seed houses are solvable without tools.  The harder ones would naturally grow in value as players die with more and more tools in them.  And don't forget, all of those tools were "earned" for real with legit money stolen from other seed houses.  Some seed houses can be very easy, and they will be robbed right away for a small amount of money.

Seed houses don't need families in them....  and they wouldn't look hand-designed.  They could even have a different name on them, like STATE HOUSE #257.

And then you can go back to listing the actual robbable value on each house in the list (because there's no reason to trick someone into robbing a $0 house anymore).

And maybe seed houses would only be added when the list of non-$0 player houses shrinks below some level.  Thus, once things heat up, players can't keep grinding easy seed houses forever.  They eventually have to rob other players to keep growing.

Offline

#22 2017-02-12 13:18:23

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

Re: New "cheatproof" test server

Summary:

To thwart "feeding" your main account with dummy side accounts, money can't be created by regular player accounts (Zed's version).  That means that money can only be created by admin-controlled accounts.  Admins can't "gift" money to player accounts either, because the admins can't tell the difference between real accounts and dummy accounts.  Thus, the admins must create a constant stream of new admin houses seeded with money, and money must flow into the rest of the player pool through legit robbery of these admin houses, not gifts.  To avoid the content-creation burden, perhaps these admin houses could be randomly generated, and they don't even need to be solvable without tools.  They could vary in difficulty, and the hardest ones will grow in value over time as more people die with tools while trying to rob them.

Offline

#23 2017-02-12 14:15:33

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

Re: New "cheatproof" test server

Computer generated seed houses are an interesting idea, and I don't see why
they couldn't work in principle. You're right that it's a hole in the argument
I gave for having no sources in the economy. Designing a house generator could
be fun. Still, I feel it's a crucial element of the game that the houses are
designed by humans, so I think it's worth fully exploring those parts of the
design space which keep that feature before abandoning it.

I continue to think that the solution I've implemented should work, perhaps
after some rebalancing and some tweaks of the kind discussed earlier in this
thread.

The idea is certainly *not* that Zed's house has some special role as the root
of all things. That's just an initial bootstrapping phase. The intention is to
have the system be self-sufficient, once it gets going.

Here's the thinking behind the backpacks and the reserves.

Players must not be allowed to rob the house of an active player without
risking anything. I'm basically taking that as an axiom, part of what the game
is meant to be. Permadeath may not be a necessary part of it, but I think
permafailure is. So that's where the backpacks come in - a minimal wager /
buy-in.

However, there can be no player-controlled sources of money, so in particular
new players must start with nothing. So how do players get hold of a backpack
so they can start robbing? By others attempting to rob their starter house,
but "dying" and leaving behind the backpack (and maybe tools) they came with.
But why would anyone try to rob a starter house? They need some reason to
think there might be a prize that's worth risking the price of a backpack to
reach. A self-referential answer would be: because they think others might
have tried to rob it, and left behind their tools, which the owner is yet to
have sold and sunk into the house. That almost could be enough in itself, if
players (rationally?) don't trust the rationality of their fellow players...
but I think there needs to be a simple rational reason to get it going.
Reserves, along with not displaying the loot value of a house, are meant to
provide that: when you rob a $2000ish house, as long as you're not unlucky
enough to be robbing a genuinely new house, or one which has already been
successfully robbed, there's sure to be a prize pool there which could be
worth a punt. Currently the numbers are a $200 reserve on a fresh $2000 house,
and $500 purchase value for a backpack (sale value of $400). Does it make
sense to risk $500 for a possibility of $200? Given that you can control how
much actual risk you put yourself in through careful play, I think many
players would consider it worth the risk. Then when I consider that many of
those players wouldn't be as good as they think they are, and would have
accidentally died, even someone as risk averse as me might consider all the
tools those others might have left in the vault and think it worth the risk
too.

That's the idea. Obviously it's predicated on the fantasy of an active server
with a decent number of players. I don't know how many it would need... I'd
guess a minimum of around 6.

Offline

#24 2017-02-12 14:33:51

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

Re: New "cheatproof" test server

Well, I think you should be thinking inductively here.  If it doesn't work for N=2, it's not going to work for larger N either.

I get why you need to risk something to rob, to avoid robber spamming.  And chill timers can be bypassed with sockpuppet accounts.

But if you're "gifting" people money in the game, then sockpuppet accounts become valuable again!  Someone with extra accounts gets more gifts than someone with only one account.

What about if you only need a backpack if you're carrying stuff in, or carrying items out?  So you can take the money from the vault, but not the stuff, if you have no backpack?

You still want to prevent robber spamming, of course.


So you have to spend a valuable resource to rob, and there can't be a way for you to create that resource directly, or else you can create an infinite amount of it through dummy accounts.  There also can be no automated (or manual!) way of doling out this scarce resource, because then people with multiple accounts will be more likely to get more of it.

I still feel like this leads to the conclusion that:  "The only way to get 'new' money is to steal it from someone else," where we have to guarantee that "someone else" isn't actually you, yourself.  And the only way we can guarantee that is if "someone else" is Zed.  Then only Zed can cheat, but we trust him not to.

Or if Santa Zed dies while trying to rob your house.  But that feels much less satisfying, because it involves sitting and waiting.  And Santa Zed is more likely to pick your house to die in if you have multiple accounts.

What if you only need a backpack to rob player houses, and not Zed's house?  So robber spam is permitted Chez Zed?


What is another way for money to flow into the economy that doesn't give a benefit to multiple accounts?

A cash machine that gives out a certain amount per hour, and you just walk up to it and get it?  That obviously rewards refresh-spamming and is no fun, but multiple accounts won't help.

Offline

#25 2017-02-12 14:42:19

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

Re: New "cheatproof" test server

There should be no "gifting". That wasn't an intended part of the system, that
was just a hack to get it up and running. There is the problem that this could
be required more than once, due to fluctuations in activity or to "winning".
The abandoned/retired houses scheme described above is meant to replace the
need for admin involvement in such cases - if the server goes through a
dormant phase and then some people start playing again, they'll be able to get
cash by toollessly robbing the abandoned houses left from the last period of
activity. So actually that's a bit like your "seed" houses, but
player-generated.

Being able to explore a house without wagering anything is just as bad as
being able to rob it - you send in your sock puppet(s) to find the route to
the vault, then go in with your real account to clear it out.

I don't see your inductive argument - could you explain the step from n to n+1?

Last edited by zed (2017-02-12 14:44:16)

Offline

Board footer

Powered by FluxBB 1.5.8