DarkRift Plugin Sharing Area!

This is a place to put any plugins for DarkRift Networking so that others can find them. I’ll try to keep a list up here so that they can be easily found :slight_smile:

Submission Guidelines
If you’re adding a plugin to the list here please make sure you try and do these:

  • Keep it as generic as possible. If your plugin is only ever going to be useful to your game then others are unlikely to need it. Try and make sure that as many different people can use it as possble.
  • Describe it! Make sure people know what your plugin does! Try to be fairly specific but keep it short, tell people how your plugin will benefit them!
  • Include instructions. No one likes to be in the dark so make sure that your plugin is well documented with how to set it up, how to use it, what stuff does and what all the public functions do!
  • Make it flexible. Make sure that people can use it in as many games as possible, that means making sure tags and subjects can be easily adjusted and that it isn’t too specialised.

Plugins
Database Connectors

Other

Thank you to everyone that publishes their plugins,
Jamie

2 Likes

MySQL Connector

This is the official connector for MySQL databases. It allows your plugins and games to communicate with a MySQL server using the builtin database integration in DarkRift.

Requires a MySQL server running somewhere and DarkRift V1.2

GitHub Link

Login Plugin

This is a basic login plugin for DarkRift, it allows players to create accounts, login and logout. There’s a simple client interface for your games that handles all the calls to the server and hosts events for your games to use. This isn’t 100% secure as it’s more of a starting point/demonstration but it’s probably suitable for a lot of games. :slight_smile:

Requires a database plugin and DarkRift V1.2

GitHub Link

1 Like

This one is set up for lockstep games. It is kind of specific but if you’re making a game that needs aggregated data (i.e. server distributing data 10 times a second), this will work. It receives packets from all players then distributes it to everyone. Read more about it here, how to implement the client-side part. Note that in a lockstep game using a server, confirmation is not needed. Just don’t advance a frame if there is no packet for the frame.

Tags
0: Reserved; later on will be used for logins, data retrieval, etc. (Note: Not implemented yet)
1: Room data; after a player joins a room, data sent with tag 1 will be distributed throughout the room. The subject must be the room number for the server to recognize which room the player is in (I’ll probably make this more efficient later on and store the player’s corresponding room on the server rather than have the player send the room’s ID).
2: Meta; with subject 0 and object a byte defining how many players are in the room, the server tries to find a room. If no available rooms are found, create a new room with the maximum players defined by the object.

Once a room is full, it will start sending out packets for every frame, starting with frame 0, with the subject as the room number and tag of 1 (Room Data). The first 4 bytes in the object (which is a byte[ ]) is an int32 representing the frame count. All data after that is any data you distributed from clients. It’s recommended to store the room number in a variable on step 0 so you can send messages back to the correct room.

Download Link: Dropbox - Error - Simplify your life

Right now I’m focusing on the local side of the game but I’m definitely going to keep working on this plugin later on.

Awesome, thank you,

one plugin that can be really useful for most games can be a db manager plugin.
something that will ease the pain to allow persistent data to the game.

since you already have the db connection plugin and login plugin the persistent
dbmanager can be created genericly

something as easy as ie:
Saving players info
dbManager.writetoDb(dbName, dbTable, playerId, arg1,arg2,arg3…);

or loading player info
dbManager.loadfromDb(dbName, dbTable, playerId, arg1,arg2,arg3…);

or updating etc…

now this can come really handy and can be use pretty much to any games

BTW
@Jamster Istill havent hear from you since when i pm you with my info to join the beta testers group.
let me know.
thanks

Hey sorry about that,
Can you send the email again? I emailed someone a beta package but maybe that wasn’t you :slight_smile:

Jamie

Dark Rift Essentials Plugin 1.1
Essentials improves functionality of the server console by adding very important commands that are very useful when developing games like “help” which lists all the commands including others from different plugins. It also offers “findip” which allows you find your public IP to allow others to connect. The list of rest of the commands and up coming features are included in the download
For more information please check out my thread here.

Download link:
Essentials 1.1

Any chance you can fix the download link? :slight_smile:

I’m trying to contact the author for you! I’ll hopefully get you a different link! :slight_smile:

Their website’s back online now :slight_smile:

MySqlConnector and LoginPlugin now open source!

