Up to Main Index                           Up to Journal for October, 2013

                    JOURNAL FOR FRIDAY 18TH OCTOBER, 2013
______________________________________________________________________________

SUBJECT: Best way to solve logging in issues?
   DATE: Fri 18 Oct 22:53:14 BST 2013

Wednesday was a bust due to a family thing I had to deal with :( I had every
intention of just postponing my Wednesday coding session till Thursday
instead. That didn't happen either due to work. This is why programmers like
to have a 'cave'[1]... so nobody can find them and they are left alone to code!

Continuing with logins I've been trying out a few ideas. Currently I have one
idea which seems more favourable than the others. When a player logs into the
server we continue to fully load, unmarshal and then add the player to the
PlayerList. However we do not add the player to the world yet.

What does this buy us?

We have an accurate player count via the PlayerList still. Currently the
PlayerList would only count players in the world and you could have any number
of players sitting at the login screen.

By having the player fully loaded we can access and affect it. For example we
could change the characters name, the player's password or examine inventory
items.

All sounds good right? Well it raises a few questions as well.

Should the 'who' command only show players in the world or those logging in as
well?

What happens if a player logs in but then doesn't enter the game? Effectively
they could block a player slot that could otherwise be used by someone else
who actually wants to play.

The current code does not expect a player to EVER have a nil location. This
can cause unexpected panics.

As this seems the best route to take I'm currently mulling over the issues and
their implications and the best way to handle them. Maybe I'll get some spare
time over the weekend to spend coding.

--
Diddymus

  [1] http://randsinrepose.com/archives/a-nerd-in-a-cave/


  Up to Main Index                           Up to Journal for October, 2013