Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- STR - increases attack damage
- CON - increases HP
- DEX - decreases attack cooldown, increases hit chance
- AGI - decreases movement cooldown, increases evasion chance
- ==================================
- aoe n means a circle with radius n
- line n means a line with length n
- t cone n means an isosceles triangle with primary angle t and length from corner to opposite midpoint n
- adjacent means the eight squares adjacent to your/target position
- target within n means (centered on) any square within a radius of n
- enemy/ally within n means (centered on) an enemy/ally within a radius of n
- lvl in place of n means your level (no way)
- crabner (crab summoner)
- buffs/debuffs aoes
- 1: buff - target within lvl, summon a totem: allies within 5 gain str/2 str (can apply to self; only the largest bonus applies)
- 2: debuff - target within lvl, summon a totem: enemies within 5 lose str/2 atk (only the largest penalty applies)
- passive: totems have 25% your health
- +STR/-CON
- crabior (crab warrior)
- highest damage
- 1: right claw - attack with right claw, damage adjacent
- 2: left claw - attack with left claw, damage adjacent
- passive: if either attack hits while the other is on cooldown, 25% previous damage is added
- +STR/-DEX
- crabper (crab sniper)
- longest range
- 1: snipe - damage to enemy within 2*lvl
- 2: gill-ish - stealth until movement
- passive: 25% additional damage while stealthed
- +STR/-AGI
- crab, rn (crab, registered nurse)
- heals
- 1: help - heal aoe 5 target within lvl
- 2: fix - heal to (100+lvl)% and grant immunity to 2 hits, ally within lvl
- passive: 25% of any healing done is also applied to self
- +CON/-AGI
- craban (crab shaman)
- control
- 1: pull - yoink an ally or enemy within 2+sqrt(lvl) to adjacent to you
- 2: push - optionally target an ally or enemy within 2+sqrt(lvl); line 2+sqrt(lvl), enemies hit are pushed to adjacent, targeted enemy is pushed to end of line
- passive: each enemy adjacent to the path of a pushed or pulled target has 25% chance to take damage
- +CON/-DEX
- crab with a really thick shell (crab with a really thick shell)
- tank
- 1: shield - nullify next hit
- 2: taunt - enemy within lvl targets you next
- passive: you and allies within 5 take 25% less damage (does not stack)
- +CON/-STR
- crabard (crab wizard)
- largest aoes
- 1: zap - do a zap, damage line lvl adjacent
- 2: boom - do a boom, damage aoe sqrt(lvl) target within lvl
- passive: allies have "only" a 25% chance to be hit by your attacks!!
- +DEX/-STR
- crabinator (crab the terminator)
- fastest attacks
- 1: brbrbrap - shoot assault rifle, damage 30deg cone sqrt(lvl)
- 2: fwooosh - shoot flamethrower, damage 90deg cone sqrt(lvl)/2
- passive: 25% chance for abilities not to be put on cooldown when used
- +DEX/-CON
- crabbot (crab robot)
- is a death cloud
- 1: whirl - spinny blades all around, damage aoe 5
- 2: shrapnel - sharp things in front, damage 150deg cone 5
- passive: enemies within sqrt(25% lvl) take damage upon your movement
- +DEX/-AGI
- crab bond (crab james bond)
- is a spy
- 1: infiltrate - turn invisible until you've moved sqrt(lvl) squares
- 2: sabotage - damage to enemy within 10 (doesn't count against stealth)
- passive: 25% chance to count as an ally whenever targeted
- +AGI/-STR
- crabwayman (crab highwayman)
- fastest
- 1: *is fast* - teleport to target within 2+sqrt(lvl) and damage adjacent each square between
- 2: *is tricksy* - reset movement and *is fast* cooldowns
- passive: if movement is off cooldown, take 25% damage and consume movement cooldown
- +AGI/-CON
- crabpire (crab vampire)
- life drain
- 1: nibble - damage enemy within 1, heal amount dealt
- 2: bat - become a bat, damage adjacent, heal amount dealt, teleport to target within 10
- passive: enemies within 5 receive 25% less healing
- +AGI/-DEX
- ================================
- instances are weekly pvp and pve
- there is one instance per day
- sometimes there are special instances, like daily hardcore or monthly
- at the end of an instance, the top 2% in each class are made legendary in that class
- legendaries have 50% or 12.5% in their passives instead of 25%, whichever is better
- also legendaries count as separate classes, so the 2% cut only includes non-legends
- as far as art, legendaries are the same sprites with inverted colors
- also possible is matchmaking instances
- uses a lobby and a skill rating system
- matches are probably 4v4, maybe 5v5?
- uses a special quadtree structure for a smaller world, perhaps a single tier 3?
- movement is wasd, but those buttons actually control your move-to cursor
- whenever your movement comes off cooldown, you move to the square closest to the move-to cursor
- when you are subjected to a teleport, whether your own, allied, or enemy:
- - if your cursor is on your position, it is moved to your new position
- - otherwise, it remains in its location
- consider the following scenario, given in chronological order:
- players 2 and b are combatting each other
- player 2 uses a forced movement ability that, on player 2's screen, targets player b
- the server receives player 2's ability packet
- player b uses a remote target ability that, on player b's screen, targets player 2
- the server receives player b's ability packet
- player b receives player 2's ability packet
- player 2 receives player b's ability packet
- is it fair for player 2 to be hit by player b's ability? i think not.
- especially consider if player b had lagged for a long period of time and had been pushed multiple times away from player 2
- on the other hand, nothing should favor environmental enemies
- so if player 2 is instead environmental enemy 2, there is no question that it should hit
- there are two solutions to this change in opinion:
- 1. ability packets always encode both absolute and relative positions
- 2. ability packets encode position dependent upon the game mode
- option 1 is more bandwidth, but allows for things like the game mode changing mid-instance
- option 2 is probably better in every realistic way
- part of server info includes whether to transmit ability targets as relative, absolute, or both
- ================================
- the world is quadtrees
- mxn - tier 1 mxn of tier 2
- |
- ___16x16___ - tier 2 16x16 of tier 3, total 512x512 squares
- / | \
- 32x32 32x32 32x32 - tier 3, single quadtree node is 32x32 squares
- this means that a tier 3 quadtree bitmask is 32x32/8 = 32x4 = 128 bytes
- tier 2 is the size that the client knows; 512x512*2 bytes = 512 kibibytes
- we'll use rmo because it's more interoperable with other things in c++ and go
- size of a world depends upon the instance, but number of players can never exceed 65536
- the world is an m*n*16*16*32*32 chunk of memory, or m*n*262144 squares
- the tier 3s are contiguous memory
- tier 2s have auxiliary matrices of pointers into the world
- i.e. a change in quadtree index always corresponds to a change in tier 2 index
- ================================
- obviously we need a crab class
- what the class needs:
- name, class
- level, xp
- str, con, dex, agi
- max hp, current hp
- who is buffing, who is debuffing, who is giving tank passive, who is giving vamp passive
- last damage for warrior passive
- server only:
- kills, deaths, assists
- damage done, healing done
- who has assisted in killing this crab
- -
- action 1
- action 2
- on damage (check have tank passive, highwayman passive)
- on move (check for tank, vampire, and totems, robot passive)
- ===============================
- network stuff
- authentification is done in tcp using ssl like a not-dumb
- the server generates a random 64-bit login token used to feed a cipher
- during ssl, the server sends the number to the client
- once logged in, we switch to udp
- all datagrams are enciphered with whirling ekxe, then with the login token
- then we need multiple udp packet types
- client side:
- common to everything:
- my current 64-bit login token
- sequence number
- packet type
- move waypoint to position:
- new position, 2-int vector, absolute
- use ability:
- ability number 0 or 1 (server knows client's class)
- cursor position, 2-int vector, relative to what the client thinks is its position
- keyframe 1:
- what t3 i think i'm in
- what i think my in-t3 position is
- number of other crabs i know about
- list of relative positions of crabs i know
- list of their healths
- keyframe 2:
- what t3 i think i'm in
- what i think my in-t3 position is
- number of buff totems i know about
- number of debuff totems i know about
- list of relative positions of buff totems i know about
- list of their healths
- list of relative positions of debuff totems i know about
- list of their healths
- pong:
- sequence number of received ping
- time field of received ping
- ack:
- bitset of the recieve status of the last 128 packets
- server side:
- common to everything:
- your current 64-bit login token
- sequence number
- packet type
- update crabs:
- number of crabs
- list of:
- 16-bit crab id (can be you)
- bitset of fields updated
- t3, in-t3 position, hp, xp, level (also includes stats)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement