Difference between revisions of "Developer:Opcodes"

(Created page with "'''EQ2Emulator -- Opcodes Explained''' This page is incomplete! An [http://http://en.wikipedia.org/wiki/Opcode Opcode] ('''op'''eration '''code''') are instructions sent via n...")
 
Line 1: Line 1:
 
'''EQ2Emulator -- Opcodes Explained'''
 
'''EQ2Emulator -- Opcodes Explained'''
 
This page is incomplete!
 
 
  
 
An [http://http://en.wikipedia.org/wiki/Opcode Opcode] ('''op'''eration '''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.  
 
An [http://http://en.wikipedia.org/wiki/Opcode Opcode] ('''op'''eration '''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.  
Line 16: Line 13:
 
This is the non-technical process. To get a little more technical, I will demonstrate  
 
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) --
+
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):
 
 
 
 
 
 
  
  
The simplest example of this might be when a player attacks an NPC.
+
(more to come)

Revision as of 12:13, 8 February 2012

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)