create account

Misconceptions about 2nd layer apps: part 1 by blocktrades

View this thread on: hive.blogpeakd.comecency.com
· @blocktrades ·
$82.73
Misconceptions about 2nd layer apps: part 1
@howo recently shared with me the image below (neither of us made this image, but I have a reasonable belief that it's copyright free), and it made me realize there are some common misconceptions about 2nd layer apps that are worth dispelling. 

Originally, I was going to make one post about this, but it started to run long when I tried to avoid skipping any steps in my explanations, so I’ve decided to break it up into a few short, easy-to-digest posts. This also means I won't be explaining all the problems with this image today, either, but hey, what's life without a little anticipation?


![image (3).png](https://images.hive.blog/DQmWapVWwsacyTitpb8oF4XFMDjQDNmvDJUfSj7mPQ5fgyp/image%20(3).png)


# Misconception 1: it’s difficult (or impossible) to make decentralized 2nd layer apps

Creating a 2nd layer app on Hive is almost trivially easy for an experienced programmer. How easy? Let’s take a look at how to go about creating a 2nd layer app for playing decentralized tic-tac-toe matches.

## Design the transactions and protocol rules for your tic-tac-toe app 

To start a game, we just need two operations:
`offer_match, “player”: “mynextvictim”`
`accept_offer, “transaction_id”: transaction_id_of_offer`

Whenever a player wants to challenge a player he broadcasts an offer_match. For this simple example, our app will just auto-expire an offer if it isn’t accepted in 24 hours. 

To accept an offer, the challenged player broadcasts a transaction with the “accept_offer” operation that includes the transaction id of the original offer. If the acceptance is broadcast within the 24 hour period, the app will start a game and accept moves from each player.

So we just need one more operation, the “move” operation:
`move, "transaction_id":transaction_id_of_offer, “coordinates”: [row_number, column_number]`

Again, for simplicity, we’ll design our app so that the challenged player gets the first move, but we could easily make this a parameter of either the offer or the acceptance operation.

We just need to add a few more protocol rules: 1) players need to take turns moving, 2) players can’t move to a previously occupied square, 3) player wins if he gets 3 in a row, and 4) game ends in a tie if 9 valid moves occur without a winner (i.e. all the squares get filled).

Defining the protocol rules are so simple, there’s probably marginally more work in writing the user interface that displays the tic-tac-toe board, allows the user to click on squares, and updates the board as moves are received from the blockchain. But all of this is pretty easy to do, code-wise. 

For Hive, two great choices for a programming language to do this would be Python or Javascript, as Hive has easy-to-use libraries that allow your application to publish and read transactions from the blockchain.

## Decentralize your tic-tac-toe game

Now, as easy as it was to design, there’s still the “hard step” of decentralizing your tic-tac-toe app, right? Nope, that’s the really easy part.

Simply publish the official rules publicly. Ideally, you would also publish your source code with a license that lets anyone run your code. Congratulations, you can play decentralized tic-tac-toe with other people around the world, secure in the knowledge they can’t cheat. Anyone can run your code on their computer, connect it up to a Hive API node, verify all the game transactions, and determine who really won each game (although, fair warning, most of those games are probably going to be ties). 

