Tuesday 3 April 2018

BitIO blog 14: Scalable housing

Scalable Housing


This blog is based on the original house an article from issue 68 of the Magpi Magazine which you can buy here , or download for free from here.

The article is on page 54.  It was written by a chap called Steve Martin who you can access on Twitter here . Without digging too deep it seems as though he helps run/ attends the Cotswold Jam. This is an excellent tutorial in how to get started with Python and Minecraft. I have slightly modified and extended the code to work with the Micro:bit. This version creates a 3-4 storey version which creates 2 sides of a "road". It is buggy as the right handside faces the wrong way. You click on 'b' button to set how many houses are in the road and then 'a' button to execute the printing of the rows of houses.

As usual this Micro:bit code uses the excellent bitIO library created by David Whale see more here.  Here is an example of what my extended version does:


5 houses...
Each printing session creates two rows, notice the glitch with the doors being on opposite sides.

You can download the extended version of the code here.

Enjoy,

Chris Penn
  

No comments:

Post a Comment