301 Days (redux)

Another metric leap year of gamedev experiments and such

Mar 5, 2016 - OldDays

Day 46 - Blame it on the Terrain

Prelude to an interruption. Ignore.

PMGAI

Messing about. Messing about.
  • Worked more on Lab #2 - Procedural MINECRAFT, which has us modifying the Python code for a Minecraft terrain generator, and leveraging Mapcrafter to render the maps.

Drifting a little further away from strictly AI stuff, but that’s fine ‘cause it’s fun. What hasn’t been fun is getting this particular toolset to work well on my various machines. On the laptop, I’ve finally decided to just spin up a separate VM for it.

  1. I started a Vagrant box of ubuntu/trusty64
  2. Followed the instructions on the Mapcrafter site to get the Mapcrafter package installed.
  3. Followed the instructions on PMGAI Lab #0 for setting up the Python environment the way they want (minus GLFW, since I’ll be running w/o a GUI).
  4. Followed the instructions for Lab #2, and modified mapcrafter.sh to use the mapcrafter in the path, and output to the shared Vagrant folder.

  • Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure(2) do |config|
  config.vm.box = "ubuntu/trusty64"

  config.vm.provision "shell", privileged: true, inline: <<-SHELL
    apt-get -y update
    echo "deb http://packages.mapcrafter.org/ubuntu $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/mapcrafter.list
    wget -O /etc/apt/trusted.gpg.d/mapcrafter.gpg http://packages.mapcrafter.org/ubuntu/keyring.gpg
    apt-get -y update
    apt-get -y install mapcrafter
    apt-get -y install python3.4 python3.4-venv
    apt-get -y install python3-numpy python3-scipy python3-pil
    apt-get -y install git
  SHELL

  config.vm.provision "shell", privileged: false, inline: <<-SHELL
    mkdir pmgai
    cd pmgai/
    python3 -m venv --system-site-packages pyvenv
    source ~/pmgai/pyvenv/bin/activate
    echo "source ~/pmgai/pyvenv/bin/activate" >> ~/.bash_profile
    python -m pip install pip --ignore-installed
    pip install nuclai
    python -m pip install --upgrade nuclai
    nuclai install minecraft
  SHELL
end

—discontinuity—


More to come