The blockchain maintains an immutable record of what moves were actually made, and by whom, so all you need is the publicly available “tic-tac-toe” rules to determine the winner. Someone can run a server that provides false answers, but you can always run your own server to find out the truth.
👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 679 others
👎  , , , , , , , , ,
properties (23)
authorblocktrades
permlinkmisconceptions-about-2nd-layer-apps-part-1
categoryhive-139531
json_metadata{"tags":["hive-139531","hive","blockchain","dapps"],"users":["howo"],"image":["https://images.hive.blog/DQmWapVWwsacyTitpb8oF4XFMDjQDNmvDJUfSj7mPQ5fgyp/image%20(3).png"],"app":"hiveblog/0.1","format":"markdown"}
created2020-08-29 00:16:54
last_update2020-08-29 00:16:54
depth0
children38
last_payout2020-09-05 00:16:54
cashout_time1969-12-31 23:59:59
total_payout_value46.800 HBD
curator_payout_value35.929 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length3,793
author_reputation1,285,295,680,967,795
root_title"Misconceptions about 2nd layer apps: part 1"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id99,331,162
net_rshares227,931,180,081,421
author_curate_reward""
vote details (753)
@belemo ·
Will a tic tac toe genius bot be considered cheati...
Will a tic tac toe genius bot be considered cheating? 🤔

 Posted using [Dapplr](https://app.dapplr.in/n6MUReLoyL9Dcuyw8)
properties (22)
authorbelemo
permlinkwillatictactoegeniusbot-52323732336251024v45058228117813
categoryhive-139531
json_metadata{"app":"dapplr","format":"markdown","tags":["dapplr"],"media":[],"users_tagged":[]}
created2020-08-29 00:24:18
last_update2020-08-29 00:24:18
depth1
children9
last_payout2020-09-05 00:24:18
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length121
author_reputation1,058,004,512,390,619
root_title"Misconceptions about 2nd layer apps: part 1"
beneficiaries
0.
accountdapplr
weight500
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id99,331,229
net_rshares0
@edicted ·
Pretty much the only way to win tic-tac-toe is to go first, take the center square, and then hope your opponent doesn't move into a corner.  Then you can force a win by moving into a corner.  
properties (22)
authoredicted
permlinkre-belemo-qfsxwu
categoryhive-139531
json_metadata{"tags":["hive-139531"],"app":"peakd/2020.08.3"}
created2020-08-29 01:38:54
last_update2020-08-29 01:38:54
depth2
children7
last_payout2020-09-05 01:38:54
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length192
author_reputation3,497,849,991,070,017
root_title"Misconceptions about 2nd layer apps: part 1"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id99,331,971
net_rshares0
@belemo ·
Lol yeah basically the case but I was just asking in general if bots count as cheating 
properties (22)
authorbelemo
permlinkre-edicted-qft8lc
categoryhive-139531
json_metadata{"tags":["hive-139531"],"app":"peakd/2020.08.3"}
created2020-08-29 05:29:42
last_update2020-08-29 05:29:42
depth3
children5
last_payout2020-09-05 05:29:42
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length87
author_reputation1,058,004,512,390,619
root_title"Misconceptions about 2nd layer apps: part 1"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id99,334,075
net_rshares0
@sepracore ·
#spoilers
properties (22)
authorsepracore
permlinkre-edicted-qft0pd
categoryhive-139531
json_metadata{"tags":["hive-139531"],"app":"peakd/2020.08.3"}
created2020-08-29 02:39:15
last_update2020-08-29 02:39:15
depth3
children0
last_payout2020-09-05 02:39:15
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length9
author_reputation19,888,382,618,059
root_title"Misconceptions about 2nd layer apps: part 1"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id99,332,531
net_rshares0
@satren ·
You could just try it.
properties (22)
authorsatren
permlinkre-belemo-qfsuo1
categoryhive-139531
json_metadata{"tags":["hive-139531"],"app":"peakd/2020.08.3"}
created2020-08-29 00:28:51
last_update2020-08-29 00:28:51
depth2
children0
last_payout2020-09-05 00:28:51
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length22
author_reputation463,263,569,897,351
root_title"Misconceptions about 2nd layer apps: part 1"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id99,331,273
net_rshares0
@chekohler ·
$0.04
Well if it brings more utility and dapps to the ecosystem or allowing us to connect to other ecosystems with your HIVE wallet, why not? Open it up, crypto is still in the BUIDL phase, people need to forget about holding on to what we've got, this space is about taking risks
👍  
properties (23)
authorchekohler
permlinkre-blocktrades-qfthry
categoryhive-139531
json_metadata{"tags":["hive-139531"],"app":"peakd/2020.08.3"}
created2020-08-29 08:48:00
last_update2020-08-29 08:48:00
depth1
children0
last_payout2020-09-05 08:48:00
cashout_time1969-12-31 23:59:59
total_payout_value0.018 HBD
curator_payout_value0.019 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length274
author_reputation524,332,427,393,665
root_title"Misconceptions about 2nd layer apps: part 1"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id99,335,869
net_rshares191,059,271,690
author_curate_reward""
vote details (1)
@cmplxty ·
That meme looks like someone is butt hurt that they didn’t think of a second layer app first now they are kicking themselves and trying to throw shade lol
properties (22)
authorcmplxty
permlinkre-blocktrades-qft0xa
categoryhive-139531
json_metadata{"tags":["hive-139531"],"app":"peakd/2020.08.3"}
created2020-08-29 02:43:57
last_update2020-08-29 02:43:57
depth1
children0
last_payout2020-09-05 02:43:57
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length154
author_reputation779,531,965,262,669
root_title"Misconceptions about 2nd layer apps: part 1"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id99,332,572
net_rshares0
@edgargonzalez ·
saludos amigos
properties (22)
authoredgargonzalez
permlinkqft3ii
categoryhive-139531
json_metadata{"app":"hiveblog/0.1"}
created2020-08-29 03:31:30
last_update2020-08-29 03:31:30
depth1
children0
last_payout2020-09-05 03:31:30
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length14
author_reputation182,047,359,636,490
root_title"Misconceptions about 2nd layer apps: part 1"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id99,332,964
net_rshares0
@felixmarranz ·
When I see these publications I realize that due to my technological ignorance I am missing an important part of this community.
In any case, I enjoy sharing (publishing and reading) and I thank you for your efforts that make it possible.
Gracias/Thank you.
properties (22)
authorfelixmarranz
permlinkqftu9p
categoryhive-139531
json_metadata{"app":"hiveblog/0.1"}
created2020-08-29 13:30:27
last_update2020-08-29 13:30:27
depth1
children0
last_payout2020-09-05 13:30:27
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length257
author_reputation106,122,411,006,011
root_title"Misconceptions about 2nd layer apps: part 1"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id99,338,925
net_rshares0
@foxon ·
$0.16
The example reminds me very much of things @edicted likes to play with

Many dapps utilize tokens (NFT or FT) - I hope there's some discussion around those later in the series!
👍  ,
properties (23)
authorfoxon
permlinkre-blocktrades-qfswt7
categoryhive-139531
json_metadata{"tags":["hive-139531"],"app":"peakd/2020.08.3"}
created2020-08-29 01:15:09
last_update2020-08-29 01:15:09
depth1
children10
last_payout2020-09-05 01:15:09
cashout_time1969-12-31 23:59:59
total_payout_value0.080 HBD
curator_payout_value0.080 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length176
author_reputation9,226,931,685,882
root_title"Misconceptions about 2nd layer apps: part 1"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id99,331,689
net_rshares716,301,290,865
author_curate_reward""
vote details (2)
@blocktrades ·
$0.02
Tokens will definitely come up :-)
👍  
👎  ,
properties (23)
authorblocktrades
permlinkqft489
categoryhive-139531
json_metadata{"app":"hiveblog/0.1"}
created2020-08-29 03:55:21
last_update2020-08-29 03:55:21
depth2
children4
last_payout2020-09-05 03:55:21
cashout_time1969-12-31 23:59:59
total_payout_value0.011 HBD
curator_payout_value0.011 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length34
author_reputation1,285,295,680,967,795
root_title"Misconceptions about 2nd layer apps: part 1"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id99,333,185
net_rshares113,286,660,788
author_curate_reward""
vote details (3)
@dswigle ·
I could definitely use a pump-up!!! Oh, Tokens!!!
properties (22)
authordswigle
permlinkqfuqlw
categoryhive-139531
json_metadata{"app":"hiveblog/0.1"}
created2020-08-30 00:56:21
last_update2020-08-30 00:56:21
depth3
children2
last_payout2020-09-06 00:56:21
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length49
author_reputation775,779,752,157,640
root_title"Misconceptions about 2nd layer apps: part 1"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id99,347,444
net_rshares0
@teknow ·
$0.08
I think this is a hint of a pump coming..

