Category Archives: Program

Minecraft Run – Inspired by Temple Run!

https://mcpionline.files.wordpress.com/2013/02/python_banner1.jpg?w=954&h=151

Temple Run is a popular mobile game that has had people addicted for months on end. With the sequel to the game released just last month, it seems right that somebody would make a great python program inspired by it for MCPI. The game consists of:

  • Randomly generated track
  • Gravel ‘kills‘ you and takes you back to the start
  • Everytime you ‘die‘ new track is generated
  • Score System
  • A temple at the start of the track

Excellent96, the maker of the program, has many ideas on how to improve the game, including:

  • Advanced score system
  • Chasing enemy (Possibly Lava)
  • Coins and Powerups
  • More Fun!

A video of the program in action can be found at it’s Official Topic on the Minecraft Forums!

The only downside to this is that the program is not yet available for download, but head over to it’s Official Topic and tell him that you really want to play it!

The download link will be posted here as soon as it is released!

MCPI Game Of Life

https://mcpionline.files.wordpress.com/2013/02/python_banner1.jpg?w=300

Jason Milldrum of NT7S.com has come up with a brilliant version of the popular game, ‘The Game Of Life‘. It uses Obsidian blocks to show dead cells and Diamond blocks to show alive cells on a 64×64 block board.

The code is pretty big, so to save the homepage of the site being filled by a single program, you can view the code here!

Credit goes to Jason Milldrum NT7S.com

Python: Auto Rainbow

This cool little program designed by ‘500 Internal Server Error‘, automatically builds a rainbow in your MCPI world, upon loading the python file.

—————————————————————————————————-

The code is as follows:

import mcpi.minecraft as minecraft
import mcpi.block as block
from math import *
colors = [14, 1, 4, 5, 3, 11, 10]
mc = minecraft.Minecraft.create()
  height = 60
mc.setBlocks(-64,0,0,64,height + len(colors),0,0)
  for x in range(0, 128):
  for colourindex in range(0, len(colors)):
  y = sin((x / 128.0) * pi) * height + colourindex
  mc.setBlock(x - 64, int(y), 0, block.WOOL.id, colors[len(colors) - 1 - colourindex])

—————————————————————————————————-

The original thread where the program was shared can be found here.

To run the program, open up ‘LeafPad‘, copy this code into it and save it in /mcpi/api/python as a .py file. Save it as rainbow.py. Then, once you have a MCPI world loaded up, open up ‘Terminal‘ and navigate to where you saved the file using cd and type python rainbow.py.