-
Notifications
You must be signed in to change notification settings - Fork 7
Home
Karmel0x edited this page Dec 8, 2022
·
5 revisions
Core - core functions containing most basic functions which are necessary for project like networking etc.
Functions - additional functions which are necessary for project but doesn't fits to core, rather used for logic
-
Functions/PositionHelper - position related functions, mainly to calculate range
- CENTER_TO_CENTER (base) used for targeted skills
- CENTER_TO_EDGE used for skill shots
- EDGE_TO_CENTER
- EDGE_TO_EDGE used for basic attacks
Game - functions which are necessary for specific game type (moba)
-
Game/Components - here we have things like:
- MovementSimulation which is used to handle move on server side
- Pathfinding used to find path avoiding obstacles
-
Spawn used to handle
minionspawn times
-
Game/DataMethods - here we have abstract classes which must be used in
Game/LeagueData
-
Game/LeagueData - here we have specific game things (league)
- Characters - specific characters stuff (spells, passive, attacks, walking, etc.)
- Items - specific items stuff (actives, passives, stats, etc.)
- Summoners - summoner spells stuff (flash, heal, etc.)
-
Game/Initializers
- Game/Initializers/Game - starting game stuff
- Game/Initializers/Team - creating teams stuff
GameObjects - basically every possible object in game which has own position and netId (identificator)
- GameObjects/GameObject this file contains (abstract) basic game object, extends to:
-
GameObjects/Traits - can be used to extend classes (usage example)
- they are segregated by categories like IAttackable, IMovable and more..
- by extending like that, we can use this methods directly in the same object (for example you can use
this.heal(hp)
in Player which are defined in IDefendable)
-
EventEmitter - also important to mention that we can use events on
GameObjects
-
GameObjects/Filters (probably will be changed) here we have filters to use in
GameObjects
withthis.Filters([PositionHelper type]).[methods from _Filters and /Functions/PositionHelper]
Handlers - how program should respond to specific packet
Packets - packet structures (S2C - server to client, C2S - client to server)
-
packet-inspector probably most important tool atm, which helps you to:
- inspect packets - run packet-inspector, open your browser, load packet replays
- parse packets - run packet-inspector, open your browser, click
add packet
and paste hex data - monitor packets - run packet-inspector, open your browser, then run server, packets from server will appear in your browser in real time
- initializing packet
var packet = global.Network.createPacket('PacketName'); // probably will be changed to: // var PacketName = require('/Packets/S2C/PacketName') // var packet = new PacketName();
- setting packet properties
//packet.netId = this.netId; packet.someProperty = 1234;
- sending packet (these functions exists but aren't finished yet)
// sending packet to everyone this.sendTo_everyone(packet); // sending packet to specific player this.sendTo_self(packet); // sending packet to players which has vision on you this.sendTo_vision(packet); // sending packet to team this.sendTo_team(packet);