? Editing: Post:21.body Save Delete Cancel
Initial sync in progress...

Newest topics

Follow in NewsfeedFollowing
+ Start new topic
Loading...
stickied

Title

Body
^1 ^2 added ━ started by user_name
More topics

 

Follow in NewsfeedFollowing

zchain - A way to create non-realtime game on ZeroNet inspired by blockchain

base zite: http://127.0.0.1:43110/19j7vqt8gaAh9WFtnH3w8m97WakWANVwmN/
GitHub: https://github.com/ImagicTheCat/ZeroNet_dev

I'm just starting with this idea, so it's just a small experiment for now.

Concept:

  • users can add blocks to their data file
  • the chain "state" is computed using the blocks after checking validity
  • blocks can have multiple children (two blocks pushed at the same time, cheating...) , so at this point there is an arbitrary choice based on the hash order (now blocks have a trust weight in function of the number of blocks in a chain and how much different people are pushing to this chain)

It's only about state integrity, users can "reset" the chain by removing or modifying a block (will invalid the following blocks). It's also possible to do a weight attack by spamming the chain to create a derived chain from a previous point in history.
But it's easy to imagine having a room owner whitelisting players to accept their blocks and have tools to detect cheaters or trolls. For example, if you make a chest game (it's more realtime but any turn based game with only one opponent would do the same), if a player try to cheat by modifying his previous moves, the game will rollback at the position before the modified move, I find this intuitive.

I need to develop multiple experiments to see how well it can work. And optimize storage/computation, like batching actions in a single block instead of having 1 block per action.

Interesting to note that any change in the gameplay could invalid the previous blocks or simply update the whole thing like it was always here (I just added a salary system to the example without problems). This is definitely another way to conceive games/systems.

^12 ^13 wellan posted on Jan 30, 2018
Please sign innew comment
Sign in as...
Submit comment
You are running out of your allowed space, please contact the site's admin at unknown to raise your limit.
user_nameadded ^1 ^2
Reply
Body
krystofon Dec 10, 2018 ^2 ^3
Reply

wellan: No motivation right now, but there is a project we started with a friend. http://127.0.0.1:43110/1FjgSoanBLFtHoUjKDFLkb3AN9MtVq9aM1/

I and Anoa are working on a plugin for Godot Game Engine called ZeroFrame: https://github.com/anoadragon453/godot-zeroframe-asset

I wonder if there was a way these both projects/endeavours could benefit from one another?

wellanon Jun 16, 2018 ^1 ^2
Reply

gitcenter: Nothing new?

No motivation right now, but there is a project we started with a friend. http://127.0.0.1:43110/1FjgSoanBLFtHoUjKDFLkb3AN9MtVq9aM1/

gitcenteron May 23, 2018 ^2 ^3
Reply

Nothing new?

wellanon Feb 03, 2018 ^1 ^2
Reply

nullpointer: Thanks. I'll look into it. Can't say I'll be having a game up and running in a few weeks though. Got my own zite to sort out first.

No problem, I will try to develop soon something basic but interesting enough to have active players and see how it performs.

nullpointeron Feb 03, 2018 ^1 ^2
Reply

wellan: I added a GitHub link with the zchain.js file synced with the base-zite file, with documentation.

Thanks. I'll look into it. Can't say I'll be having a game up and running in a few weeks though. Got my own zite to sort out first.

wellanon Feb 02, 2018 ^2 ^3
Reply

nullpointer: Sounds great. I'll be looking in to some game designs once your API leaves beta.

I added a GitHub link with the zchain.js file synced with the base-zite file, with documentation.

wellanon Feb 02, 2018 ^3 ^4
Reply

samp: If you aren't careful, you might just wind up accidentally developing ZeroCoin.

Would have been fun, but if in the concept it is a blockchain, the blocks are shared between users and are associated to a specific zite, so there is no guarantee about the data, no way to restore blocks, no way to valid blocks independently from the zite owner and no strong protection for transactions. It's only about user interactions and state integrity following the chain state rules.

sampon Feb 01, 2018 ^1 ^2
Reply

If you aren't careful, you might just wind up accidentally developing ZeroCoin.

wellanon Feb 01, 2018 ^1 ^2
Reply

nullpointer: The first game that came to mind was OGame. A browser strategy game where you need to collect resources, build defenses, attack players, etc. I have actually never played it myself, but got a friend who did. I'll ask him for some details. [...]

I was thinking to this one too, I think it's possible and I wonder about the computation time of the chain if there are many players, but optimization is possible with a cache system.
Edit:
I have an idea, the zite owner or game owner could push a snapshot block at the beginning of the chain and mark it as the new chain origin, then all the old game blocks would be unused (and deleted by users at some point), resetting the chain (less computation, probably less disk space used) and saving the game state at the snapshot point (prevent the chance of a state reset if a very old block becomes invalid).

nullpointeron Feb 01, 2018 ^2 ^3
Reply

wellan: While debugging an issue, I removed all my blocks, but gitcenter became the chain start. Didn't expect that, but I think I will keep this behavior.

The first game that came to mind was OGame. A browser strategy game where you need to collect resources, build defenses, attack players, etc. I have actually never played it myself, but got a friend who did. I'll ask him for some details.

clearnet:
https://en.ogame.gameforge.com/

wellanon Feb 01, 2018 ^1 ^2
Reply

While debugging an issue, I removed all my blocks, but gitcenter became the chain start. Didn't expect that, but I think I will keep this behavior.

wellanon Jan 31, 2018 ^1 ^2
Reply

I'm thinking about game relying on time (building construction, troops travel time), it's possible to time-stamp each block with a unit of 10 minutes for example (to prevent the creation of invalid blocks by minor time offsets), so cheating on the timestamp will be restricted between the last block and the next block timestamps, which can be useless if the game is active.

nullpointeron Jan 31, 2018 ^2 ^3
Reply

wellan: I don't know if I will find time and motivation for that, but it would be nice to create a browser game with economy, maybe resources, and long term fight to see how it can scale with optimizations. When the project will be more mature, I will probably explain how to use the API so people can build things with it.

Sounds great. I'll be looking in to some game designs once your API leaves beta.

wellanon Jan 31, 2018 ^1 ^2
Reply

gitcenter: You have Math.random in your source - I assume that is just for test, because otherwise all peers will see different content.

It's a library generating random numbers based on a seed (alea.js), to show that it's possible to use random number generators in a game (but it allows clients to predict the next best bet so it's not very interesting for game-play values in competitive games, but can be used to have randomness in the game, like a procedural map).

gitcenteron Jan 31, 2018 ^1 ^2
Reply

wellan: I don't know if I will find time and motivation for that, but it would be nice to create a browser game with economy, maybe resources, and long term fight to see how it can scale with optimizations. When the project will be more mature, I will probably explain how to use the API so people can build things with it.

You have Math.random in your source - I assume that is just for test, because otherwise all peers will see different content.

wellanon Jan 31, 2018 ^1 ^2
Reply

nullpointer: Sounds like a great idea. I wonder about the possibilities. I'll be keeping an eye on your project.

I don't know if I will find time and motivation for that, but it would be nice to create a browser game with economy, maybe resources, and long term fight to see how it can scale with optimizations. When the project will be more mature, I will probably explain how to use the API so people can build things with it.

nullpointeron Jan 31, 2018 ^3 ^4
Reply

Sounds like a great idea. I wonder about the possibilities. I'll be keeping an eye on your project.

This page is a snapshot of ZeroNet. Start your own ZeroNet for complete experience. Learn More