Coder Social home page Coder Social logo

voxelers / mcthings Goto Github PK

View Code? Open in Web Editor NEW
55.0 6.0 10.0 6.71 MB

A Python framework for creating 3D scenes in Minecraft and Minetest

License: Apache License 2.0

Python 99.64% Shell 0.36%
minecraft python library buildings minetest blocks easy kids-learn kids-programming kids-coding

mcthings's People

Contributors

acs 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

mcthings's Issues

Explore rotate operation

If it is not too expensive to implement in Things (or Scenes), it can be interesting. Let's explore it!

Design how to continue editing a creation loaded from a file

Probably this work in a natural way. If you continue adding things to the Creation, you are evolving it. And also, you can remove builds. Probably, when a thing is unbuild, it must be removed from the creation also. So closing this issue because it works out of the box!

Add end_position data to all the things

After builiding the thing the end_position must be defined to other things could be positioned relative to the last thing built. It is essential for doing compositions.

It is already done for town.

Add support for building Scenes with blocks programming

Not sure yet what is the best platform, but the Things based platform of McThings is ideal for creating the scenes using blocks.

Blockly

https://github.com/google/blockly
http://robotblocks.appspot.com/static/minecraft/index.html
https://forum.minetest.net/viewtopic.php?f=11&t=13316

https://en.wikipedia.org/wiki/Blockly
«Blockly uses visual blocks that link together to make writing code easier, and can generate code in JavaScript, Lua, Dart, Python, or PHP. It can also be customised to generate code in any textual programming language.[2]»

Others

juntosdesdecasa/minecraft#9

Fix unbuild of lines

Lines are not in the air, so unbuild them is not to fill the with air but with a dirt block.

Create the Maze Thing

It could be a labyrinth of tunnels ...probably easier to build and very attractive. To exist from a cave is exciting.

Add support for loading AbadIA CSV heights files and build it

STL is a format used for 3D printing. In the project In the project AbadIA they are reproducing the Abadia large building using STL generated from a CSV file with the heights data..

The idea is to read this STL files and reproduce them inside Minecraft. In this case they are using as unit building block a 1x1x1 block, just the same than in Minecraft. So It should be easy to recreate in Minecraft the building.

The steps are:

  • Load the cube STL inside MC to understand the format
  • Load the composition of two cubes inside MC
  • Load the level0 floor
  • Load all the floors

Analyze howto document

Our users are also developers, so thing about the above distinction. The real doc is the first one. The second one (notebooks) is more a kind of guide.

Analyze howto share the scenes

Right now scenes can be stored in files using pickle. So this is the way to go. In the future, other formats as JSON or RAML could be considered for scenes, so you can edit this files directly to modify the scenes.

But, how to share scenes? In the Minecraft community there are two ways to share creations right now:

  • Schematics (created with WorldEdit or MCEdit)
  • Worlds

It seems there are two file formats: "Schematics" file and "World Save" file. But probably both of them describe the creation at block level.

Create the v0.20.0 release

Once the development has finished it is time to create the v0.20.0 release:

  • Create the release and upload it
  • Release notes
    • Include version in Things
    • Support for schematics
    • Complete unit testing support
    • License headers added
    • Scenes: AbadIA, Schematics
    • Check all with Minetest
  • Create a video with the new features (mainly schematics)
  • Announce it
    • Minetest forums
    • Twitter/Linkedin

Explore Interactive Scenes

Events in Minecrafts, like hitting a block, can be collected from the Python API. So when the player hits a block (for example a button), the scene could change and show/hide Things, for example.

Summary of the Python support in Minecraft/Minetest

Once we have tested that Python can be used in:

  • Spigot 1.15.2 (with 1.11 and 1.12 plugin versions)
  • Minecraft Forge: for using it in the client with 1.12.2 version. The mod does not work in newer versions of the Forge.
  • Minetest: 1.12 working with Minetest 5.1 (not tested yet with 5.2 but it probably will work)

It seems that all the mod/plugin version for the Rasperry PI API share the same code, because all stopped in 1.12 version. But I need to review it. For example, for minetest, it has not been changed since 4 years ago.

Analyze commands not supported by mcpi

The complete API supported at the server is:

https://github.com/zhuowei/RaspberryJuice

There is a mcpi modded to include the full API: https://github.com/zhuowei/RaspberryJuice/tree/master/src/main/resources/mcpi/api/python/modded/mcpi

With it, for example, entities can be created. And there are a lot of them:

https://github.com/zhuowei/RaspberryJuice/blob/master/src/main/resources/mcpi/api/python/modded/mcpi/entity.py

We are using right now the 1.11 version which includes:

1.11 - spawnEntity, setDirection, setRotation, setPitch

In 1.12 we have also:

1.12 - getEntities, removeEntities, pollProjectileHits, events calls by player and entity

so we need to move to it. In javierete.com we have:

root@javierete:~# ls -1 /home/minecraft/spigot/plugins/
PluginMetrics
RaspberryJuice
bStats
raspberryjuice-1.11.jar

We need to migrate to the last one.

https://www.spigotmc.org/resources/raspberryjuice.22724/

Capture Things inside the world

A really cool feature is that you can build your house inside Minecraft and the capture it in McThings in order to use it (copy, scale ...).

I think that schematic feature in Minecraft goes in that direction: reusing designs created inside Minecraft.

https://minecraft.gamepedia.com/Schematic_file_format
https://www.minecraft-schematics.com/
https://www.curseforge.com/minecraft/mc-mods/schematica
https://minecraftstuff.net/schematics
https://www.planetminecraft.com/resources/projects/?share=schematic

Study the Minetest plugin for Raspberry PI Minecraft API

After the research at #50 the decision is to invest in the support of the Python API in Minetest.

https://github.com/arpruss/raspberryjammod-minetest

After our research at #45 the plugin is usable as it is right now. The next steps:

  • Describe the API covered
  • Learn howto create plugins for minetest using Lua
  • Test the full API and find the gaps not covered from the origin Raspberry PI API
  • Test it with Minetest 5.2
  • Meet the community

I have already fork the repository at: https://github.com/acs/raspberryjammod-minetest/blob/master/README.md

The original developer seems to have lost motivation about the plugin, but he is answering issues: arpruss/raspberryjammod#49

Improve the bridge

Our basic bridge could be vastly improved. Compare this two bridges:

Screenshot from 2020-04-22 03-41-26

Cool Things will create cool Scenes. So improving the Things will be a basic task in this project.

Analyze howto implement basic operations in Things

  • move: can be implemented at things level. Just unbuild, change the position and build
  • mirror
  • rotate
  • scale: in several cases it can be implement easily, but it depends in each thing
  • invert (for inverse pyramids)

For example, to create a town with a line of houses in one side of a street and another at the other side, we can just build the second one as a mirror of the first one.

Design the scenes repository

The goal is to share creations in the easiest way.

The size of the creations is minimal (560 bytes in the current creation sample).

Define how mcthings position things in the world

In which direction of the x,y,z build things?

x: width
y: height
z: large

We build in both cases from the lower value to the higher value. So if initial x is -10 and the width is 30, the end x is 20. The same for y and z.

By default we use the player position as the initial pos for x, y, z. Following this approach, the initial thing is built nex to the player, without covering it (at least with the first thing).

Improve doc in readthedocs

  • Select a more attractive theme
  • Include info the the landing page (converting markdown to rst)
  • Review all the code doc

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.