Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ////////////////////////////////////////////////////////////
- /// Network Traffic
- ///////////////////////////////////////////////////////////
- /// x 2500 Network Socket Connections data / event
- ////////////////////////////////////////////////[W,A,S,D,1,2,3,45]///////////////////////////
- /// UDP << - keystrokes input [0,1,1,0,0,1,0,45]
- /// UDP >> - player state [alive/health/x/y/facing]
- /////////////////////////////////////////////////////////////////////////////////////////////
- /// UDP >> - nearby bullets [bullet,x,y,s][acid,x,y,s][bullet,x,y,s]
- /// UDP >> - boss data [id,x,y,rot,s,threat,enrage,target]
- /// UDP >> - nearby enemies [id,x,y,rot,s]
- /// UDP >> - nearby party [id,x,y,rot,s]
- ////////////////////////////////////////////////////////////////////////////////////////////
- /// TCP >> - party broadcast [SHARE]receive,rep,exp,buff,gold
- /// TCP >> - drops notifier [DROP]lootmode,id,class,item
- /// TCP << - you roll [ROLL]item
- /// TCP >> - server reply RNG roll [LOOT]won, item, exp
- ////////////////////////////////////////////////////////////////////////////////////////////
- /// TCP >> - drops notifier [DROP]loot,chest,mine,water,etc
- /// TCP << - solo farm/mining [ROLL]item
- /// TCP >> - auto win the item [LOOT]won, item, exp
- ////////////////////////////////////////////////////////////////////////////////////////////
- /// TCP >> - open trade [TRADE]id, init
- /// TCP >> - offer / offer [TRADE]id, propose
- /// TCP << - accept the trade [TRADE]id, accept
- ////////////////////////////////////////////////////////////////////////////////////////////
- /// TCP >> - party invitation [INVITE]partyid, guild, person
- /// TCP >> - whisper direct [WHISPER]message
- /// TCP >> - talking in channel [PARTY]message
- /// TCP >> - someone said [GUILD]message
- ////////////////////////////////////////////////////////////////////////////////////////////
- /// TCP >> - zone chat (filtered) [CHAT]public,city, message
- ////////////////////////////////////////////////////////////////////////////////////////////
- /// TCP << - set away/back/busy [STATUS]away/back/busy
- /// TCP << - server block list [BLOCK]person true/false
- /// TCP << - server friends list [FRIEND]person true/false
- ////////////////////////////////////////////////////////////
- /// Database Setup ?
- ///////////////////////////////////////////////////////////
- /// SQL SB QUEUE - TradeEvents
- //////////////////////////////////////////////////////////////////////////////////////
- /// - super fast writes
- /// - A journal of events, playerid, itemid, bossid, groupid
- /// - For recovering the most recent significant events
- /// - Older backups of player state, auction state,
- ///
- /// - items have been received or traded
- /// - group/guild/raid achievements occurred
- /// - player data can be saved
- /// Order of priority for this queue
- /////////////////////////////////////////////////////////////////////////////////////////
- /// 1 ) Events like [LOOT] - raid id, item id, player id
- /// 2 ) Completed [TRADE] - playerid, item id, accept
- /// 3 ) Events where[SHARE] - raid id, exp amt, rep, gold, etc
- /// 4 ) Events [DROP] or [ROLL] - raid id, item id, player id
- ///
- /// 5 ) RaidLock members - raid could continue, or delegate the item
- /// 6 ) Snapshot of dungeon._entities - 3/4 mini dragons dead, raid id, leader id
- /// 7 ) Snapshot of dungeon._entities - players alive/health/xp/level/reputation
- ///
- /// 8 ) Snapshot of world players - those not captured from the raid data
- /// 9 ) Snapshot of world entities - the rest of the entities where they last were
- ///
- /// 10} Player inventory, currency, equipmeny
- /// 11) Auction house and pricehistory snapshot - essentially trades that never happened
- /// Sql Tables
- /////////////////////////////////////////////////////////////////////////////////////////
- /// SQL TABLE TradeEvents
- /// - the superfast queue above
- /// - logs get written here
- /// - server game state continues running the world
- /// - archive snapshots off into their tables every hour/minute/etc
- ///
- /// SQL TABLE WorldEntitiesLog
- /// - the longer term backup
- /// - time, zoneid, entitydata
- ///
- /// SQL TABLE RaidEntitiesLog
- /// - the longer term backup
- /// - time, raidid, entitydata
- ///
- /// SQL TABLE TradesLog - the longer term backup
- /// - time, items, playerid, player2id
- ///
- /// SQL TABLE CharStats
- /// - player exp, level and reputation
- ///
- /// SQL TABLE CharEquip
- /// - playerid legs, head, weapon
- /// - itemid,
- ///
- /// SQL TABLE CharInventory
- /// - playerid slot1, slot2, slot3
- /// - itemid, qty
- ///
- /// SQL TABLE CharCurrency
- /// - playerid gold, silver, bronze
- /// - type, qty
- ///
- /// SQL TBL UserList
- /// - login,fetch their character data, stats, gearid, playerXY
- /// - logout, save their data, stats, gearid, playerXY
- /// - register, create character, and starting stats
- /// - forgot password
- ///
- /// SQL TBL RaidLocks
- /// - playerid
- /// - raidid
- /// - raidgroups id, id, time
- ///
- /// SQL TBL RelationalGroups
- /// - playerid
- /// - guildid
- /// - members id, id, time
- /// - type (eg guild, party, etc)
- ///
- /// SQL TBL AuctionList
- /// - player id, item id, price, qty
- ///
- /// SQL TBL ItemPriceHistory
- /// - itemid, last price
- ////////////////////////////////////////////////////////////
- /// Server CPU Load Estimations
- ///////////////////////////////////////////////////////////
- /// Worst case scenario - Full occupation/engagement of all entities
- // should only be updating what has changed,
- // and where people are looking
- // as players walk around with their cameras, thay mark tiles for updates
- // town npc's dont need to be done every frame
- // world farming players and mobs can be updated at half speed
- // eg AI doesnt need to be updating every frame
- // instance servers may be better off in one loop,
- // eg 1 loop, but collisions only hit their raid ID,
- // like vlans, isolated, but in the same processing loop
- // or 200 smaller loops, and isolated instances of entity manager
- // server will only be doing update/collisions/rng/maths
- ////////////////////////////////////////////////////////////
- /// Multiplayer servers / cluster? etc?
- ///////////////////////////////////////////////////////////
- /// Multiplayer instance server
- /////////////////////////////////////////
- /// x 200 raids concurrent
- ///
- /// terrain 50000 tiles = 200 x 2500
- /// entities 1000 players = 200 x 5
- /// 600 bosses = 200 x 3
- /// 10000 mobs = 200 x 50
- ///
- /// Multiplayer persistent zone server
- /////////////////////////////////////////
- /// x 11 zones overall
- ///
- /// terrain 409,000 total terrain
- /// entities 5000 total mobs
- /// 20000 critters
- /// 100 npc's - constant
- /// 1000 players zones
- /// 500 players city
- ////////////////////////////////////////////////////////////
- /// Multiplayer World Zones
- ///////////////////////////////////////////////////////////
- /// City Zone
- /////////////////////////////////////
- /// x 1 9000 tiles
- /// terrain 30x30 1 zone
- /// entities 30x30 100 npc's
- /// 100 critters
- /// 1-500 players
- /// World Zones (lava, ice, sand, water)
- //////////////////////////////////////
- /// x10 40000 tiles
- /// terrain 200x200 5-10 dungeon entrances
- /// entities 200x200 500 mobs
- /// 2000 critters
- /// 1-100 players Per
- ////////////////////////////////////////////////////////////
- /// Current Single player - Offline / Local
- ///////////////////////////////////////////////////////////
- /// Standalone Raid Instance
- //////////////////////////////////////////////////////
- /// Raid Dungeon 2500 tiles
- /// terrain 50x50 dungeon 3
- /// entities 50x50 1 Boss
- /// 3 miniboss
- /// 50 mobs
- /// 3-5 players
- /// Standalone Dungeon Instance
- //////////////////////////////////////////////////////
- /// Medium dungeon 2500 tiles
- /// terrain 50x50 dungeon 2
- /// entities 50x50 3 miniboss
- /// 30 mobs
- /// 1-3 players
- /// Standalone Dungeon Instance
- //////////////////////////////////////////////////////
- /// Small dungeon 400 tiles
- /// terrain 20x20 dungeon 1
- /// entities 20x20 1 miniboss
- /// 10 mobs
- /// 1 player
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement