Here is the beta version of the A6Network plugin. It replaces all internal mp functions and adds new capabilities to the engine.
The beta has no locked features, you only get a message box while creating a server instance. I won't tell you how wonderful the world is, so just click the download link and while downloading take a look at the feature list
http://worldawake.eu.tc/public/A6Network_Beta.rar A basic function description and a demo app are included. _Please give me ALOT of feedback, no matter if it's good or bad_.
NOTE: This release is only for LITE-C.
Feature list:
- Basic and advanced sending functions
- Great event system
- Secure connections
- Network simulator ( simulating bad connections )
- LAN server list
- Advanced player managerment functions such as ban and kick
- Client File check
- VOIP
- Trackers (track state of var/string/entity and send to client/server is changed, with scalable delay between sending)
Code:
// ***************************************************************
// Copyright (C) 2006/2007 Bloodline except otherwise marked.
// All Rights reserved.
// -------------------------------------------------------------
// file: A6Network | date: 2/2/2007
// -------------------------------------------------------------
// purpose: A6Network Plugin Version 0.9 b
// ***************************************************************
#ifndef _A6Network_h_
#define _A6Network_h_
typedef struct
{
char* IP;
int Port;
} Net_SystemAddress;
//////////////////////////////////////////////////////////////////////////
// Client functions
// Core
void Net_ClCreate();
BOOL Net_ClStartup(char* _DefaultEntity);
BOOL Net_ClConnect( Net_SystemAddress* Address, char* Password );
void Net_ClDisconnect();
void Net_ClDestroy();
BOOL Net_ClIsConnected();
// Network Simulator
void Net_ClApplyNetworkSimulator(int maxSendBPS, int minExtraPing, int extraPingVariance);
// Security
void Net_ClInitializeSecurity();
void Net_ClDisableSecurity();
// Sending functions
void Net_ClSendVar( char* VarName, int Reliability, int Priority, BOOL Broadcast );
void Net_ClSendArray( char* ArrayName, int length, int Reliability, int Priority, BOOL Broadcast );
void Net_ClSendString( char* StringName, int Reliability, int Priority, BOOL Broadcast );
void Net_ClSendEntity( ENTITY* SourceEntity, int WhatToSend, int Reliability, int Priority, BOOL Broadcast );
void Net_ClRegisterEntity( ENTITY* SourceEntity );
void Net_ClSendEvent( int ID, int Reliability, int Priority, BOOL Broadcast );
void Net_ClSendChatMsg( char* StringName, char* FunctionName, int Priority );
void Net_ClSendClientInformation( char* Name );
// Events
void Net_ClEventFunctionsReset();
void Net_ClEventFunctionReset(int ID);
void Net_ClEventSetFunction(int ID, char* Name);
// File validation
void Net_ClFileVerificationAddFile(char* Name, BOOL RequiredFile);
void Net_ClFileVerificationActivate();
void Net_ClFileVerificationDeactivate();
// LAN Server search
void Net_ClLANPing(int ServerPort);
void Net_ClLANResetList();
int Net_ClLANGetServerListCount();
Net_SystemAddress* Net_ClLANGetServerFromList(int ID);
// VOIP
void Net_ClVoiceStartup();
void Net_ClVoiceMuteMircrofon();
void Net_ClVoiceUnmuteMircrofon();
void Net_ClVoiceRequestChannel();
void Net_ClVoiceRelease();
//////////////////////////////////////////////////////////////////////////
// Server functions
// Core
void Net_SvCreate();
int Net_SvStartup( int MaxPlayers, int ServerPort, char* Password, char* _DefaultEntity );
int Net_SvGetClientIDFromLastMessage();
void Net_SvWriteStatisticsToFile(char* Filename);
void Net_SvDestroy();
// Network Simulator
void Net_SvApplyNetworkSimulator(int maxSendBPS, int minExtraPing, int extraPingVariance);
// Security
void Net_SvInitializeSecurity();
void Net_SvDisableSecurity();
// MTU
void Net_SvSetMTUSize(int Size);
// Player Managerment
int Net_SvGetConnectedPlayers();
char* Net_SvClientListGetNameByID( int Index );
int Net_SvClientListGetIDByName( char* Name );
void Net_SvKickPlayerWithID( int ID );
void Net_SvKickAllPlayers();
void Net_SvBanPlayerWithID( int ID, int Time );
void Net_SvBanPlayerWithIP( char* IP, int Time );
void Net_SvRemovePlayerBanWithID( int ID );
void Net_SvRemovePlayerBanWithIP( char* IP );
char* Net_SvGetIPfromID( int ID );
void Net_SvRedirectClient(char* IP, int ServerPort, int SysAddress, BOOL Broadcast);
// Sending functions
void Net_SvSendVar( char* VarName, int Reliability, int Priority, int SysAddress, BOOL Broadcast );
void Net_SvSendArray( char* ArrayName, int length, int Reliability, int Priority, int SysAddress, BOOL Broadcast );
void Net_SvSendString( char* StringName, int Reliability, int Priority, int SysAddress, BOOL Broadcast );
void Net_SvSendEntity( ENTITY* SourceEntity, int WhatToSend, int Reliability, int Priority, int SysAddress, BOOL Broadcast );
void Net_SvRegisterEntity( ENTITY* SourceEntity );
void Net_SvSendEvent( int ID, int Reliability, int Priority, int SysAddress, BOOL Broadcast );
void Net_SvSendChatMsg( char* StringName, char* FunctionName, int SysAddress, BOOL Broadcast );
void Net_SvAddObjectToBlacklist( char* ObjectName );
BOOL Net_IsOnBlacklist( char* ObjectName );
// Events
void Net_SvEventFunctionsReset();
void Net_SvEventFunctionReset(int ID);
void Net_SvEventSetFunction(int ID, char* Name);
// Trackers
void Net_SvTrackVar(char* VarName, int Reliability, int Priority, int SysAddress, BOOL Broadcast, int SendDelay);
void Net_SvTrackArray(char* ArrayName, int Length, int Reliability, int Priority, int SysAddress, BOOL Broadcast, int SendDelay);
void Net_SvTrackString(char* StringName, int Reliability, int Priority, int SysAddress, BOOL Broadcast, int SendDelay);
// File validation
void Net_SvFileVerificationAddFile(char* Name, BOOL RequiredFile);
void Net_SvFileVerificationActivate();
void Net_SvFileVerificationDeactivate();
void Net_SvFileVerificationSetOnUnknown(char* Function);
void Net_SvFileVerificationSetOnFailed(char* Function);
// VOIP
void Net_SvVoiceStartup();
void Net_SvVoiceMuteMircrofon();
void Net_SvVoiceUnmuteMircrofon();
void Net_SvVoiceRelease();
//////////////////////////////////////////////////////////////////////////
// Packet Entity Data
#define Net_EntData_Position 1 // Data to send: Position
#define Net_EntData_Angle 2 // Data to send: Angle
#define Net_EntData_Size 4 // Data to send: Size
#define Net_EntData_Albedo 8 // Data to send: Albedo
#define Net_EntData_Alpha 16 // Data to send: Alpha
#define Net_EntData_Ambient 32 // Data to send: Ambient
#define Net_EntData_Lightrange 64 // Data to send: Lightrange
#define Net_EntData_Type 128 // Data to send: Modell file
#define Net_EntData_Skills 256 // Data to send: Skills
#define Net_EntData_CreateIfNotSet 512 // Data to send: Entity
//////////////////////////////////////////////////////////////////////////
// Packet Priority
#define Net_Priority_High 1
#define Net_Priority_Medium 2
#define Net_Priority_Low 3
//////////////////////////////////////////////////////////////////////////
// Packet Reliability
#define Net_Reliability_UNRELIABLE 1
#define Net_Reliability_UNRELIABLE_SEQUENCED 2
#define Net_Reliability_RELIABLE 3
#define Net_Reliability_RELIABLE_ORDERED 4
#define Net_Reliability_RELIABLE_SEQUENCED 5
//////////////////////////////////////////////////////////////////////////
// System Address
#define Net_UNASSIGED_ADDRESS -1
//////////////////////////////////////////////////////////////////////////
// Events
int Net_EventGetID(char* EventType); // Internal function
#define Net_Event_ConnectionRequestAcceppted Net_EventGetID("ID_CONNECTION_REQUEST_ACCEPTED");
#define Net_Event_ConnectionAttemptFailed Net_EventGetID("ID_CONNECTION_ATTEMPT_FAILED");
#define Net_Event_AlreadyConntected Net_EventGetID("ID_ALREADY_CONNECTED");
#define Net_Event_NewIncommingConntection Net_EventGetID("ID_NEW_INCOMING_CONNECTION");
#define Net_Event_NoFreeConntections Net_EventGetID("ID_NO_FREE_INCOMING_CONNECTIONS");
#define Net_Event_Disconnected Net_EventGetID("ID_DISCONNECTION_NOTIFICATION");
#define Net_Event_ConntectionLost Net_EventGetID("ID_CONNECTION_LOST");
#define Net_Event_ConntectionBanned Net_EventGetID("ID_CONNECTION_BANNED");
#define Net_Event_InvalidPassword Net_EventGetID("ID_INVALID_PASSWORD");
#define Net_Event_ModifiedPacket Net_EventGetID("ID_MODIFIED_PACKET");
#define Net_Event_A6Var Net_EventGetID("ID_A6_VAR");
#define Net_Event_A6Array Net_EventGetID("ID_A6_ARRAY");
#define Net_Event_A6String Net_EventGetID("ID_A6_STRING");
#define Net_Event_A6Entity Net_EventGetID("ID_A6_ENTITY");
#define Net_Event_A6ChatMessage Net_EventGetID("ID_A6_CHAT_MESSAGE");
#define Net_Event_A6BlacklistFilteredItem Net_EventGetID("ID_A6_SV_BLACKLIST_FILTERED_ITEM");
#define Net_Event1 101
#define Net_Event2 102
#define Net_Event3 103
#define Net_Event4 104
#define Net_Event5 105
#define Net_Event6 106
#define Net_Event7 107
#define Net_Event8 108
#define Net_Event9 109
#define Net_Event10 110
#define Net_Event11 111
#define Net_Event12 112
#define Net_Event13 113
#define Net_Event14 114
#define Net_Event15 115
#define Net_Event16 116
#define Net_Event17 117
#define Net_Event18 118
#define Net_Event19 119
#define Net_Event20 120
#define Net_Event21 121
#define Net_Event22 122
#define Net_Event23 123
#define Net_Event24 124
#define Net_Event25 125
#define Net_Event26 126
#define Net_Event27 127
#define Net_Event28 128
#define Net_Event29 129
#define Net_Event30 130
#define Net_Event31 131
#define Net_Event32 132
#define Net_Event33 133
#define Net_Event34 134
#define Net_Event35 135
#define Net_Event36 136
#define Net_Event37 137
#define Net_Event38 138
#define Net_Event39 139
#define Net_Event40 140
#define Net_Event41 141
#define Net_Event42 142
#define Net_Event43 143
#define Net_Event44 144
#define Net_Event45 145
#define Net_Event46 146
#define Net_Event47 147
#define Net_Event48 148
#define Net_Event49 149
#define Net_Event50 150
#define Net_Event51 151
#define Net_Event52 152
#define Net_Event53 153
#define Net_Event54 154
#define Net_Event55 155
#define Net_Event56 156
#define Net_Event57 157
#define Net_Event58 158
#define Net_Event59 159
#define Net_Event60 160
#endif
Have a nice day,
TWO alias Bloodline