Tag Info

New answers tagged

1

I assume that you're asking because file sizes would be too large to make copies of your SQLite file for each "new game", so I don't believe you have any alternative. Otherwise I'd say just copy that original game state and alter it directly. You may consider the idea of firing a sort of OnLoad() event whenever a new area is visited. It could check the ...


1

Probably the cleanest way of doing this is just to explicitly store your entities as classes: class Entity { Room location; bool isDead; ... etc. } And just store a flat list of all your entities in the world. List<Entity> entities; You can also store, for each room, a list of entities that are currently in the room: class Room { ...


1

Game states can be synchronised by sending "deltas"—messages that describe how to get from one game state to the next, rather than sending the whole state. You seem to have figured out that this is possible. To get you started on the right path of thinking, here's a more concrete (but naïve) way that could be implemented: In server code, store a boolean ...


1

Crashing? Does not make sense. You can send a lot of data nowadays. There is no reason using a lot of bandwidth would crash a properly implemented client. If it is literally crashing, you may need to debug some more. What to send: You don't need to send everything. Remember the client program is only used (normally): To accept input from the user, parse ...


0

you should try to minimize the amount of data you're sending - only send what is needed. Like ratchet freak said, for movement you could only send the direction if it updates. health also only on update. could you post a "log" of all things you're sending each time? We could then better help you to reduce it size.


1

NPC on a path only need to be sends periodically. However instead of only the position you also send the speed and direction the NPC is going. That you only need to send the data a few times a second and the client can extrapolate the current position of the NPC. Health should only be sent when it updates and once every few seconds as a sanity update.



Top 50 recent answers are included