Giter Site home page Giter Site logo

organization / rapidpm Goto Github PK

View Code? Open in Web Editor NEW
31.0 9.0 2.0 12.82 MB

High performance extension that implements parts of PocketMine-MP (PMMP) with Zephir

License: GNU General Public License v3.0

Zephir 96.44% PHP 1.19% Shell 2.37%
pmmp pmmp-extension pmmp-math zephir php-extension rapidpm pocketmine-mp bedrock-edition

rapidpm's Introduction

RapidPM Logo

RapidPM Build Status

High-performance PHP extension that implements parts of PocketMine-MP with Zephir.

Why should we use RapidPM?

The most used server software for "Minecraft: Bedrock Edition" is PocketMine-MP, which is written in PHP.

PocketMine-MP requires massive resource because of the nature of the game server, but PHP causes the slow-down issues for this.

The only way to fix this issue is to eradicating the rotten root: escaping from PHP and rewriting the code into another language.

RapidPM will do this for you.

How to install?

See this comment.

Why Zephir?

Zend API of PHP is very difficult to handle and C is memory-unsafe.

Our solution to fix this issue is writing the code with Zephir, an intuitive and memory safety ensured language.

License

This project is licensed under GPL-3.0. See the LICENSE file for more information.

rapidpm's People

Contributors

jellybrick avatar mcpe-pc avatar nnnlog avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

jellybrick

rapidpm's Issues

BinaryStream::offset does not increase

[04:59:03.446] [Server thread/CRITICAL]: Error: "Maximum function nesting level of '256' reached, aborting!" (EXCEPTION) in "vendor/pocketmine/nbt/src/BaseNbtSerializer" at line 181
[04:59:03.446] [Server thread/DEBUG]: #0 vendor/pocketmine/nbt/src/BaseNbtSerializer(181): Pocketmine\Utils\BinaryStream->getByte()
[04:59:03.446] [Server thread/DEBUG]: #1 vendor/pocketmine/nbt/src/tag/CompoundTag(463): pocketmine\nbt\BaseNbtSerializer->readByte()
[04:59:03.446] [Server thread/DEBUG]: #2 vendor/pocketmine/nbt/src/ReaderTracker(47): pocketmine\nbt\tag\CompoundTag::pocketmine\nbt\tag\{closure}()

pocketmine\world\format\io\exception\CorruptedWorldException: "Corrupted world data: Expected TAG_Compound at the start of buffer" (EXCEPTION) in "src/world/format/io/data/BaseNbtWorldData" at line 57

[16:36:52.624] [Server thread/CRITICAL]: pocketmine\world\format\io\exception\CorruptedWorldException: "Corrupted world data: Expected TAG_Compound at the start of buffer" (EXCEPTION) in "src/world/format/io/data/BaseNbtWorldData" at line 57
[16:36:52.624] [Server thread/DEBUG]: #0 src/world/format/io/leveldb/LevelDB(136): pocketmine\world\format\io\data\BaseNbtWorldData->__construct(string[87] /home/travis/build/organization/RapidPM/PocketMine-MP/test_data/worlds/world//le)
[16:36:52.624] [Server thread/DEBUG]: #1 src/world/format/io/BaseWorldProvider(45): pocketmine\world\format\io\leveldb\LevelDB->loadLevelData()
[16:36:52.625] [Server thread/DEBUG]: #2 src/world/format/io/leveldb/LevelDB(125): pocketmine\world\format\io\BaseWorldProvider->__construct(string[77] /home/travis/build/organization/RapidPM/PocketMine-MP/test_data/worlds/world/)

Build error on linux

/RapidPM/ext/pocketmine/math/axisalignedbb.zep.c: In function ‘zim_Pocketmine_Math_AxisAlignedBB_calculateXOffset’:
/RapidPM/ext/pocketmine/math/axisalignedbb.zep.c:913:4: error: incompatible types when assigning to type ‘zval’ {aka ‘struct _zval_struct’} from type ‘double’
  x = zephir_get_doubleval(x_param);
    ^
/RapidPM/ext/pocketmine/math/axisalignedbb.zep.c: In function ‘zim_Pocketmine_Math_AxisAlignedBB_calculateYOffset’:
/RapidPM/ext/pocketmine/math/axisalignedbb.zep.c:1002:4: error: incompatible types when assigning to type ‘zval’ {aka ‘struct _zval_struct’} from type ‘double’
  y = zephir_get_doubleval(y_param);
    ^
