Author Topic: Auto Log Out Hunters  (Read 2934 times)

Snailbrain

  • Developer
  • Hero Member
  • *****
  • Posts: 987
    • View Profile
Auto Log Out Hunters
« on: September 14, 2015, 03:09:45 PM »
Discussed recently and further in the past (mithrilman called it sleep i think).

I've been contacted by someone with regards to him always forgetting his characters are in the game or not having time to get to a bank so is therefore losing his hunters.

After some conversion and also going over what has been discussed in the past e.g. using it to avoid pvp etc, i'd like to start a discussion to try to get something in to fix this issue some what (maybe with the next gameplay update).

Some ideas :

1. if player does not move after X blocks (100?) it auto refunds. (maybe with a toggle on off but may add some unnecessary complication).
2. A camp out button - you press and can camp out - costs a fee.

Any coins looted should be dropped on the floor, and maybe the fee should / could partly go into the game fund and partly drop on the floor.

There is still a risk of course of someone spawning near you.

wiggi

  • Global Moderator
  • Full Member
  • *****
  • Posts: 150
    • View Profile
Re: Auto Log Out Hunters
« Reply #1 on: September 16, 2015, 12:05:47 PM »
"Camp out" as in "log out" or actually camp at current position for some time?


Perhaps the game should have 1 (one) "bad bank" in addition to normal banks, if it moves it would go to the hunter with the longest idle time. Works like normal banks, but with an extra 10-30 HUCs fee.

Pros:
- It would be less obvious that the player is offline than waiting 100 blocks, because getting caught by it is sometimes unwanted.
- It's an additional (relatively harmless) gameplay element, not gameplay element replaced by button.
- Easy implementation. in KillSpawnArea, hunter coors are already checked against bank coors every block, and stay_in_spawn_area could count to 250 if idle but *not* on bank tile, then to 253 if on bank at which point the player despawns.

Mithril Man

  • Hero Member
  • *****
  • Posts: 589
    • View Profile
    • Mithril Man Web!
Re: Auto Log Out Hunters
« Reply #2 on: September 17, 2015, 10:31:57 AM »
1. if player does not move after X blocks (100?) it auto refunds. (maybe with a toggle on off but may add some unnecessary complication).
2. A camp out button - you press and can camp out - costs a fee.

Any coins looted should be dropped on the floor, and maybe the fee should / could partly go into the game fund and partly drop on the floor.

There is still a risk of course of someone spawning near you.


1 - it seems to me to be the easier and effective way (similar to the stay_on_spawn old variable that triggered destruct on spawn area)
2 - a "log off" sounds too exploitable except if it doesn't cause that a "logged out" hunter be impossible to unlock and if the effective logging out happens after some blocks (not less than 15 i'd say but maybe 30 sounds more opportune)

alternatively, similar to 1 but with dedicated, fixed little areas (that we could set as "non spawning area")


Perhaps the game should have 1 (one) "bad bank" in addition to normal banks, if it moves it would go to the hunter with the longest idle time. Works like normal banks, but with an extra 10-30 HUCs fee.

1 bank wouldn't help when more hunters has to be taken out (and it would happen even now with this little player base, when one player leave he need to logout all his hunters that are around the map)



anyway is not just about "logging out" but even to save someone in case of hardware failures (lack of connections, etc..) so when someone goes afk, the game try to save his investment, it sounds fair to me (this is why i asked about it in the past)



