Skip to content

Instantly share code, notes, and snippets.

View chunk.md

This test shows the difference of sending 16x16 full chunks on the server when using no compression, or using different deflate levels.

Settings:

  • enable-advanced-cache=off
  • max-chunks-per-second=7

The max sending speed is bound by the max-chunks-per-second setting. This test doesn't measures the time used to decompress and parse the chunks by the client. The send time measures the time taken to send all the chunks (send packets, receive ACK, resend lost packets).

| DEFLATE level | UP kB/s | CPU usage | send time |

@shoghicp
shoghicp / namespacer.php
Last active Aug 29, 2015
Tool used on PocketMine-MP to autogenerate Namespace use importing, with automatic collision detection. Abuses PCRE
View namespacer.php
<?php
/*
*
* ____ _ _ __ __ _ __ __ ____
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
*
View PMThreads.php
<?php
class PocketMineInstance extends Thread{
public $cwd;
public $args;
public function __construct($workingDirectory, $args){
$this->cwd = realpath($workingDirectory) . "/";
$this->args = $args;
$this->start(PTHREADS_INHERIT_NONE);
@shoghicp
shoghicp / list.md
Last active Aug 29, 2015
Tech things done by Mojang for Minecraft: Pocket Edition
View list.md

These are a few things requested to Mojang, or the developer themselves, or we were told that they added this.

Done / Confirmed

Thing done Version Notes
Play -> Edit -> External menu 0.7.4
Fix protocol inconsistencies MCPE-6865 0.9.0
@shoghicp
shoghicp / threads.md
Last active Aug 29, 2015
PocketMine-MP Alpha_1.4 Threads
View threads.md

PocketMine-MP Alpha_1.4 Threads

default RCONInstance threads: 1

default AsyncTask Workers: 3

  • (0) Main thread
  • (1) MainLogger [sleeping]
  • (2) CommandReader [sleeping]
  • (3) RakLib networking
@shoghicp
shoghicp / bugs.md
Created Aug 18, 2014
Minecraft: PE v0.9.5 possible bugs
View bugs.md

MovePlayerPacket sends weird yaw values

  • Step 1: Rotate the head in one direction multiple times
  • Step 2: Get MovePlayerPacket with yaw > 360, example: 6407.0166015625
  • This can cause rounding errors after too many rotations

NULL UpdateBlockPacket is sent by the client randomly

  • Step 1: ??? (happens in vanilla and PocketMine)
  • Step 2: Get an UpdateBlockPacket with x, y, z, blockId, blockData all 0 (null)
  • This packet is not meant to be sent by clients, it's only Server -> Client
@shoghicp
shoghicp / bugs.md
Created Aug 18, 2014
Minecraft: PE v0.9.5 possible bugs
View bugs.md

MovePlayerPacket sends weird yaw values

  • Step 1: Rotate the head in one direction multiple times
  • Step 2: Get MovePlayerPacket with yaw > 360, example: 6407.0166015625
  • This can cause rounding errors after too many rotations

NULL UpdateBlockPacket is sent by the client randomly

  • Step 1: ??? (happens in vanilla and PocketMine)
  • Step 2: Get an UpdateBlockPacket with x, y, z, blockId, blockData all 0 (null)
  • This packet is not meant to be sent by clients, it's only Server -> Client
@shoghicp
shoghicp / bugs.md
Created Aug 18, 2014
Minecraft: PE v0.9.5 possible bugs
View bugs.md

MovePlayerPacket sends weird yaw values

  • Step 1: Rotate the head in one direction multiple times
  • Step 2: Get MovePlayerPacket with yaw > 360, example: 6407.0166015625
  • This can cause rounding errors after too many rotations

NULL UpdateBlockPacket is sent by the client randomly

  • Step 1: ??? (happens in vanilla and PocketMine)
  • Step 2: Get an UpdateBlockPacket with x, y, z, blockId, blockData all 0 (null)
  • This packet is not meant to be sent by clients, it's only Server -> Client
@shoghicp
shoghicp / bugs.md
Created Aug 18, 2014
Minecraft: PE v0.9.5 possible bugs
View bugs.md

MovePlayerPacket sends weird yaw values

  • Step 1: Rotate the head in one direction multiple times
  • Step 2: Get MovePlayerPacket with yaw > 360, example: 6407.0166015625
  • This can cause rounding errors after too many rotations

NULL UpdateBlockPacket is sent by the client randomly

  • Step 1: ??? (happens in vanilla and PocketMine)
  • Step 2: Get an UpdateBlockPacket with x, y, z, blockId, blockData all 0 (null)
  • This packet is not meant to be sent by clients, it's only Server -> Client
View keybase.md

Keybase proof

I hereby claim:

  • I am shoghicp on github.
  • I am shoghicp (https://keybase.io/shoghicp) on keybase.
  • I have a public key whose fingerprint is 7E68 21B8 74F3 325D D2CD 2719 BD68 8354 33DA BBE5

To claim this, I am signing this object: