BallisticScript

From Esolang
Jump to navigation Jump to search

BallisticScript is a language created by MelonMars that is based on using a cannon to fire at the memory field to influence it.

Features

You use a cannon to fire at a field of memory, and the impact angle acts as the command. There is one "register" that contains one character of information.

Syntax

You start off by creating a memory field similiar with the syntax: +++

+-+

+++ , where "-" means nothing/empty, and a "+" denotes the border of the table. Then you control the cannon via the the

fire(velocity,cannonRotation,cannonAngle)

and move the cannon via

move(x,y).

Where the projectile lands impacts what happens. If it lands at a valid tile, then an angle>10 then the place where the projectile landed is set to the register, if 20>angle>10 then the character stored where the projectile landed is printed, if 30>angle>20 then the value of the character that the projectile landed on in ascii is added to the register, if 40>angle>30 then the value of the register in ascii is added to the tile where the projectile landed on, if 50>angle>40 then the register is set tot he value of the tile it landed on.

Example

.memField

++++++++++

+-------6+

+--------+

+---3----+

+------2-+

++++++++++

6: "hello"

3: "world"

2: " "

.cannonCommands

fire(20, 10, 10)

move(10, 10)

.end

I have no clue what this code does, but I believe it may do something. I have not ran it, as I don't feel like it.

Implementation

There is an implementation of it at: GitHub