- Home /
Creating ai players
Hi,
I have been working in unity for nearly a month now and I love it but I feel like I have just hit a major snag, ok my problem is I need to have about ai 500+ players for my boxing management sim. These players have to persist I guess as their stats would need to improve etc over time. I have created the code that generates the player names and the starting stats. What I have now discovered is that this might not be efficient enough to run. Can Unity handle a game where over 500 objects persist in different scenes etc.
Could player prefs work for all the ai players or is it just aimed at storing data for just the player?
As this game is going to be very stat driven is Unity the right fit for this or am I being a bit ambitious. Does anybody know of any management sims that are made in unity for me to get some idea of what it can do please?
Answer by bobisgod234 · Jun 14, 2017 at 01:20 AM
Can Unity handle a game where over 500 objects persist in different scenes etc.
Generally, the answer to any "can Unity do X" is to try it and see what happens, especially since you seem to have your player generation code already working.
It depends on the specifics of these objects. If these objects are just GameObjects with simple scripts on them to track stats, then I don't see any problem with having that many GameObjects. now, if they are all high-poly skinned meshes, then you will probably run into problems.
Could player prefs work for all the ai players or is it just aimed at storing data for just the player?
It will probably work, but it's a lot of data to cram into player prefs. At this point, it sounds like you should look into using a database of some sorts.
As this game is going to be very stat driven is Unity the right fit for this or am I being a bit ambitious.
Unity is very flexible. Outside of being a graphics-less game (e.g. text based sim management), It's perfectly reasonable choice for this kind of game.
Answer by rjb2803 · Jun 14, 2017 at 11:16 AM
Thank you for the great answer, exactly what I was thinking. I am however dissapointed as I didnt want to have to use a database but I guess that will just be more learning. Part of me is thinking I am going about this all wrong.
So currently I have a ranking system that shows all of the boxers with their win loss draw stat.
Do I have to have them as game objects in the scene to get this list out, or is there a more elegant solution?