I’m trying to make some basic CRUD functionality and I’ve cobbled together pieces of code from tutorials and repos, but basically I haven’t got a clue.
Could anybody provide any direction as to what I should do? I’d like to be able to have different entity definitions (Item, Monster, Rarity, Quest etc.) and each one of them has a UUID and then a list of other fields.
I’m not really sure how to structure it, but I started with Rarity which is just ID and Name, and wanted to get that working first before attempting any more.
Hi - yes technically I could use an integer for the ID, if that value is hidden from the user and just used internally.
Our entities are semi-transparent to the user, so for instance, an Item could have ID 1, but it also has a “Resource ID” which is used by the players to look it up. So a player couldn’t go and look up everything by just passing in consecutive IDs, they’d need to know the actual UUID of that row.
1 Apple 39f72878scsb
2 Sword b9c8376434f
That would totally work, but yeah I wouldn’t want the players to find out every single item in the game by using a script. So yeah, I guess ID as an integer works but doesn’t solve the whole problem.
Think of it as of some kind of advantage - nobody would ever pirate or break your game, because it is already open for everybody.
Onchain multiplayer games are hard. It is hard to reach real-time performance (I could only imagine some kind of p2p solution with eventual onchain synchronization), it is hard to implement a generic anti-cheat (for cheats like wallhack or aimbot, I mean) and it is hard to store sensitive data.
You can be the first team to reach this goal and create this new market.
Oh yeah, we’ve also got an advantage because the game literally cannot make any money for anybody, not even the creators.
I get that storing everything on the blockchain makes it transparent to the users, it’ll have to be encrypted. We’re not going to be the only ones with that problem, so I thought we’d cross that bridge when we came to it.
You just need a right mindset to make it work like you want it to work.
You can make money. If some player has a read-only access to some digital asset doesn’t mean that they possesses it (and that others admit this fact). You could sell this possession like any other bigtech sells you the possession of skins for your in-game character.
Oh no, I don’t want to make money. I’m funding the whole game and I have no intention for it to make a penny. Yes, early adopters and developers will get some sort of token that will hopefully increase in value as the game grows, but this is far from a capitalistic venture. I just want the game to reward people who participate and pay for its own bills.
I don’t know for sure the details of the Dfinity economics, but there is some stuff that I can predict with high probability.
As we know, the app owner pays for the app by himself. This means that an app (canister) should have some funds associated with its ID. To enable us to build autonomous software, Dfinity should also enable us to fund other’s canisters. This means that nothing stops you of making a simple html page with something like If you like this app, please make a donation to this canister ID. It's current balance is N cycles - this is enough to run canister for X more days. We're not making any profits.
In my example, the service chooses the IDs (not the user of the service); either way is possible, of course, but the way I do it now is very simple (simple global counter)
No concerns for hiding IDs, or any data that they identity. Various workaround are possible, but as others have noted, real privacy will require more than what the IC platform has now. Exclusive control (access control) is possible now, of course. (Is that enough, I wonder?)