Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Loading Offline Players
#1
I am working on a time based strategy game for Mirage. I have the majority of the work finished. But either my brain is fried or I am missing something simple here.

When the server loads it will be loading all the player accounts and placing them onto the maps.
So even while you are offline, people can see you and what not.

I am not asking someone to code this for me, but rather give me some ideas how to do this.

I've thought about making an OfflinePlayerRec to record all data when the player logs off. And also a file to record all the account names so they can load up upon server boot.

But if there is an easier way, let me know. I am sort of pulling my hair out over this. I know there must be a better solution.

Thanks for the help guys.
Reply
#2
So basically when a user logs off, you want them to still be visual?
Reply
#3
Correct. And also load all the players if the server goes down. If I keep a record of all the player's account names in a file, then I can load them all upon the server boot.

I had an idea of assigning each player an account number, which would be their permanent
index. So when the server loads it would go through a file called accounts.ini, load all the players and then place them accordingly. Cause when I load them right now and someone logs in, it freezes on the client side.
Reply
#4
Well that is exactly why I haven't started it yet with account numbers.

I have come closer to solving my issue. I can easily load ONE character at all times to the maps. But allowing players to control more than one character and having them both loaded and displayed is an issue.

My best bet is to get rid of multiple player data from the account files. Cause right now the mirage code targets the index but also what "character" has been chosen. In that case, there is no easy way of loading all the accounts and the characters in the accounts.

I could in theory allow players to create more characters in game, and it would just create another account with the same password. This way, each new character would have it's own index.

But on a second note, unique character numbers would also solve this issue. Right now you have an account, which contains 3 character numbers; 1 to 3. Well if each number was completely unique. Then I could use that number to reference that character to it's own index while in the game.

*Sorry I took some sleeping pills. Often my brain and explanations become hazy shortly after.
I will keep everyone up to date about this. Though much of my work won't benefit most of the current games, it might give some "outside the box" ideas.
Reply
#5
Thanks, I never thought much about MySQL. Sadly I know little about it. I figured out a way to load all of the players onto the maps and allow interaction even while they are offline. For the time being, I am going to use that system. But during testing phases, I will try to read up on how to use MySQL. I think it would be crucial for me, cause I need to allow players to control multiple armies and generals.
Reply
#6
Now you are tempting me Tongue

My next day off from work I will look into it.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)