Rocket Packets
Rocket Packets is a powerful and intuitive networking package for Unity, designed to streamline multiplayer game development. It simplifies packet sending and receiving.
by Byte Cobra
Price History +
Simplify and streamline your multiplayer networking in Unity with Rocket Packets. This robust and intuitive library helps you send and receive packets across the network with minimal lines of code.
Key Features:
- Effortless Packet Sending & Receiving: Send and receive data with just one line of code.
- Reliable Communication: Send packets and await responses within the same block of code, making network communication cleaner and easier.
- Cached Packets: Never leave your late joiners out. Cache essential packets to ensure all players are in sync, even those who join later can recieve packets that were sent before they joined.
Whether you're creating a cooperative multiplayer adventure or a competitive arena, Rocket Packets empowers you to focus on crafting your game's unique experiences without getting bogged down by networking complexities.
Cached Game State for Late Joiners: In online games, it's crucial that every player has the most up-to-date game state. You can use Rocket Packets to cache the game state and send it to players as they join:
ushort gameStatePacketID = 7001;
RocketManager.SendAllCached(gameStatePacketID, writer =>
{
writer.WriteString(serializedGameState);
});
Sending Player-Specific Data: There are times when you want to send data to a specific player. With Rocket Packets, you can send packets to a targeted client. For example, when a player's status changes in a game:
ushort statusPacketID = 6001;
int targetClientID = // The ID of the targeted client
RocketManager.SendToClient(targetClientID, new RocketPacketMessage(statusPacketID, writer =>
{
writer.WriteInt32(playerID);
writer.WriteString(newStatus);
}));
Client-Server Communication: Clients can also send data to the server and await a response. Here's an example where a client sends a request to the server and handles the response:
ushort requestPacketID = 8001;
ushort responsePacketID = 8002;
// Client sends a request to the server
RocketManager.SendToServer(new AnswerableRocketPacketMessage(requestPacketID, writer =>
{
writer.WriteString("Request Data");
}, responsePacketID, (responsePacket) =>
{
// Handle the response from the server
string responseData = responsePacket.Reader.ReadString();
Debug.Log("Response Data: " + responseData);
}));
With Rocket Packets, multiplayer game development has never been easier. Equip your project with efficient networking, clear code structure, and a smooth developer experience, all achievable with this single, robust package.
So why wait? Embark on your multiplayer game development journey with Rocket Packets and redefine the gaming experience you provide.