Yup! I finally got round to putting them on GitHub (and also learning how to use GitHub at the same time!) so everyone can now add their own upgrades and bugfixes to them :slight_smile: Go for it!

The download link for the Lockstep Plugin appears to be dead :frowning:

@jpthek9 :slight_smile:

Hi is this still being developed on? And I’m interested in the lockstep plugin too if someone can give me a link/message, thanks in advance.

DarkRift is still maintained yup! Plus DarkRift 2 is also on the way :slight_smile:

I haven’t seen JP around recently, the lockstep framework is included in his DPhysics asset store pack I think and he’s still got a Github for it here but I don’t know how much that version is integrated with DarkRift.

Ah, yeah. Look for DarkRiftNetworkHelper on github. It’s maintained for the new DarkRift as well as for LS Framework updates.

1 Like

I tried the MySQL plugin but I get an error:

[Error] Plugin C:\Users\Knut\Documents\DarkRiftServer - Free\Plugins\MySQLConnector.dll failed to load:
System.BadImageFormatException: Could not load file or assembly ‘file:///C:\Users\name\Documents\DarkRiftServer - Free\Plugins\MySQLConnector.dll’ or one of its dependencies. An attempt was made to load a program with an incorrect format.
File name: ‘file:///C:\Users\Knut\Documents\DarkRiftServer - Free\Plugins\MySQLConnector.dll’
at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[ ] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark& stackMark)
at System.Reflection.Assembly.LoadFrom(String assemblyFile)
at DarkRift.PluginManager.LoadPluginsFromFolder()

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

I put the 4 dlls it requires in the Plugins/lib folder. I also tried the root lib folder.

Sounds like it’s to do with how it was compiled, make sure you compile for Any CPU rather than x86 or x64 :slight_smile:

OK the issue was I needed to build it. I just tried the one prebuilt:)

Edit: Now I am just having issue with connecting from DarkRift to MySQL… I have tested creating some DBs/users, and the connection works in MySQL workbench, but always get authentication error in DarkRift. From what I’ve found it seems I must grant some privilege to connect? But I have the % as location to signal anywhere is fine.

Unhandled Exception: DarkRift.DatabaseException: Authentication to host ‘localhost’ for user ‘root’ using method ‘mysql_native_password’ failed with message: Access denied for user ‘root’@‘localhost’ (using password: YES) —> MySql.Data.MySqlClient.MySqlException: Authentication to host ‘localhost’ for user ‘root’ using method ‘mysql_native_password’ failed with message: Access denied for user ‘root’@‘localhost’ (using password: YES) —> MySql.Data.MySqlClient.MySqlException: Access denied for user ‘root’@‘localhost’ (using password: YES)
at MySql.Data.MySqlClient.MySqlStream.ReadPacket()
at MySql.Data.MySqlClient.Authentication.MySqlAuthenticationPlugin.ReadPacket()
— End of inner exception stack trace —
at MySql.Data.MySqlClient.Authentication.MySqlAuthenticationPlugin.AuthenticationFailed(Exception ex)
at MySql.Data.MySqlClient.Authentication.MySqlAuthenticationPlugin.ReadPacket()
at MySql.Data.MySqlClient.Authentication.MySqlAuthenticationPlugin.Authenticate(Boolean reset)
at MySql.Data.MySqlClient.NativeDriver.Open()
at MySql.Data.MySqlClient.Driver.Open()
at MySql.Data.MySqlClient.Driver.Create(MySqlConnectionStringBuilder settings)
at MySql.Data.MySqlClient.MySqlPool.GetPooledConnection()
at MySql.Data.MySqlClient.MySqlPool.TryToGetDriver()
at MySql.Data.MySqlClient.MySqlPool.GetConnection()
at MySql.Data.MySqlClient.MySqlConnection.Open()
at MySQLConnector.Connector.ExecuteNonQuery(String query, QueryParameter[ ] parameters)
— End of inner exception stack trace —
at MySQLConnector.Connector.ExecuteNonQuery(String query, QueryParameter[ ] parameters)
at LoginPlugin.LoginPlugin.AddUserToDatabase(String username, String password)
at DarkRift.Interface.ExecuteCommand(String input)
at DarkRift.Program.Main(String[ ] args)

Ah… if that’s the case it’s my fault!