Archivo etiqueta Minecraft

Programmable Minecraft: dynamic code execution using Groovy

If we think about the road to transit to achieve our goal, we would notice that, eventually, we’d have to face the problem of Java not being an interpreted language, which makes the task of modifying code dynamically a bit more difficult. There are many workarounds to this issue and today I’d like to talk you about one of them: integrating Groovy and Java.

Groovy is a dynamic programming language for the Java platform: it is dynamically compiled to Java Virtual Machine bytecodes which allows us to alter the functioning of our code on the fly and to integrate it into Java application with ease.

The Groovy documentation clearly explains the integration mechanism and even provides example code: integrating scripts into the Minecraft source code makes changing the game’s behaviour during its execution easy 馃檪 (click on the image to enlarge it)

Si pensamos respecto al camino a transitar para llevar a cabo el proyecto de Minecraft Programable, notar铆amos que, en alguna parte del mismo nos encontrar铆amos con el problema de que Java no es un lenguaje interpretado, lo que dificulta la tarea de cambiar el c贸digo de nuestra aplicaci贸n y ver los resultados de nuestros cambios instant谩neamente. Existen diferentes 芦soluciones禄 a esto y hoy quiero hablarles respecto a una de ellas: integrar Java y Groovy.

Groovy es un lenguaje de programaci贸n din谩mico para la plataforma Java: es compilado din谩micamente a bytecodes de la m谩quina virtual de Java lo que nos permite alterar el funcionamiento de nuestro c贸digo on the fly e integrarlo en aplicaciones Java con facilidad.

La documentaci贸n de Groovy explica con bastante claridad el mecanismo para hacer esto e incluso nos provee de c贸digo ejemplo: integrar scripts en el c贸digo de Minecraft nos permite modificar el c贸digo que queramos durante la ejecuci贸n del juego 馃檪 (click en la imagen para verla en mayor tama帽o)

Groovy and Java

, , , ,

No hay Comentarios

Conway’s Game of Life

Hi everybody,

Playing with Laura’s 芦Programming Minecraft禄 project I made a very simple implementation of Conway’s Game of Life. Just for fun 馃檪
Here you have a video:

Hola a todos, estaba jugando con el proyecto de Laura 芦Programando Minecraft禄 y arm茅 una muy simple implementaci贸n del Juego de la Vida de Conway. S贸lo para divertirme un rato 馃檪
Ac谩 les dejo un videito:

, , , ,

2 Comentarios

Programmable Minecraft: progress in interaction

隆Hola a todos! Nuevamente les traigo noticias respecto a Minecraft programable.

Habiendo conseguido anteriormente ver informaci贸n respecto a los objetos del mundo, el siguiente paso era lograr que Minecraft recibiera informaci贸n modificada por el usuario desde Squeak, que es en lo que estamos trabajando ahora. Les dejo una peque帽a muestra de c贸mo funciona el proyecto por el momento.

Los siguientes pasos involucran convertir la interfaz gr谩fica de prueba en algo que le permita al usuario escribir c贸digo aparte de sencillamente modificar atributos.

Hello everyone! Here are more news regarding the Programmable Minecraft project.

Having implemented a way to obtain information regarding different objects within the world earlier, the next step was to incorporate a way of modifying their attributes from Squeak, which is what we are currently working on. Here is a little demonstration of the project’s functioning.

What follows is transforming our current test interface into something that enables the user to write code to interact with the objects.

, ,

No hay Comentarios