from random import randrange
from os import listdir
from os.path import join

from pygame import image

from xenographic_wall.pgfw.GameChild import GameChild
from xenographic_wall.world.mushrooms.Mushroom import Mushroom

class Mushrooms(GameChild, list):

    def __init__(self, parent):
        GameChild.__init__(self, parent)
        self.subscribe_to(self.get_custom_event_id(), self.respond_to_event)
        self.load_images()
        self.reset()

    def respond_to_event(self, evt):
        if self.is_command(evt, "reset-game"):
            self.reset()

    def load_images(self):
        images = []
        root = self.get_resource("mushrooms", "path")
        files = self.get_configuration("mushrooms", "images")
        for path in listdir(root):
            parent = join(root, path)
            images.append(
                (image.load(join(parent, files[0])).convert_alpha(),
                 image.load(join(parent, files[1])).convert_alpha()))
        self.images = images

    def reset(self):
        self.populate()

    def populate(self):
        images = self.images
        count = self.get_configuration().get("mushrooms", "count")
        group_count = len(images)
        list.__init__(self, [[] for _ in range(group_count)])
        for ii in range(count):
            self.add_mushroom(ii % group_count)

    def add_mushroom(self, group):
        mushroom = Mushroom(self, group, self.images[group])
        self[group].append(mushroom)
        return mushroom

    def replace_mushroom(self, mushroom):
        group = mushroom.group
        self[group].remove(mushroom)
        self.add_mushroom(group)

    def update(self):
        for group in self:
            for mushroom in group:
                mushroom.update()
from time import time
from collections import deque

from pygame import Surface, Color, mouse, draw

from xenographic_wall.pgfw.GameChild import *
from xenographic_wall.world.scope.chain.Chain import Chain

class Scope(GameChild):

    transparent_color = Color("magenta")

    def __init__(self, parent):
        GameChild.__init__(self, parent)
        self.subscribe_to(self.get_custom_event_id(), self.respond_to_event)
        self.chain = Chain(self)
        self.deactivate()
        self.reset()

    def activate(self):
        self.active = True

    def deactivate(self):
        self.active = False

    def respond_to_event(self, evt):
        if self.active:
            is_command = self.is_command
            if is_command(evt, "mouse-down-left"):
                self.respond_to_set()
            if is_command(evt, "mouse-down-right"):
                self.respond_to_set_and_reel()
            if is_command(evt, "reel"):
                self.respond_to_reel()

    def respond_to_set(self):
        if not self.flash_start:
            self.place()

    def hide(self):
        self.chain.hide()

    def collide_click(self):
        return self.chain.collidepoint(self.parent.get_mouse_pos())

    def respond_to_set_and_reel(self):
        if not self.flash_start:
            if self.chain.is_hidden() or not self.collide_click():
                self.place()
            self.activate_flash()

    def place(self):
        self.chain.place(self.parent.get_mouse_pos())

    def activate_flash(self):
        self.flash_start = time()
        self.chain.set_color_to_flash()
#         self.show()

    def show(self):
        self.chain.show()

    def respond_to_reel(self):
        self.activate_flash()

    def reset(self):
        chain = self.chain
        chain.reset()
        self.deactivate_flash()
        chain.hide()

    def deactivate_flash(self):
        self.flash_start = None
        self.chain.set_color_to_default()

    def update(self):
        if self.active:
            self.update_flash()
            self.chain.update()

    def update_flash(self):
        start = self.flash_start
        config = self.get_configuration().get_section("scope")
        chain = self.chain
        if start:
            if time() - start > config["flash-length"]:
                self.deactivate_flash()
                chain.set_color_to_default()
            else:
                chain.rotate_colors()
from collections import deque

from pygame import Rect, Color, mouse

from xenographic_wall.pgfw.GameChild import GameChild
from xenographic_wall.world.scope.chain.Ring import Ring