/RapidPM/ext/pocketmine/math/axisalignedbb.zep.c: In function ‘zim_Pocketmine_Math_AxisAlignedBB_calculateZOffset’:
/RapidPM/ext/pocketmine/math/axisalignedbb.zep.c:1091:4: error: incompatible types when assigning to type ‘zval’ {aka ‘struct _zval_struct’} from type ‘double’
  z = zephir_get_doubleval(z_param);
 Warning: Passing possible incorrect type for parameter: Pocketmine\Math\Vector3::getIntermediateWithXValue(x), passing: undefined, expecting: double in F:\Dev\FastMine\pocketmine\math\axisalignedbb.zep on line 537 [possible-wrong-parameter-undefined]

                let v1 = pos1->getIntermediateWithXValue(pos2, this->minX);

        ------------------------------------------------------------------^
 Warning: Passing possible incorrect type for parameter: Pocketmine\Math\Vector3::getIntermediateWithXValue(x), passing: undefined, expecting: double in F:\Dev\FastMine\pocketmine\math\axisalignedbb.zep on line 538 [possible-wrong-parameter-undefined]

                let v2 = pos1->getIntermediateWithXValue(pos2, this->maxX);

        ------------------------------------------------------------------^
 Warning: Passing possible incorrect type for parameter: Pocketmine\Math\Vector3::getIntermediateWithYValue(y), passing: undefined, expecting: double in F:\Dev\FastMine\pocketmine\math\axisalignedbb.zep on line 539 [possible-wrong-parameter-undefined]

                let v3 = pos1->getIntermediateWithYValue(pos2, this->minY);

        ------------------------------------------------------------------^
 Warning: Passing possible incorrect type for parameter: Pocketmine\Math\Vector3::getIntermediateWithYValue(y), passing: undefined, expecting: double in F:\Dev\FastMine\pocketmine\math\axisalignedbb.zep on line 540 [possible-wrong-parameter-undefined]

                let v4 = pos1->getIntermediateWithYValue(pos2, this->maxY);

        ------------------------------------------------------------------^
 Warning: Passing possible incorrect type for parameter: Pocketmine\Math\Vector3::getIntermediateWithZValue(z), passing: undefined, expecting: double in F:\Dev\FastMine\pocketmine\math\axisalignedbb.zep on line 541 [possible-wrong-parameter-undefined]

                let v5 = pos1->getIntermediateWithZValue(pos2, this->minZ);

        ------------------------------------------------------------------^
 Warning: Passing possible incorrect type for parameter: Pocketmine\Math\Vector3::getIntermediateWithZValue(z), passing: undefined, expecting: double in F:\Dev\FastMine\pocketmine\math\axisalignedbb.zep on line 542 [possible-wrong-parameter-undefined]

                let v6 = pos1->getIntermediateWithZValue(pos2, this->maxZ);

        ------------------------------------------------------------------^
    /**
     * Returns a new vector with x value equal to the second parameter, along the line between this vector and the
     * passed in vector, or null if not possible.
     *
     * @param Vector3 $v
     * @param float   $x
     *
     * @return Vector3|null
     */
    public function getIntermediateWithXValue(<Vector3> v, float x) -> <Vector3>|null
    {
        var f;
        var xDiff;
        let xDiff = v->x - this->x;
        if (xDiff * xDiff < 0.0000001) {
            return null;
        }
        let f = (x - this->x) / xDiff;
        if (f < 0 || f > 1) {
            return null;
        } else {
            return new Vector3(x, this->y + (v->y - this->y) * (float) f, this->z + (v->z - this->z) * (float) f);
        }
    }
 
    /**
     * Returns a new vector with y value equal to the second parameter, along the line between this vector and the
     * passed in vector, or null if not possible.
     *
     * @param Vector3 $v
     * @param float   $y
     *
     * @return Vector3|null
     */
    public function getIntermediateWithYValue(<Vector3> v, float y) -> <Vector3>|null
    {
        var f;
        var yDiff;
        let yDiff = v->y - this->y;
        if (yDiff * yDiff < 0.0000001) {
            return null;
        }
        let f = (y - this->y) / yDiff;
        if (f < 0 || f > 1) {
            return null;
        } else {
            return new Vector3(this->x + (v->x - this->x) * (float) f, y, this->z + (v->z - this->z) * (float) f);
        }
    }

    /**
     * Returns a new vector with z value equal to the second parameter, along the line between this vector and the
     * passed in vector, or null if not possible.
     *
     * @param Vector3 $v
     * @param float   $z
     *
     * @return Vector3|null
     */
    public function getIntermediateWithZValue(<Vector3> v, float z) -> <Vector3>|null
    {
        var f;
        var zDiff;
        let zDiff = v->z - this->z;
        if (zDiff * zDiff < 0.0000001) {
            return null;
        }
        let f = (z - this->z) / zDiff;
        if (f < 0 || f > 1) {
            return null;
        } else {
            return new Vector3(this->x + (v->x - this->x) * (float) f, this->y + (v->y - this->y) * (float) f, z);
        }
    }