the "moving bank" thing is interesting tho, but not to fix this problem but about game mechanics.... a sort of "black hole(s)" that wander around the map, moving randomly (so players can't see kind of pending moves) and when it catch a hunter, the hunter has a chance of being killed OR teleport anywhere on a coin spawn area but removing all the coins he have eventually collected, sounds fun to me
« Last Edit: September 17, 2015, 10:38:16 AM by Mithril Man »
Alternative GUI client for Huntercoin http://www.mithrilman.com
HUC donation: HMSCYGYJ5wo9FiniVU4pXWGUu8E8PSmoHE
BTC donation: 1DKLf1QKAZ5njucq37pZhMRG67qXDP3vPC

wiggi

  • Global Moderator
  • Full Member
  • *****
  • Posts: 150
    • View Profile
Re: Auto Log Out Hunters
« Reply #3 on: September 17, 2015, 10:20:22 PM »
The problem could also be (partially) solved clientside, if the game clients have an "afk" mode. This wouldn't help against hardware failure and lack of connections,  but against "actually having to do something else than playing", which happens more often.

It's really a non-technical problem. If a client can
a) send hunters to banks if in range, and
b) defend the hunters (send destruct if it thinks the hunter will get hit by a destruct)
this will probably lead to unfair accusations. That because of this "bot" the game and the coin are ruined forever and such.

Mithril Man

  • Hero Member
  • *****
  • Posts: 589
    • View Profile
    • Mithril Man Web!
Re: Auto Log Out Hunters
« Reply #4 on: September 18, 2015, 12:44:07 AM »
The problem could also be (partially) solved clientside, if the game clients have an "afk" mode. This wouldn't help against hardware failure and lack of connections,  but against "actually having to do something else than playing", which happens more often.

It's really a non-technical problem. If a client can
a) send hunters to banks if in range, and
b) defend the hunters (send destruct if it thinks the hunter will get hit by a destruct)
this will probably lead to unfair accusations. That because of this "bot" the game and the coin are ruined forever and such.

my client already does that (a) and i'm working on b, using my behaviours system, but that's not a solution for, as you already noticed, power failures or hardware/software failures (or windows autoupdate :)
I've others publicly available behaviours that help you harvest areas, etc... i still have to record an "how to" video to explain how it works, but it's already available (and in the upcoming release it will be better than actual released version).
Using my behaviour i can even display custom informative grids (e.g one behaviour action can show you the estimated loot you'll get if you move on a queued path respect the actual path you are taking, or another one that shows you, sortable, the list of banks with the life remaining (useful when you need a bank near you and so you look that list to have an idea about how many banks are going to be removed, and so you can have a chance that a new one will pop up near you). Everything i'm implementing is thoward giving the ability to players to play with less stress and less presence, it isn't meant to be full automatized, even if i could implement that as well

my behaviour system is there to give every user the chance to automatize boring tasks or help playing without staring continuously on screen, but of course requires my client
If someone wants to use the official android client (btw i've tried it during vacation and it's really buggy) he couldn't have the help of anything automatized (tbh i had a plan about implementing a mobile client to command my client behaviours remotely, but didn't had time to go on that way atm)

I think that a blockchain game logic that preserve user investment is a plus that could be worthy to do, without being hard to be coded (simple rules)
this is why the mechanism of having the hunter recovered after an inactivity of XX blocks sounds fair to me
If the user wants then, could use my client or other intelligent clients that help him managing is troops while afk
« Last Edit: September 18, 2015, 12:49:18 AM by Mithril Man »
Alternative GUI client for Huntercoin http://www.mithrilman.com
HUC donation: HMSCYGYJ5wo9FiniVU4pXWGUu8E8PSmoHE
BTC donation: 1DKLf1QKAZ5njucq37pZhMRG67qXDP3vPC

Snailbrain

  • Developer
  • Hero Member
  • *****
  • Posts: 987
    • View Profile
Re: Auto Log Out Hunters
« Reply #5 on: September 30, 2015, 11:01:41 AM »
for no1

how many blocks?

a 10 huc fee (5%) also?




wiggi

  • Global Moderator
  • Full Member
  • *****
  • Posts: 150
    • View Profile
Re: Auto Log Out Hunters
« Reply #6 on: October 01, 2015, 03:59:27 PM »
for no1

how many blocks?

After 60 blocks idle. That's not too much hassle while playing, and normally (not the fully loaded center group standing directly at a bank) 1h idle+offline isn't very dangerous.


a 10 huc fee (5%) also?

Yes, without it the bank system would be pointless and the game dumbed down.

Auto logout takes care of the "risk of my internet suddenly dying" problem, and allows to stop playing reasonably fast.


Another thing, somewhat related because a no-combat savezone where a hunter would go while waiting for banks would also solve the second problem (but not the first),
following question:

"Would these 3 features, if implemented, have a potentially negative impact on the game or the coin (or would implementation be non-trivial/could cause stability issues)?"
1) a no-combat savezone for the purpose that a hunter can stay alive infinitely (in exchange for a spam protection fee or upkeep, and for this purpose it doesn't really matter where on the map it is)
2) a way to give loot ("loot.nAmount") to another hunter (like a standardized message "sending <integer number> miks to <name>" would cause Huntercoin protocol to actually transfer this amount)
and
3) relax the value range for waypoints from 0-501 to 0-9999, but the hunter would stand still if next one is not inside map.

I'll explain later why this is important. It's complicated... would like to hear cons first.

wiggi

  • Global Moderator
  • Full Member
  • *****
  • Posts: 150
    • View Profile
Re: Auto Log Out Hunters
« Reply #7 on: October 12, 2015, 11:49:31 PM »
There was  a "send coins from/to a specific hunter" thread, here:

http://forum.huntercoin.org/index.php/topic,168.msg1231.html#msg1231

Interesting to reread. It's not necessary to do it the very hard way, the payment can be done within the gamestate, not touching the blockchain at all.

If someone sends a payment (using the message field) the amount is deducted from their loot immediately, stored in a variable that is only valid while the current block is processed (in that proof-of-concept it was called "Merchant_sats_received") and given to the recipient, so:
Code: [Select]
                // process payments
                {
                    ch.loot.nAmount += Merchant_sats_received[tmp_m];

                    // avoid crash because game thinks this is a refund
                    if (ch.loot.collectedFirstBlock < 0)
                        ch.loot.collectedFirstBlock = outState.nHeight;
                    ch.loot.collectedLastBlock = outState.nHeight;

                    Merchant_sats_received[tmp_m] = 0;
                }

And because it's inconvenient to receive payments under constant threat of death, 4 comfy inns in the old unused bases would be useful. Then Mithril's competition (and pegged assets) can be added to Huntercoin without further protocol change.

domob

  • Developer
  • Sr. Member
  • *****
  • Posts: 284
    • View Profile
Re: Auto Log Out Hunters
« Reply #8 on: October 13, 2015, 06:20:53 AM »
There was  a "send coins from/to a specific hunter" thread, here:

http://forum.huntercoin.org/index.php/topic,168.msg1231.html#msg1231

Interesting to reread. It's not necessary to do it the very hard way, the payment can be done within the gamestate, not touching the blockchain at all.

Definitely possible, but I don't really see the reason why you would want to implement gamestate-only payments.  After all, isn't the blockchain basically made for payments and thus also the best way to do them?  What would be the advantages of using payments in the game instead of ordinary HUC transfers?
Use your Namecoin-ID as OpenID: https://nameid.org/
Donations: 1domobKsPZ5cWk2kXssD8p8ES1qffGUCm | HBkxA5QmYSATFoPN1wFk8eBkgwPpY97Mfu

wiggi

  • Global Moderator
  • Full Member
  • *****
  • Posts: 150
    • View Profile
Re: Auto Log Out Hunters
« Reply #9 on: October 13, 2015, 09:52:13 PM »
There was  a "send coins from/to a specific hunter" thread, here:

http://forum.huntercoin.org/index.php/topic,168.msg1231.html#msg1231

Interesting to reread. It's not necessary to do it the very hard way, the payment can be done within the gamestate, not touching the blockchain at all.

Definitely possible, but I don't really see the reason why you would want to implement gamestate-only payments.  After all, isn't the blockchain basically made for payments and thus also the best way to do them?  What would be the advantages of using payments in the game instead of ordinary HUC transfers?

Lots of things are easier if done in gamestate.

For example, a node compiled with additional variables in the gamestate is a perfectly valid Huntercoin client (after redownloading the blockchain).

And any code that only reads the standard Huc gamestate variables (but can read and write the additional ones) doesn't break compatibility. This can be additional gameplay elements, like hunters doing spirit walk and hunting the souls of other players. And the resulting resource (i.e. soul gems that let you level up and hunt better, in the Huc spirit world) is really a distributed, trustless resource. (while making that game was offline-singleplayer-game-easy)

The hunter-to-hunter payment is for trading such a thing within Huntercoin. Buyers and sellers would post quotes using only standard Huc (e.g. message field). Standing asks would execute instantly, send coins, get gems. Standing bids not, because the buyer must send an actual (standard Huc) tx, or the trade won't happen at all. So trading would be trustless. And could be done (in theory) from an unmodified Huc client.


When this distributed, trustless resource (that is not a coin ;) ) has a value, cheap or expensive, it can be used as collateral for an dollar pegged asset. I'll try to implement this, like in the poc, but with a twist: The total amount of coins gems given to the market maker NPC, divided by the amount given to all players must be larger than the max.leverage, so they can stabilize the value and support key levels with a buy wall.

Still compatible with normal Huntercoin.


Of course it's possible to send normal blockchain payments to the hunter's player address instead of hunter-to-hunter payment. But then it's more difficult for users (requires more UI programming) and not possible to determine with certainty which "hunter" sent it and should get something in exchange.

wiggi

  • Global Moderator
  • Full Member
  • *****
  • Posts: 150
    • View Profile
Re: Auto Log Out Hunters
« Reply #10 on: October 18, 2015, 05:47:26 PM »
For example, a node compiled with additional variables in the gamestate is a perfectly valid Huntercoin client (after redownloading the blockchain).

Works without blockchain redownload actually, only with game.dat deleted.

I tried this in the testnet, spawning, death tax, transferring hunters back and forth between nodes with different gamestate, banking. No problems.

domob

  • Developer
  • Sr. Member
  • *****
  • Posts: 284
    • View Profile
Re: Auto Log Out Hunters
« Reply #11 on: October 19, 2015, 06:58:00 AM »
For example, a node compiled with additional variables in the gamestate is a perfectly valid Huntercoin client (after redownloading the blockchain).

Works without blockchain redownload actually, only with game.dat deleted.

I tried this in the testnet, spawning, death tax, transferring hunters back and forth between nodes with different gamestate, banking. No problems.

Yes, that sounds reasonable.  Deleting game.dat results in a recomputation.  As long as your "new game logic" behaves in the same way (i. e., constructs the same game transactions), it is fully compatible with the existing network and blockchain.

For the upcoming Huntercoin Core client, you can achieve the same effect by starting with -reindex after changing the IO format.
Use your Namecoin-ID as OpenID: https://nameid.org/
Donations: 1domobKsPZ5cWk2kXssD8p8ES1qffGUCm | HBkxA5QmYSATFoPN1wFk8eBkgwPpY97Mfu

wiggi

  • Global Moderator
  • Full Member
  • *****
  • Posts: 150
    • View Profile
Re: Auto Log Out Hunters
« Reply #12 on: November 09, 2015, 07:12:31 PM »
Alternatives to auto log out:

If not only the number of bank is increased, but they also stay longer (duration still random but doubled) on the same tile, then hunters are never "stranded" on the map and there's no disadvantage to have the path always end at a bank.


or


Discussed recently and further in the past (mithrilman called it sleep i think).

Yep, sleeping spots, for example 8 tiles at a ring around the center, at (98,256), (128,123) and so on, so that several "good" harvest areas are reachable within an hour. Visually the door to an inn. Hunters there are not rendered, can't destruct or die, but are affected by disaster. And can, at any time, set a path that ends back at the sleeping spot, making a "quick game" possible (if the map is not too crowded).