Python library for StarCraft II "An easy-to-use library for writing AI Bots for StarCraft II in Python 3. The ultimate goal is simplicity and ease of use, while still preserving all functionality. A really simple worker rush bot should be no more than twenty lines of code, not two hundred. However, this library intends to … Sigue leyendo 0. StarCraft II Python Bot: Introduction
Autor: xcran
1. StarCraft II Python Bot: Gathering resources
Base script import sc2 from sc2 import run_game, maps, Race, Difficulty from sc2.player import Bot, Computer class AlanBot(sc2.BotAI): async def on_step(self, iteration): pass run_game(maps.get("AbyssalReefLE"), [ Bot(Race.Terran, AlanBot()), Computer(Race.Zerg, Difficulty.Hard) ], realtime=True) - Command Center The Command Center is the main building you need. On it you build your workers. You start with one the match and … Sigue leyendo 1. StarCraft II Python Bot: Gathering resources
2. StarCraft II Python Bot: Building units
Everything is an unit.Random Apex Base Script import sc2 from sc2 import run_game, maps, Race, Difficulty from sc2.player import Bot, Computer from sc2.ids.unit_typeid import * class AlanBot(sc2.BotAI): async def on_step(self, iteration): await self.buildWorkers() await self.distribute_workers() await self.buildRefineries() async def buildWorkers(self): for commandcenter in self.units(UnitTypeId.COMMANDCENTER).ready.noqueue: if self.can_afford(UnitTypeId.SCV) and self.workers.amount < self.units(UnitTypeId.COMMANDCENTER).amount * 14 + 4: await … Sigue leyendo 2. StarCraft II Python Bot: Building units
TIC80 – Landscape
RandomWalker III Tic80
Made with TIC80.
pico8 1D Perlin Noise
Edit [4 dec 20]: worst post, writer advice. Using linear interpolation to generate 1D Perlin Noise in pico8: Online Version A poem to an old messed up post.
ASCII map IV – Caves
Los cambios visuales son pocos ya que lo que realmente ha cambiado es la parte de código para el mapa y almacenamiento. Orientándolo a objetos el código se ha vuelto más extensible, he simplificado la manera en la que se dibuja el mapa separándolo en varias funciones (creación y dibujado). Cada carácter es un objeto propio y … Sigue leyendo ASCII map IV – Caves
ASCII map III – Castles
Imágenes de los mapas con castillos añadidos, la continuación serán unos métodos de creación del mapa nuevos para empezar a orientar a objetos el programa. De esta manera los castillos podrán tener edificios propios y cada carácter puede tener asignado un objeto con un tipo: océano, montaña, castillo, etc. Los nombres no son definitivos.
Blender: Perlin Noise
Para trabajar con Perlin Noise existen diferentes programas y lenguajes y uno muy potente es Blender con Python. Tras haber trabajado y aprendido a manejar el Perlin Noise con Processing el paso a escribir en Python las funciones con las que trabajo fue complejo en el sentido de que existe poca información de cómo usar … Sigue leyendo Blender: Perlin Noise