class Chain(GameChild, Rect):

    transparent_color = Color("green")
    
    def __init__(self, parent):
        GameChild.__init__(self, parent)
        self.init_rect()
        self.set_rings()
        self.subscribe_to(self.get_custom_event_id(), self.respond_to_event)
        self.reset()

    def init_rect(self):
        width = self.get_configuration("scope", "diameter")
        Rect.__init__(self, 0, 0, width, width)

    def set_rings(self):
        rings = []
        for ii in range(self.get_configuration("scope", "ring-count")):
            rings.append(Ring(self, ii))
        self.rings = rings

    def respond_to_event(self, evt):
        if self.parent.active:
            if self.is_command(evt,"mouse-scroll-up"):
                self.glow()
            if self.is_command(evt, "mouse-scroll-down"):
                self.darken()

    def glow(self):
        max_alpha = 255
        rings = list(reversed(self.rings))
        threshold = max_alpha / len(rings)
        for ii, ring in enumerate(rings):
            if ii == 0 or rings[ii - 1].get_alpha() >= threshold:
                alpha = ring.get_alpha() + self.get_glow_step()
                if alpha > max_alpha:
                    alpha = max_alpha
                ring.set_alpha(alpha)

    def get_glow_step(self):
        return self.get_configuration("scope", "glow-step")

    def darken(self):
        for ring in self.rings:
            alpha = ring.get_alpha() - self.get_glow_step()
            if alpha < 0:
                alpha = 0
            ring.set_alpha(alpha)

    def reset(self):
        self.hide()
        self.set_color_to_default()

    def hide(self):
        for ring in self.rings:
            ring.set_alpha(0)

    def show(self):
        for ring in self.rings:
            ring.set_alpha(255)

    def place(self, pos):
        self.center = pos
        for ring in self.rings:
            ring.rect.center = pos

    def set_color_to_default(self):
        self.colors = deque(map(Color,
                                self.get_configuration("scope", "colors")))
        self.update_colors()

    def update_colors(self):
        for ii, ring in enumerate(self.rings):
            ring.set_color(self.colors[ii])

    def set_color_to_flash(self):
        self.colors = deque(map(Color,
                                self.get_configuration("scope", "flash-colors")))
        self.update_colors()

    def rotate_colors(self):
        self.colors.rotate(1)
        self.update_colors()

    def is_hidden(self):
        for ring in self.rings:
            if ring.get_alpha() > 0:
                return False
        return True

    def update(self):
        for ring in self.rings:
            ring.update()
3.145.155.149
3.145.155.149
3.145.155.149
 
March 3, 2021

Video 📺

Computers are a gun. They can see the target; they can pull the trigger. Computers were made by the military to blow people's brains out if they stepped out of line. Google Coral is the same technology that pollutes the oceans, and so is the computer I'm using, and so are the platforms I'm using to post this.

Game 🎲

Games are a context in which all play is purposeful. Games expose the fundamentally nihilistic nature of the universe and futility of pursuing any path other than the inevitability of death and the torture of an evil that knows and exploits absolute freedom. Games are not educational; they are education.

Propaganda 🆒

Education is propaganda — ego driven by-product conveying nothing that would enable us to expose that vanities made for gain subject us further to an illusion created by those in control: the illusion that quantity can represent substance and that data or observation can replace meaning. And why say it, or how, without contradicting yourself, that everything, once registered, no longer exists, and in fact never did, exists only in relation to other non-existent things, and when you look, it's not there, not only because it's long vanished, but because where would it be?


fig. 2: Gamer goo is a lubricant — not for your skin, but for facilitating your ability to own the competition (image from Gamer goo review)

As a result of video games, the great Trojan horse 🎠 of imperialist consumerist representationalism, people are divided in halves to encourage them to act according to market ordained impulses, to feign assurance, penetrating themselves deeper into a tyranny from which every action signals allegiance, confusing the world with definitions and borders, constantly struggling to balance or brace themselves against forces that threaten the crumbling stability of their ego.

F

or example, a cup 🥃 is designed and built to hold something, maintain order and prevent chaos. It keeps water from spilling back to where it belongs, back where it wants to go and gravity wants it to go. The cup is a trap, and it is used to assert dominance over nature, to fill with thoughts about existence, time and self, thoughts regarding dissimilarity between equal parts and patterns that manifest in variation. These ruminations disguised as revelations boil away to reveal isolated and self-aggrandizing thoughts about an analogy fabricated to herald the profundity of one's campaign's propaganda. You have no authentic impulse except to feed a delusion of ultimate and final supremacy. That is why you play games. That is your nature. That is why you eventually smash the cup to bits 💥 or otherwise watch it disintegrate forever because it, by being useful, threatens your facade of ownership and control.


fig. 3: worth1000

The cup is you; it reflects you; it is a lens through which you see yourself; it reassures you, confirming your presence; it says something, being something you can observe. When you move, it moves, and it opens after being closed. You can use it as a vessel for penetration fantasies, keeping you warm and fertile, a fine host for the plague of consciousness, you reptile, you sun scorched transgressor that not only bites the hand that feeds, but buries it deep within a sterile chamber where nothing remains for it as a means of escape except the corpses of others that infringed upon your feeding frenzy.