from time import time
from random import randint

from pygame import Surface, Color

from antidefense.pgfw.GameChild import GameChild
from antidefense.map.scale.Scale import Scale
from antidefense.map.Layer import Layer
from antidefense.map.Stamps import Stamps

class Map(GameChild, Surface):

    def __init__(self, parent):
        GameChild.__init__(self, parent)
        self.deactivate()
        self.set_surface()
        self.set_dimensions()
        self.subscribe_to(self.get_custom_event_id(), self.respond_to_event)
        self.scale = Scale(self)
        self.stamps = Stamps(self)
        self.reset()

    def deactivate(self):
        self.active = False

    def set_surface(self):
        Surface.__init__(self, self.get_screen().get_size())

    def set_dimensions(self):
        magnitude = self.get_configuration("map", "magnitude")
        self.dimensions = tuple(map(lambda x: x ** magnitude, self.get_size()))

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

    def reset(self):
        self.visible_dimensions = self.dimensions
        self.scale.update()
        self.set_target()
        self.set_target_pixel()
        self.stamps.reset()
        self.current_layer = Layer(self)

    def set_target(self):
        w, h = self.dimensions
        self.target = randint(0, w - 1), randint(0, h - 1)

    def set_target_pixel(self):
        vx, vy = self.visible_dimensions
        x, y = self.target
        w, h = self.get_screen().get_size()
        self.target_pixel = int(float(x) / vx * w), int(float(y) / vy * h)

    def activate(self):
        self.active = True

    def get_zoom_level(self):
        return 1 - float(self.visible_dimensions[0]) / self.dimensions[0]
        
    def update(self):
        if self.active:
            self.clear()
            self.draw()

    def clear(self):
        self.blit(self.current_layer, (0, 0))

    def draw(self):
        self.scale.draw()
        self.get_screen().blit(self, (0, 0))
from pygame import Surface, Color

from antidefense.pgfw.GameChild import GameChild

class Bar(GameChild, Surface):

    def __init__(self, parent):
        GameChild.__init__(self, parent)
        self.config = self.get_configuration("scale")
        self.init_surface()
        self.set_rect()
        self.paint()

    def init_surface(self):
        config = self.config
        Surface.__init__(self, config["bar-dimensions"])
        self.set_alpha(config["bar-alpha"])

    def set_rect(self):
        rect = self.get_rect()
        rect.bottom = self.parent.get_height()
        self.rect = rect

    def paint(self):
        config = self.config
        colors = map(Color, config["colors"])
        w = self.get_width()
        segment_w = w / config["segments"]
        for ii, x in enumerate(range(0, w, segment_w)):
            color = colors[ii % len(colors)]
            self.fill(color, (x, 0, segment_w, self.get_height()))

    def draw(self):
        self.parent.blit(self, self.rect)
from pygame import Surface, Color
from pygame.locals import *

from antidefense.pgfw.GameChild import GameChild
from antidefense.map.scale.Bar import Bar
from antidefense.map.scale.Text import Text

class Scale(GameChild, Surface):

    def __init__(self, parent):
        GameChild.__init__(self, parent)
        self.config = self.get_configuration("scale")
        self.init_surface()
        self.set_rect()
        self.bar = Bar(self)
        self.text = Text(self)

    def init_surface(self):
        config = self.config
        bar_w, bar_h = config["bar-dimensions"]
        h = bar_h + config["font-size"] + config["font-padding"] * 2
        Surface.__init__(self, (bar_w, h), SRCALPHA)
        self.clear()

    def set_rect(self):
        rect = self.get_rect()
        x, y = self.config["offset"]
        rect.left = x
        rect.bottom = self.parent.get_height() - y
        self.rect = rect

    def update(self):
        self.clear()
        self.text.update()
        self.bar.draw()

    def clear(self):
        self.fill((0, 0, 0, 0))

    def draw(self):
        self.parent.blit(self, self.rect)
from math import log

from pygame import Surface, Color
from pygame.font import Font
from pygame.locals import *

from antidefense.pgfw.GameChild import GameChild

class Text(GameChild, Surface):

    def __init__(self, parent):
        GameChild.__init__(self, parent)
        self.config = self.get_configuration("scale")
        self.init_surface()
        self.set_rect()
        self.set_fonts()
        self.text = ""

    def init_surface(self):
        parent = self.parent
        h = parent.get_height() - self.config["bar-dimensions"][1]
        Surface.__init__(self, (self.parent.get_width(), h), SRCALPHA)

    def set_rect(self):
        self.rect = self.get_rect()

    def set_fonts(self):
        config = self.config
        path = self.get_resource("scale", "font-path")
        font = Font(path, config["font-size"])
        font.set_bold(True)
        self.font = font

    def update(self):
        self.set_text()
        self.clear()
        self.write_text()
        self.draw()

    def set_text(self):
        config = self.config
        grandparent = self.parent.parent
        ratio = float(self.get_width()) / grandparent.get_width()
        distance = ratio * grandparent.visible_dimensions[0]
        magnitude = int(log(distance, 10))
        resolution = config["resolution"]
        interval = magnitude / resolution
        prefix = config["prefixes"][interval]
        converted = int(distance / 10 ** (interval * resolution))
        self.text = ("%i %s%s" % (converted, prefix, config["unit"])).decode("utf-8")

    def clear(self):
        self.fill((0, 0, 0))
        self.fill((0, 0, 0, 0))

    def write_text(self):
        self.write_stroke()
        block = self.font.render(self.text, True,
                                 Color(self.config["font-color"]))
        rect = block.get_rect()
        rect.center = self.rect.center
        self.blit(block, rect)

    def write_stroke(self):
        config = self.config
        font = self.font
        text = self.text
        color = Color(config["stroke-color"])
        offset = config["stroke-offset"]
        left, right = [font.render(text, True, color) for _ in range(2)]
        lrect = left.get_rect()
        center = self.rect.center
        lrect.center = center
        lrect.x -= 1
        self.blit(left, lrect)
        rrect = right.get_rect()
        rrect.center = center
        rrect.x += 1
        self.blit(right, rrect)

    def draw(self):
        self.parent.blit(self, self.rect)
3.225.221.130
3.225.221.130
3.225.221.130
 
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.