Flatline

From OniGalore
Revision as of 08:08, 18 October 2008 by Gumby (talk | contribs)
Jump to navigation Jump to search
The Development Team
Head Developer: Gumby
Resident Coder: RossyMiles
Advisors: geyser
Neo

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

File:Flatline 1.PNG
A mock up of the chat+score system

Scores

Console write, functionality already in Daodan.

Chat

Saw a screenshot once of a hidden chat box, need to figure out if it does anything, chat could either be done through a dmsg or console write (though that would make scores go away…maybe a toggle button or something)

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

XXPPPPYYZZZZ…


XX = Sender. If XX=FF then server communication. All others use the server designated player number.

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:

FF 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)