GithubHelp home page GithubHelp logo

basinserver / basin Goto Github PK

View Code? Open in Web Editor NEW
108.0 21.0 15.0 1.05 MB

An alternative Minecraft server implementation built from scratch.

License: GNU General Public License v3.0

C 99.83% CMake 0.09% C++ 0.07%

basin's Introduction

Basin

A high performance Minecraft server implementation written in C.

Discord Server

Join the Discord server here.

Goals

  • Pure performance: minimum resource usage for a full Minecraft server implementation
  • Drop-in replacement: compatible with Spigot API plugins via JNI, standard Minecraft world format (Anvil)
  • Extensibility: ease of modification, large plugin API
  • Stability: use good C programming standards to prevent server-breaking bugs

Status

Currently, version Minecraft 1.11.2 and 1.10.2 is supported. As of April 2019, this project is being refactored to meet higher standards of quality and stability. Feature development will resume afterwards, with Minecraft 1.14 support coming concurrently.

Features

  • Low memory footprint (13 MB for a 400-chunk spawn and one player on a 64-bit system)
  • Block placing/breaking
  • Survival mode
  • Creative mode
  • Inventories
  • Players, Chat, and Tab menu
  • Item entities
  • Chests, Furnaces, Crafting
  • PvP
  • Fall damage
  • Block physics & updates
  • C plugin system
  • Block & sky lighting
  • Anvil world loading

Work In Progress

  • Mob AI
  • Spigot-mirrored Java plugin system
  • Command system
  • World generation
  • Anticheat

Planned

  • Protocol generator/export Minecraft protocol as a shared library for various versions
  • Natural mob spawning
  • Lua plugin system
  • Permission system
  • World saving

Maybe One Day

  • Forge mod analog API to allow server-side reimplementation of Java forge mods in C
  • Protocol compatibility layer to allow several versions of the game without a third party tool
  • Reverse proxy dimension/world sourcing

Development

Basin uses cmake to build, install, and package.

Dependencies

  • avuna-util
  • OpenSSL
  • JNI (if Java plugin support is enabled)

Compilation:

mkdir build
cd build
cmake ..
make -j 16

Clean

Within your build directory:

make clean

Install

Within your build directory:

sudo make install

Package

Within your build directory:

cpack --config ./CPackConfig.cmake

Running Basin

To run Basin, simply invoke the binary ./basin. Ensure that the binary is located with the relevant data files (the JSONs).

basin's People

Contributors

ecx86 avatar inklit avatar javaprophet avatar n0toose avatar protryon 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  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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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

basin's Issues

Undeclared variables.

There are apparently some missing variables, and I can't figure out what these variables stand for in order to define them myself.

Here's the relevant CMake output;

/home/panos/projects/Basin/src/login_stage_handler.c:166:20: error: ‘playersToLoad’ undeclared (first use in this function)
     add_collection(playersToLoad, player);
                    ^~~~~~~~~~~~~
/home/panos/projects/Basin/src/login_stage_handler.c:394:54: error: ‘value’ undeclared (first use in this function)
             struct player* player = (struct player*) value;
                                                      ^~~~~
/home/panos/projects/Basin/src/login_stage_handler.c:393:38: error: ‘players’ undeclared (first use in this function); did you mean ‘player’?
             BEGIN_HASHMAP_ITERATION (players);
                                      ^~~~~~~
                                      player
/home/panos/projects/Basin/src/block.c:1800:106: error: ‘struct json_object’ has no member named ‘child_count’; did you mean ‘children’?
         bi->boundingBoxes = colls->child_count == 0 ? NULL : xmalloc(sizeof(struct boundingbox) * colls->child_count);
                                                                                                          ^~~~~~~~~~~
                                                                                                          children
/home/panos/projects/Basin/src/block.c:1761:5: warning: implicit declaration of function ‘freeJSON’; did you mean ‘free’? [-Wimplicit-function-declaration]
     freeJSON(&json);
     ^~~~~~~~

I'm currently working on this one.

/home/panos/projects/Basin/src/login_stage_handler.c:330:13: warning: implicit declaration of function ‘player_kick’; did you mean ‘player_tick’? [-Wimplicit-function-declaration]
             player_kick(player, "You have logged in from another location!");
             ^~~~~~~~~~~

Make data per-server

Presently, data like smelting/tools/crafting recipes are global. They should be loaded for each server.

Compiling problem

Hi, I have problem with compiling. Can you help me? (I'm real newbie)
filip@DESKTOP-95MTGSV MINGW64 /d/Desktop/Basin1 (master) $ cd basin/Debug; make Building file: ../src/accept.c Invoking: GCC C Compiler cc -std=gnu11 -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/accept.d" -MT"src/accept.d" -o "src/accept.o" "../src/accept.c" /bin/sh: cc: command not found make: *** [src/accept.o] Error 127

Core features that need to be implemented

  • World saving
  • More world generation
  • More plugin support
  • Lua plugins
  • Built-in permissions
  • GPU accelerated generation/etc?
  • Built-in anticheat
  • Crash reporting/tracking/recovery
  • Finish Mob AI
  • Bukkit Plugin API via embedded JVM
  • Alternate world format support for further optimization

'rete' label is undefined.

Here's the relevant output from CMake;

/home/panos/projects/Basin/src/login_stage_handler.c:347:5: error: label ‘rete’ used but not defined
     if (conn->aes_ctx_dec == NULL) goto rete;
     ^~
/home/panos/projects/Basin/src/login_stage_handler.c:412:9: error: label ‘rete’ used but not defined
         if (work_joinServer(conn, name_trimmed, NULL)) goto rete;
         ^~
/home/panos/projects/Basin/src/login_stage_handler.c:348:5: error: label ‘rete’ used but not defined
     if (conn->aes_ctx_dec == NULL) goto rete;
     ^~

Block special feature implemenations

BLK_MUSICBLOCK
BLK_BED
BLK_GOLDENRAIL
BLK_DETECTORRAIL
BLK_PISTONSTICKYBASE
BLK_PISTONBASE
(all 2-block flowers)
BLK_MUSHROOM
(all slabs)
BLK_TNT (smoke, damage, knockback, flint&steel/fire charge activation, fire activation, explosion activation)
BLK_FIRE (spreading/dying)
BLK_MOBSPAWNER
(all stairs)
BLK_PRESSUREPLATESTONE
BLK_PRESSUREPLATEWOOD
BLK_OREREDSTONE
BLK_NOTGATE (burnout)
BLK_BUTTON (arrows & wood buttons)
BLK_SNOW
BLK_ICE
BLK_SNOW_1
BLK_CACTUS
BLK_REEDS
BLK_JUKEBOX
BLK_PORTAL
BLK_TRAPDOOR (closing with redstone?)
BLK_MONSTERSTONEEGG_*
BLK_PUMPKINSTEM
BLK_MYCEL
BLK_WATERLILY
BLK_ENCHANTMENTTABLE
BLK_BREWINGSTAND
BLK_CAULDRON
BLK_ENDPORTALFRAME
BLK_COCOA
BLK_ENDERCHEST
BLK_TRIPWIRESOURCE
BLK_TRIPWIRE
BLK_COMMANDBLOCK
BLK_BEACON
BLK_SKULL
BLK_ANVIL_*
BLK_CHESTTRAP
BLK_WEIGHTEDPLATE_LIGHT
BLK_WEIGHTEDPLATE_HEAVY
BLK_COMPARATOR
BLK_DAYLIGHTDETECTOR
BLK_HOPPER
BLK_ACTIVATORRAIL
BLK_DROPPER
BLK_SLIME
BLK_BARRIER
BLK_ICEPACKED
(all doubleplants)
BLK_BANNER
(all fence gates)
(all doors)
BLK_REPEATINGCOMMANDBLOCK
BLK_CHAINCOMMANDBLOCK
BLK_OBSERVER
(all shulker boxes)

Update to 1.12.1

Once we finish core feature integration to prevent backporting.

work_joinServer() function missing mempool parameter

Here's the relevant output from CMake;

/home/panos/projects/Basin/src/login_stage_handler.c:412:13: error: too few arguments to function ‘work_joinServer’
         if (work_joinServer(conn, name_trimmed, NULL)) goto rete;

Farming

  • Tilling
  • Planting
  • Growing
  • Harvesting

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.