WCCC_Earth

LayersBeneathEarth

For this week's Creative Code challenge by @sableRaph: “Earth”, LayersBeneathEarth is coded in PuzzleScript, Hydra & LiveCodeLab.

LayersBeneathEarth Follows a Voyager’s journey through the various layers beneath the Earth. Entering a dungeon that seems to never end and is constantly changing. This is done through the game engine: PuzzleScript , the effects of Hydra and the 3d audiovisual components of LiveCodeLab. While also having earthy colors in the visual concepts.

Poem

Voyaging to the Layers
Senses have to adjust
Below the Depths of the Craters
Nothing to impress
As the goal
Is simple
Clearing the levels
Regardless of the elements
The pivots,
Incurred through the found metals
What these Layers Hold?

Video

Code

LiveCodeLab

ochre = color(204,119,34)
redOchre = color(145,56,49)
brownOchre = color(159,123,62)

ringDetail = 45  - Math.cbrt(sin(time)) * 3

if time % 27 > 10
    ambientLight 224
else
    ambientLight 255,255,255


if time % 10 > 5
    stroke redOchre
    fill ochre
else
    stroke brownOchre
    fill redOchre

if time % 8 > 4
    simpleGradient redOchre, ochre,brownOchre
else
    simpleGradient ochre,brownOchre,redOchre

rotate time / 5, Math.sqrt(time)
scale Math.cbrt(sin(time)) + 0.7

sin(14) times with i
    rotate (time / 5) + i
    ringDetail times
        rotate 0, 0, (2 * pi) / ringDetail
    if time % 20 > 12
        move 2, 0, 2
    else
        move 2,0,0
            rect 1, 0.3 + (1 / ringDetail)

5 times with i
    scale 0.5
    rotate (time / 5) + i
    ringDetail times
        rotate 0, 0, (2 * pi) / ringDetail
        move 2, 0, 0
        if time % 20 > 12
            rect (time % 4 + 1), 0.3 + (1 / ringDetail)
        else
            rect 1, 0.3, 3

cos(time % 14) times with i
    rotate (time / 5) + i
    ringDetail times
        rotate sin(time), 1, (2 * pi) / ringDetail
        move 2, sin(wave) / 3, 0
            rect 1, 0.3 + (5 / ringDetail),Math.sqrt(sin(time))

//Audio

bpm 125 - (time % 20) * 3
play 'penta',  '--x- -xx- x  x --x- --x-'
play 'beepC',      '-x-- ---- x--x xxx-'
play 'beepA',      '--x- --xx-- --x- --xx--'
play 'snap',   '--x- -x--x-- -xx- --x--'
play "tweet" + int(random 14) ,'x'
play 'tense',      'x--x  x --x– x -x-- -x--'
play 'voltage',    'x-x- -x-- x-xx x-xx'
play 'cosmos', '-x-x ---x x-x  x- --xx'

Hydra

//Brown Tint

noise(1.66,1.33,1).pixelate(9).
modulateRotate(noise(2,1,2)).
modulateKaleid(noise(2,1)).
pixelate(100,100).
blend(noise(1,[1,4],5)).
scrollX([1,2].smooth()).
color(0.66,0.33,0).
repeat(2).
luma(0.11).
out()

speed = 0.5

PuzzleScript

title LayersBeneathEarth
author illestpreacha
homepage www.puzzlescript.net

========
OBJECTS
========




Background
black brown white orange
20110
02301
21103
01211
10302

Background2
black brown white orange
00000
02220
00000
02220
00000

Background3
black brown white orange
00000
11111
22222
33333
11111

MineSpawner
white black
..11.
.000.
..1..
11000
.....

Target
darkblue white blue
12021
00100
02020
00200
12021


Wall
brown black
00000
11111
00000
11111
00000

Wall2
grey black white
02120
11111
22222
11111
01210

Player
blue white grey red
00000
11311
23232
11311
00000

Crate
orange brown
00000
01110
01110
01110
00000

RedMiners
red black
00000
10010
00100
11111
10001



GeenMiners
green black
00000
10010
00100
11111
10001


BlueMiners
blue black
00000
10010
00100
11111
10001





=======
LEGEND
=======

. = Background
+ = Background2
! = Background3
# = Wall
$ = Wall2
Miners = RedMiners or GeenMiners or BlueMiners
M = Miners
P = Player
* = Crate
@ = Crate and Target
O = Target 

S = MineSpawner

=======
SOUNDS
=======

================
COLLISIONLAYERS
================

Background
Background2
Background3
Target
MineSpawner
Player,Miners, Wall,Wall2, Crate

======
RULES
======

[ > Player | Crate ] -> [ > Player | > Crate ]
[ MineSpawner no Miners ] -> [ MineSpawner random Miners ] (Spawn Random Miners)
[ stationary Miners ] -> [ randomDir Miners ]  (Move the miners)

==============
WINCONDITIONS
==============

all Target on Crate

=======
LEVELS
=======

###########
#.........#
#..**.....#
#.....@...#
#.P.*.O...#
#.........#
#.........#
#...S.....#
########$$#


########################
#+++++++............O..#
#++..+@+......**.......#
#.P+++O+...............#
#...*.*.........#......#
#+++++++..........#....#
#####################S##




###$$$##$$$$#$
$............$
$.....@....*#$
$.P.*.O......$
$......P.....$
$...S........$
$############$


$$$$$$$$$$
#+++++++.#
#++..+@+.#
#.P+++O+.#
#...*.*..#
#+++++++.#
$$$$$$$$$$


$$$$$$$$$$$$
#.......*!!#
#.....@.!!!#
#.P.*.O.!!!#
#!!!!!!!*!!#
########!!!#

####$##$$$$##$$$$#
#..........#.....#
#.....@..........#
#.P.*.O..........$
#................$
#.........S......#
$$$$$$$$$####$$$$$


$$$$$$$$$$$$$$$$$$
#+++++++.........#
#++..+@+.........#
#.P+++O+...#######
#...*.*....#.....#
#+++++.....#..S..#
$$$$$$$$$$$$$$$$$$
0
Subscribe to my newsletter

Read articles from Kofi / Illestpreacha directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Kofi / Illestpreacha
Kofi / Illestpreacha