pocketmine\nbt\NbtDataException: "Not enough bytes left in buffer: need 3079, have 82" (EXCEPTION) in "vendor/pocketmine/nbt/src/BaseNbtSerializer" at line 79

[16:59:43.957] [Server thread/CRITICAL]: pocketmine\nbt\NbtDataException: "Not enough bytes left in buffer: need 3079, have 82" (EXCEPTION) in "vendor/pocketmine/nbt/src/BaseNbtSerializer" at line 79
[16:59:43.957] [Server thread/DEBUG]: #0 src/item/Item(698): pocketmine\nbt\BaseNbtSerializer->read(string[138] ......Fireworks...Explosions........FireworkColor........FireworkFade.......Fire)
[16:59:43.957] [Server thread/DEBUG]: #1 src/inventory/CreativeInventory(47): pocketmine\item\Item::jsonDeserialize(array[2])

Problem to execute ./install

when I execute the command ./install in the ext it tells me this

./install: line 34: --silent: command not found
./install: line 36: ./configure: No such file or directory
make: *** No targets specified and no makefile found. Stop.

RuntimeException: "palette cannot have a zero size" (EXCEPTION) in "src/world/format/io/FastChunkSerializer" at line 136

[17:38:03.821] [Server thread/CRITICAL]: RuntimeException: "palette cannot have a zero size" (EXCEPTION) in "src/world/format/io/FastChunkSerializer" at line 136
[17:38:03.821] [Server thread/DEBUG]: #0 src/world/format/io/FastChunkSerializer(136): pocketmine\world\format\PalettedBlockArray::fromData(integer 3, string[1640] H.$.I. .I.$...$.I.$.I.$.I.$.I.$.H.$.I. .I.$...$.I.$.I.$.I.$.I.$.H.$.I. .I.$...$., array[0])
[17:38:03.821] [Server thread/DEBUG]: #1 src/world/generator/PopulationTask(149): pocketmine\world\format\io\FastChunkSerializer::deserialize(string[31332] .............H.$.I. .I.$...$.I.$.I.$.I.$.I.$.H.$.I. .I.$...$.I.$.I.$.I.$.I.$.H.$)

"Expected TAG_Compound at the start of buffer" (EXCEPTION) in "vendor/pocketmine/nbt/src/BaseNbtSerializer" at line 56

[20:21:28.997] [Server thread/CRITICAL]: pocketmine\nbt\NbtDataException: "Expected TAG_Compound at the start of buffer" (EXCEPTION) in "vendor/pocketmine/nbt/src/BaseNbtSerializer" at line 56
[20:21:28.997] [Server thread/DEBUG]: #0 vendor/pocketmine/nbt/src/BaseNbtSerializer(77): pocketmine\nbt\BaseNbtSerializer->readRoot(integer 0)
[20:21:28.997] [Server thread/DEBUG]: #1 src/item/Item(698): pocketmine\nbt\BaseNbtSerializer->read(string[32] ......ench........id.....lvl....)
[20:21:28.997] [Server thread/DEBUG]: #2 src/inventory/CreativeInventory(47): pocketmine\item\Item::jsonDeserialize(array[2])
[20:21:28.998] [Server thread/DEBUG]: #3 src/Server(1166): pocketmine\inventory\CreativeInventory::init()
[20:21:28.998] [Server thread/DEBUG]: #4 src/PocketMine(268): pocketmine\Server->__construct(object BaseClassLoader, object pocketmine\utils\MainLogger, string[10] test_data/, string[18] test_data/plugins/)
[20:21:28.998] [Server thread/DEBUG]: #5 src/PocketMine(290): pocketmine\server()
[20:21:28.998] [Server thread/DEBUG]: #6 (1): require(string[98] phar:///home/travis/build/organization/RapidPM/PocketMine-MP/PocketMine-MP.phar/)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.