![IMG_20200829_212904.jpg](https://files.peakd.com/file/peakd-hive/teknow/hhSgUY9F-IMG_20200829_212904.jpg)

Only a little pump maybe but BUY HIVE should be headlining in Leo community at least. Maybe I'm wrong but some HYPE is needed for that coming HF to get Hive back closer to Steem. On CMC at least.


👍  
properties (23)
authorteknow
permlinkre-blocktrades-qftqa8
categoryhive-139531
json_metadata{"tags":["hive-139531"],"app":"peakd/2020.08.3"}
created2020-08-29 11:51:45
last_update2020-08-29 11:51:45
depth3
children0
last_payout2020-09-05 11:51:45
cashout_time1969-12-31 23:59:59
total_payout_value0.040 HBD
curator_payout_value0.040 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length350
author_reputation1,338,108,277,063
root_title"Misconceptions about 2nd layer apps: part 1"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id99,337,854
net_rshares397,934,396,327
author_curate_reward""
vote details (1)
@edicted ·
$0.14
Too bad I don't actually have a working product to point to, eh? 
Soon™
👍  , ,
properties (23)
authoredicted
permlinkre-foxon-qfsxqm
categoryhive-139531
json_metadata{"tags":["hive-139531"],"app":"peakd/2020.08.3"}
created2020-08-29 01:35:12
last_update2020-08-29 01:35:12
depth2
children4
last_payout2020-09-05 01:35:12
cashout_time1969-12-31 23:59:59
total_payout_value0.079 HBD
curator_payout_value0.063 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length71
author_reputation3,497,849,991,070,017
root_title"Misconceptions about 2nd layer apps: part 1"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id99,331,928
net_rshares710,660,151,658
author_curate_reward""
vote details (3)
@cmplxty ·
$0.07
Better to be working on it then to have never. My game idea might never get off the ground because I can't figure out how to program lol
👍  ,
properties (23)
authorcmplxty
permlinkre-edicted-qft0vb
categoryhive-139531
json_metadata{"tags":["hive-139531"],"app":"peakd/2020.08.3"}
created2020-08-29 02:42:48
last_update2020-08-29 02:42:48
depth3
children3
last_payout2020-09-05 02:42:48
cashout_time1969-12-31 23:59:59
total_payout_value0.034 HBD
curator_payout_value0.033 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length136
author_reputation779,531,965,262,669
root_title"Misconceptions about 2nd layer apps: part 1"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id99,332,555
net_rshares314,002,617,344
author_curate_reward""
vote details (2)
@grampo ·
The main obstacle for building layer 2 apps is that there is no monetization model. Without Smart Media Tokens apps are not able to create new ecosystems, experiment with new tokenomics, and build communities. Hive blockchain has a lot of advantages (speed, free transactions, usernames, etc.), but we are two years behind all other projects in launching tokens. 

At the time of publishing of the initial white paper, SMTs were a great concept, pioneering Automatic Market Maker and customization of token rules. Sure, we can blame Steemit for not doing their job for all these years, but when I am looking at the DHF, there is noting to suggest we might see SMTs any time soon.

properties (22)
authorgrampo
permlinkre-blocktrades-misconceptions-about-2nd-layer-apps-part-1-20200829t221939677z
categoryhive-139531
json_metadata{"community":"waivio","app":"waivio/1.0.0","format":"markdown","timeOfPostCreation":1598739582677,"tags":["hive-139531"],"users":[],"links":[],"image":[]}
created2020-08-29 22:19:39
last_update2020-08-29 22:19:39
depth1
children0
last_payout2020-09-05 22:19:39
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length681
author_reputation27,902,505,281,195
root_title"Misconceptions about 2nd layer apps: part 1"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id99,345,627
net_rshares0
@hivebuzz ·
Congratulations @blocktrades! You have completed the following achievement on the Hive blockchain and have been rewarded with new badge(s) :

<table><tr><td><img src="https://images.hive.blog/60x60/http://hivebuzz.me/badges/toppayoutday.png"></td><td>Your post got the highest payout of the day</td></tr>
</table>

<sub>_You can view [your badges on your board](https://hivebuzz.me/@blocktrades) And compare to others on the [Ranking](https://hivebuzz.me/ranking)_</sub>
<sub>_If you no longer want to receive notifications, reply to this comment with the word_ `STOP`</sub>



**Do not miss the last post from @hivebuzz:**
<table><tr><td><a href="/hivebuzz/@hivebuzz/pud-countdown"><img src="https://images.hive.blog/64x128/https://i.imgur.com/805FIIt.jpg"></a></td><td><a href="/hivebuzz/@hivebuzz/pud-countdown">Hive Power Up Day - The countdown is ticking</a></td></tr><tr><td><a href="/hivebuzz/@hivebuzz/pud-202009"><img src="https://images.hive.blog/64x128/https://i.imgur.com/805FIIt.jpg"></a></td><td><a href="/hivebuzz/@hivebuzz/pud-202009">Hive Power Up Day - Let's grow together!</a></td></tr></table>
properties (22)
authorhivebuzz
permlinkhivebuzz-notify-blocktrades-20200830t002759000z
categoryhive-139531
json_metadata{"image":["http://hivebuzz.me/notify.t6.png"]}
created2020-08-30 00:27:57
last_update2020-08-30 00:27:57
depth1
children0
last_payout2020-09-06 00:27:57
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length1,113
author_reputation369,402,133,832,980
root_title"Misconceptions about 2nd layer apps: part 1"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id99,347,168
net_rshares0
@larka ·
Excellent article !!! very informative
properties (22)
authorlarka
permlinkqftqsm
categoryhive-139531
json_metadata{"app":"hiveblog/0.1"}
created2020-08-29 12:02:48
last_update2020-08-29 12:02:48
depth1
children0
last_payout2020-09-05 12:02:48
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length38
author_reputation336,415,645,767,672
root_title"Misconceptions about 2nd layer apps: part 1"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id99,337,967
net_rshares0
@marki99 ·
Also, if you feel cheated, you can always replay everything and get to the truth. For example, if someone steals your NFT somehow, using a different type of transaction, it will always show on chain and can always be canceled.
properties (22)
authormarki99
permlinkqftuo7
categoryhive-139531
json_metadata{"app":"hiveblog/0.1"}
created2020-08-29 13:26:42
last_update2020-08-29 13:26:42
depth1
children0
last_payout2020-09-05 13:26:42
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length226
author_reputation11,400,723,818,181
root_title"Misconceptions about 2nd layer apps: part 1"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id99,338,896
net_rshares0
@miniature-tiger ·
> Anyone can run your code on their computer, connect it up to a Hive API node, <i>verify all the game transactions</i>, and determine who really won each game.

How would you go about verifying all the game transactions through a Hive API node? Is there a way to pull a subset of all the blockchain custom_json transactions, i.e. only those custom_json that are flagged as belonging to your game? And only for a certain set of users?

I didn't think that this kind of detail was currently possible through the API? I'd be very happy to be wrong.
properties (22)
authorminiature-tiger
permlinkre-blocktrades-qfuii8
categoryhive-139531
json_metadata{"tags":["hive-139531"],"app":"peakd/2020.08.3"}
created2020-08-29 22:01:21
last_update2020-08-29 22:01:21
depth1
children6
last_payout2020-09-05 22:01:21
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length546
author_reputation110,057,226,899,924
root_title"Misconceptions about 2nd layer apps: part 1"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id99,345,377
net_rshares0
@ali-h · (edited)
well, if code is only streaming and verifying it would possibly take A LOT of data reading but its technically possible to verify all the transactions of the game with Hive API.
properties (22)
authorali-h
permlinkqfv6al
categoryhive-139531
json_metadata{"app":"hiveblog/0.1"}
created2020-08-30 06:35:06
last_update2020-08-30 06:36:18
depth2
children2
last_payout2020-09-06 06:35:06
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length177
author_reputation3,042,798,885,185
root_title"Misconceptions about 2nd layer apps: part 1"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id99,350,462
net_rshares0
@miniature-tiger ·
I think it's currently technically possible by:
(a) Streaming all the blocks of the blockchain and separating out custom_json that match your game criteria.
(b) Pulling the operations of each user account involved in the game and separating out custom_json that match your game criteria.

These approaches are OK if you have a centralised server for your game that can do this work and update the current game state for all players.

However neither of them is really suitable under a decentralised approach, i.e. if each game participant has to carry out this work themselves to validate the current game position. You don't want to be streaming the last 10,000 blocks to find 9 noughts-and-crosses moves.

Is there currently a better way?
properties (22)
authorminiature-tiger
permlinkre-ali-h-qfv7f5
categoryhive-139531
json_metadata{"tags":["hive-139531"],"app":"peakd/2020.08.3"}
created2020-08-30 06:59:30
last_update2020-08-30 06:59:30
depth3
children1
last_payout2020-09-06 06:59:30
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length740
author_reputation110,057,226,899,924
root_title"Misconceptions about 2nd layer apps: part 1"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id99,350,663
net_rshares0
@blocktrades ·
Right now you have to pull them all, but the API you're describing is also pretty trivial to implement.
👍  
👎  
properties (23)
authorblocktrades
permlinkqfvwpg
categoryhive-139531
json_metadata{"app":"hiveblog/0.1"}
created2020-08-30 16:05:42
last_update2020-08-30 16:05:42
depth2
children2
last_payout2020-09-06 16:05:42
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length103
author_reputation1,285,295,680,967,795
root_title"Misconceptions about 2nd layer apps: part 1"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id99,357,158
net_rshares-3,560,225,590
author_curate_reward""
vote details (2)
@davidmuhammad ·
Visit my hive blog please
properties (22)
authordavidmuhammad
permlinkre-blocktrades-2020831t225455144z
categoryhive-139531
json_metadata{"tags":["ecency"],"app":"ecency/3.0.3-mobile","format":"markdown+html"}
created2020-08-31 15:54:54
last_update2020-08-31 15:54:54
depth3
children0
last_payout2020-09-07 15:54:54
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length25
author_reputation6,813,184,461,391
root_title"Misconceptions about 2nd layer apps: part 1"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id99,375,297
net_rshares0
@miniature-tiger ·
That's good news. I think we would see a lot more game development if devs could just pull their own data rather than having to deal with the full blockchain.

We see this with the front-ends. The Hive API is pretty good for building a front-end, so a lot of them get built.

We would also potentially get some invention / progression into true decentralised gaming (as you outline in your article) which I think would be really interesting.



properties (22)
authorminiature-tiger
permlinkre-blocktrades-qfx0u0
categoryhive-139531
json_metadata{"tags":["hive-139531"],"app":"peakd/2020.08.3"}
created2020-08-31 06:32:24
last_update2020-08-31 06:32:24
depth3
children0
last_payout2020-09-07 06:32:24
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length445
author_reputation110,057,226,899,924
root_title"Misconceptions about 2nd layer apps: part 1"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id99,367,491
net_rshares0
@sanjeevm ·
$0.02
I have started learning python to try some programming on hive chain, can we have some complete tutorials on 2 layered use ? Like have some simple extended JSON and publish it on hive. The dapp can design their own JSON data. 
👍  , ,
properties (23)
authorsanjeevm
permlinkre-blocktrades-qftfi9
categoryhive-139531
json_metadata{"tags":["hive-139531"],"app":"peakd/2020.08.3"}
created2020-08-29 07:58:57
last_update2020-08-29 07:58:57
depth1
children1
last_payout2020-09-05 07:58:57
cashout_time1969-12-31 23:59:59
total_payout_value0.012 HBD
curator_payout_value0.011 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length226
author_reputation702,252,212,993,572
root_title"Misconceptions about 2nd layer apps: part 1"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id99,335,418
net_rshares123,428,713,434
author_curate_reward""
vote details (3)
@blocktrades ·
$0.05
There are some tutorials here: https://developers.hive.io/tutorials/#tutorials-python
👍  ,
👎  ,
properties (23)
authorblocktrades
permlinkqfu5w8
categoryhive-139531
json_metadata{"links":["https://developers.hive.io/tutorials/#tutorials-python"],"app":"hiveblog/0.1"}
created2020-08-29 17:29:06
last_update2020-08-29 17:29:06
depth2
children0
last_payout2020-09-05 17:29:06
cashout_time1969-12-31 23:59:59
total_payout_value0.024 HBD
curator_payout_value0.024 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length85
author_reputation1,285,295,680,967,795
root_title"Misconceptions about 2nd layer apps: part 1"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id99,341,968
net_rshares253,208,297,469
author_curate_reward""
vote details (4)