Spawning mobs etc from server SQL/SQlite

Hi, im trying to figure out how to make detailed objects, mobs, units etc spawn as I get closer to make game run smoother. Ive heard about SQL and SQlite, Mirror uMMORPG, and understood that the difference is that SQL is storing data on an external server while SQlite is using internal harddrive to store data. However Im not sure how to execute this. Im sort of looking for the World Of Warcraft effect where everything spawns as you get closer. In the old Vanilla Wow you could actually see people units spawning. Im also interested in making units respawn. Not sure if Im going to study MMO style game, as ive heard that it is verry complicated, but im interested in learning how to make a simple RPG run smoother.

Well, databases don’t actually do things like spawning. Databases themselves take no action, they don’t process data over time, etc. They just store data. What does all the work is the application using the database. Typically in an MMO it would be your server build, which yes probably is talking to a database to get things like information on the characters which you store long term in between server restarts and is used by multiple server instances.

So the point of the database isn’t to actually do any work. The point is to have a central location where important information is stored, which will persist even if the servers are restarted.

To take your example of mobs, well you may want to store in the db what mobs usually spawn in specific areas of the map, but you probably don’t need to store what mobs exist right now in the game world. That’s because no other server covering either different areas of the map, or a different instance of the same area, will care about the specific mobs that exist on that server right now. And if you shut the server down and restart, it is probably better to just spawn new mobs instead of respawning the same mobs at the same place. So likely no need to track individual mobs in the database.

Ok, this was a bit overwhelming and not verry specific on what I actually need to study to acomplish this. I have not yet decided wether my game will contain MMO or just be standard RPG. What I want to learn is how to spawn NPCs, mobs and detailed objects within ceratain distance from camera range. Im using thirperson navmesh controller with camera tilted 45 degrees to ground level. Areas where character has been earlier is darked out with no animation, effects etc, like in WC3 or any other RTS games, are where character has not been is completeley black.

is it usefull to use server for RPG that is not an MMO game or would it be possible to achieve same effect using standard harddisk?

All this is done for better performance to be able to get better graphics and more units, mobs, animations, effects.
I was also thinking about implementing the new ECS for even better performance, but im not sure how all of this work and if it would benefit the game to a noteworthy degree.

So you’re kind of jumping all over the place. You don’t need servers, databases, saving data to your HDD, etc, for relatively simple things like figuring out what position to instantiate an enemy. Yes you could do that on a server, but that’s not the point of the server. The server is there to manage a multiplayer game for multiple clients, keeping the clients in sync so they are participating in the same game world. It doesn’t make graphics better, improve performance, etc, etc.

Ok, thanks! That clarified alot. think ill just skip the entire MMO part for another life. Ill come back when ive done alot more research and if im still lost.

I assume ther will be more information on ECS in Unity later when its not so new. I tried opening the Megacity project for studying, but it took way too loong to open and I felt sorry for my cpu

1 Like