Flatline: Difference between revisions
m (cat.d) |
|||
Line 50: | Line 50: | ||
==Packets== | ==Packets== | ||
;Warning, this isn't the most thought out of sections. | |||
'''PPPPYYZZZZ…''' | '''PPPPYYZZZZ…''' | ||
Line 71: | Line 72: | ||
Server is sending to all players to execute the Dev console command “dmsg("Hello World")” | Server is sending to all players to execute the Dev console command “dmsg("Hello World")” | ||
==Cycling== | ==Cycling== | ||
Revision as of 18:55, 6 December 2008
|
The Flatline Project is the most recent attempt at Multiplayer for Oni. It will combine the knowledge gleaned from projects such as OniPlayer and Neo's engine hacking with new techniques of controlling AI characters to create the first working Multiplayer since the early days of Oni's development.
Status: Most of the pointers needed have been found. Just waiting for networking code to be avaliable so it can be ported to C. A demo should be avaliable in the coming weeks.
Player to Player Communication
Scores
Console write, functionality already in Daodan.
Chat
Chat will probably be handled through an popup input through the daodan.
Internal Communication
Player to Server
- Key bitset
- Mouse X\Y
Server to Player
- Bitsets+XY for all other players
- XYZ location
- Rotation
Dev Mode+Cheats
Only the server itself would have dev mode enabled. Admins would be able to send commands to the server through chat. All players have cheats disabled. (Enforceable through Daodan etc.)
Packets
- Warning, this isn't the most thought out of sections.
PPPPYYZZZZ…
PPPP = Destination players. Hex =>Binary etc If player limit was kept at 6, only one byte would be needed. Any more than that requires one more byte. Player => Server communication uses 0000 Server=> All players uses FFFF
YY =.Datatype
- 01 = Dev console command
- 02 = Keyboard bitset+XY
- 03 = XYZ position
- 04 = etc.
ZZZZ… = Data used with YY.
Example:
FFFF 01 646D7367282248656C6C6f20576f726C642229
Server is sending to all players to execute the Dev console command “dmsg("Hello World")”
Cycling
Class Changing
As dev mode is disabled (along with all cheats), we can use the Daodan to detect F8 being pressed, and not worry about the game also using that input.
At connection, the server would send a list of available characters. Pressing F8 in game (if allowed by server) sends out a dev mode command to all players to “chr_set_class player nextmodel”. Player being the player name or number, and nextmodel being pulled from the list.
Gun Cycling
If available (and implemented) gun cycling would work much like the above.
Maps
Probably done through level plugins that use levels 64-127. This has the advantage of being hidden on the level list. These maps would have specialized CHAR\PART\whatever tailored to MP gameplay. Of course a console map change command would need to be implemented. (win\lose level, and change current level number, through hex overwriting)