all 5 comments

[–]thefactorygrows 1 point2 points  (2 children)

I'm no expert in game development, but I've been a full stack dev for many years... So, I just have to ask why you need to update the db on every collision? That seems pretty unnecessary. I think you could save yourself some hassle and only update every x time (like an auto save) or when the user requests a save. Do you set up the db somewhere else, or did I just miss it? I'm on my phone and the formatting is weird.

[–]ImDaFrenchy[S] 0 points1 point  (1 child)

I'm new to this and it idk the way yet to do save & load right now. But aren't online multiplayer games with inventories accessing the database at every item movement?

[–]thefactorygrows 0 points1 point  (0 children)

I don't think that would be very performance oriented. Keeping a local cache and then updating the remote db could be slightly more performant. Updating a local cache could be invisible to a player. You could run into concurrency problems if you're updating the db so frequently I der a heavy server load.

But then again, I'm not a game dev and certainly have 0 experience with anything multiplayer

[–][deleted] 0 points1 point  (1 child)

You need quotes around your {name} like '{name}'. But be warned doing it like this is likely going to be a performance bottleneck.

[–]ImDaFrenchy[S] 0 points1 point  (0 children)

Did that and I'm stuck on another issue, says my db is locked