No categories assigned

Developer:Opcodes

Revision as of 12:13, 8 February 2012 by John adams (talk | contribs)

EQ2Emulator -- Opcodes Explained

An Opcode (operation code) are instructions sent via network packets between two running applications, be it server->server, server->client or client->server. These packets contain special instructions as to what function they are expected to perform, and/or what data to return.


Basic example of an opcode transaction between a server and a client:

Server needs to know a players current position, so it may update that position to all over players in the area
Server asks Client "Hey, what is player_1's x,y,z,heading by sending an Opcode to the client
Client receives the specific opcode, and knows "Server wants to know where player_1 is"
Client then reports back to server, in another opcode packet "Player_1 is {right here}"
Server can then tell the other players in the area the whereabouts of player_1

This is the non-technical process. To get a little more technical, I will demonstrate

For EQ2Emulator, our ```opcodes``` are unique to different client versions in most cases, so our opcodes table is laid out as follows (using a single opcode as an example):


(more to come)