A bunch of unrelated questions.

Started by
6 comments, last by Thevenin 17 years, 8 months ago
I don't really want to start seperate topics for each of these, so here we go... 1 - I want to reduce the likeyhood of a harddrive failure by running a RAID using two 200+GB harddrives (Setup in a clone mode; I forget which config# this is). My one harddrive is SATA, the other is ATA/133. I realise it will cap to the lesser of the two, but this is fine so long as it works. Will it work? 2 - Is there a better way to store (for a game) a backpack full of items than creating a row for each item and quantity? This just doesn't seem right. 3 - My motherboard has 3 RAM slots in use. However, I think the configuration may be a bit off. I have in my ram slot #1 a 512MB stick, in #2 a 512MB stick, and in #3 a 1024MB stick. However, since my RAM usage usually hovers around 700MB-900MB, wouldn't it seem more logical to have ram slot #1 the 1024MB so that it doesn't have to delegate between slots #1 & #2. I'm worried about a performance hit. 4 - In some occasions, players get the error message "... because the server actively refused the connection.." when they try to connect to my MMORPG server. If they retry a couple times, they can usually get connected though. I'm not too sure what is causing this. I have a feeling its due to the gap between the .Accept() and the next .Listen(). But again, I'm not sure. =/
    public void sCheckForConnection()
    {
        /* 
         * Name: sCheckForConnection
         * Programmer: Peter Blain.
         * Version: July 11, 2006.
         * Description: This procedure checks if there are any connections, and if so, it connects them.
        */

        /* If our listen has been answered, and we are awaiting a connect(). */
        if(MyGlobalSocket.Poll(0, SelectMode.SelectRead))
        {
            Socket TheConnection = MyGlobalSocket.Accept();  
   

                /* We have a connection, so lets build a client for this guy. */
                int TheClientIndex = -1;
                for (int TheLoop = 0; TheLoop < TheMaximumPlayers; TheLoop++)
                    if (TheClients[TheLoop] == null)
                    {
                        TheClients[TheLoop] = new AClient();
                        TheClientIndex = TheLoop;
                        break;
                    }
                    else if (TheLoop == TheMaximumPlayers - 1)
                    { throw new Exception("Could not find the player an empty client slot."); }

                /* Now, lets give this client the socket. */
                TheClients[TheClientIndex].MySocket = TheConnection;
                TheClients[TheClientIndex].MySocket.Blocking = false;

                /* Now, lets turn the accepting back on so that others can join in; so long
                 * as there is an empty client slot to fit the person. */
                for (int TheLoop = 0; TheLoop < TheMaximumPlayers; TheLoop++)
                {
                    if (this.TheClients[TheLoop] == null) break;
                    else if (TheLoop == TheMaximumPlayers - 1) return;
                }
            MyGlobalSocket.Listen(MyListenBacklog);
        }
    }

5 - Does VS2005EE not save during an Edit&Continue? I believe it saves after each compile&run, but during a crash (My computer restarted), I lost all my "Edit&Continue" changes! >.<
Advertisement
Regarding the inventory question - if you have a strictly-enforced maximum inventory size, you could reduce the table to just describing those slots, ie -
| PlayerID | ItemID1 | Num1 | ItemID2 | Num2 | ... | ItemIDN | NumN || 348      | 48      | 2    | 59      | 3    | ... | 19348   | 1    |...

Where N is the maximum size inventory allowed. It still isn't very nice, but its might yield smaller table sizes than what you've already got :|
Create a table to describe just the player's inventory instead of inventory+character? :|

I could always just have 1 field for the backpack, a string, something like...

Inv = "{53,1}{0,0}{0,0} .... etc" and just have the server parse it into an array after reading it in from the database....

but even this idea doesn't float my boat.

Edit: p.s.. Is the programmer of Loradon Online a huge fan of yours? lol

[Edited by - Thevenin on August 16, 2006 8:44:59 PM]
Quote:Original post by Thevenin
Edit: p.s.. Is the programmer of Loradon Online a huge fan of yours? lol


Please explain?
1)
With software raid under windows XP, if you make both drives "dynamic volumes" you can probably generate a raid volume
across those drives.

As far as a hardware raid goes, that configuration isnt going to work. You need 2 sata disks or 2 ata disks and the motherboard/addin card to support it.

Software raid works technically as good as hardware, but you do take some speed hit.

2)
Why not just assume if it isn't in the backpack, then it isn't in the backpack?
You only need to store the type and quantity of every item in the backpack,
not the type and quantity of every item that could be in the backpack.
*got this from your screenshot, there are LOTS of zeros in there.

Also, you can store the tables of items in the world in some readable form, but there is no need for a reable form for the save files.
Make a binary format that stores only numbers(no strings), so you have the equivelent of 5,1,2,3,4,1 but it takes up the least space.
You associate these numbers somewhere else in the code so that it displays properly to the user.

3)
Depends on the hardware, moving the 1gig stick might change performance for you, but it isn't likely to
be a noticable change. Things would be very different if you had a 2 channel memory controller, but those ususally have 4 ram slots.
Quote:Original post by KulSeran
1)
With software raid under windows XP, if you make both drives "dynamic volumes" you can probably generate a raid volume
across those drives.

As far as a hardware raid goes, that configuration isnt going to work. You need 2 sata disks or 2 ata disks and the motherboard/addin card to support it.

Software raid works technically as good as hardware, but you do take some speed hit.


After converting them to dynamic, I discovered it cannot be done in non-server versions of Windows (eg, "XP(Home|Pro), Media Center). Well, actually, it can, but I dont' want to hack at some system files.

Quote:Original post by KulSeran
2)
Why not just assume if it isn't in the backpack, then it isn't in the backpack?

I can't, for a couple reasons. And few more reasons why I woudln't want to.

Quote:Original post by KulSeran
3)
Depends on the hardware, moving the 1gig stick might change performance for you, but it isn't likely to
be a noticable change. Things would be very different if you had a 2 channel memory controller, but those ususally have 4 ram slots.


I have 4 ram slots. Three are used.
1)
Interesting.... I have XP-Pro SP2 and have a raid setup on two of my 300gig drives(both sata), and Im using the dynamic drive method.
Is this just some limitation caused by the ata/sata mix? or something else you ran into?

2)
Mind elaborating? Im intrigued as to why you would want to store stuff even if it has quantity 0.
Besides the obvious objects that you can replenish (like a quiver of arrows, or a stack of healing potions)

3) In a dual channel system you want to make sure chan0+slot0 and chan1+slot0 have the same memory and that chan0+slot1 and chan1+slot1
have the same memory. You will need to check your motherboard manual for the layouts it recomends. I'd just
follow those.
Quote:Original post by KulSeran
1)
Interesting.... I have XP-Pro SP2 and have a raid setup on two of my 300gig drives(both sata), and Im using the dynamic drive method.
Is this just some limitation caused by the ata/sata mix? or something else you ran into?


Probably something else I ran into.. like.. say... this?

Quote:You cannot create mirrored volumes on computers that are running Windows XP Home Edition, Windows XP Professional or Windows XP 64-Bit Edition. However, you can use a computer that is running Windows XP Professional to create mirrored volumes on remote computers that are running Windows 2000 Server, Windows 2000 Advanced Server, or Windows 2000 Datacenter Server. You must have administrative privileges on the remote computer to do this.

-http://support.microsoft.com/?kbid=307880#3


You wouldn't happen to have hacked your system files would you? Or are you just running it remotely?

Quote:
2)
Mind elaborating?


Actually, I would mind. Drop it, because I'm not going to use your suggestion.

This topic is closed to new replies.

Advertisement