Get the latest tech news

Game Programming in Prolog


This article explains how a game can be made in Prolog by leveraging the hidden power of logic programming. Inspired by the elegance of data-driven design and declarative programming paradigms, I will be explaining a new way of designing game rules which can at the same time be used as the source code of the gameplay system itself.

A major intellectual challenge, however, struck me when I began to study Prolog - the famous logic programming language which is notorious for its esoteric syntax. The way it approached data structures (such as lists) and algorithms based upon mathematical relations was something so revolutionarily novel to me, that it seriously opened up a new horizon in my faculty of computational reasoning. These realizations soon led me to contemplate upon the notion that, maybe, logic programming has a great deal of potential in the design and implementation of highly complex systems, such as a video game's core gameplay mechanics.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of Prolog

Prolog

Photo of Game Programming

Game Programming

Related news:

News photo

Developing a Go bot embedding Ichiban Prolog

News photo

(Logic) Prolog, Erlang, Elixir a side-by-side reference sheet

News photo

Prolog and Natural-Language Analysis (1987) [pdf]