diff --git a/engine/generate_branding.py b/engine/generate_branding.py new file mode 100644 index 00000000..0fbd57c6 --- /dev/null +++ b/engine/generate_branding.py @@ -0,0 +1,182 @@ +#!/usr/bin/env python3 +""" +Generate AeThex Engine branding assets +""" + +from PIL import Image, ImageDraw, ImageFont +import math + +# AeThex brand colors +CYAN = (0, 217, 255) +PURPLE = (139, 92, 246) +DARK_BG = (30, 30, 46) +WHITE = (255, 255, 255) + +def draw_hexagon(draw, center, size, fill, outline=None, width=1): + """Draw a hexagon shape""" + x, y = center + angles = [i * 60 for i in range(6)] + points = [] + for angle in angles: + rad = math.radians(angle - 30) + px = x + size * math.cos(rad) + py = y + size * math.sin(rad) + points.append((px, py)) + + if fill: + draw.polygon(points, fill=fill) + if outline: + draw.polygon(points, outline=outline, width=width) + + return points + +def create_icon(size=256, filename="icon.png"): + """Create AeThex hexagon icon with 'A'""" + img = Image.new('RGBA', (size, size), (0, 0, 0, 0)) + draw = ImageDraw.Draw(img) + + center = (size // 2, size // 2) + hex_size = size * 0.38 + + # Draw hexagon with gradient effect + draw_hexagon(draw, center, hex_size + 4, None, CYAN, 8) + draw_hexagon(draw, center, hex_size, DARK_BG) + + # Draw 'A' letter + try: + font_size = int(size * 0.5) + font = ImageFont.truetype("/usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf", font_size) + except: + font = ImageFont.load_default() + + # Center the text + text = "A" + bbox = draw.textbbox((0, 0), text, font=font) + text_width = bbox[2] - bbox[0] + text_height = bbox[3] - bbox[1] + text_x = center[0] - text_width // 2 + text_y = center[1] - text_height // 2 - (bbox[1] + bbox[3]) // 2 + + # Draw text with gradient colors + draw.text((text_x, text_y), text, font=font, fill=CYAN) + + img.save(filename) + print(f"āœ“ Created {filename} ({size}x{size})") + return img + +def create_logo(width=620, height=300, filename="logo.png"): + """Create AeThex Engine logo with text""" + img = Image.new('RGBA', (width, height), (0, 0, 0, 0)) + draw = ImageDraw.Draw(img) + + # Draw hexagon icon on left + icon_size = int(height * 0.6) + icon_center_x = int(height * 0.4) + icon_center_y = height // 2 + hex_size = icon_size * 0.4 + + draw_hexagon(draw, (icon_center_x, icon_center_y), hex_size + 3, None, CYAN, 6) + draw_hexagon(draw, (icon_center_x, icon_center_y), hex_size, DARK_BG) + + # Draw 'A' in hexagon + try: + icon_font = ImageFont.truetype("/usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf", int(icon_size * 0.5)) + except: + icon_font = ImageFont.load_default() + + bbox = draw.textbbox((0, 0), "A", font=icon_font) + text_width = bbox[2] - bbox[0] + text_height = bbox[3] - bbox[1] + text_x = icon_center_x - text_width // 2 + text_y = icon_center_y - text_height // 2 - (bbox[1] + bbox[3]) // 2 + draw.text((text_x, text_y), "A", font=icon_font, fill=CYAN) + + # Draw "AeThex Engine" text + try: + title_font = ImageFont.truetype("/usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf", int(height * 0.35)) + subtitle_font = ImageFont.truetype("/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf", int(height * 0.18)) + except: + title_font = ImageFont.load_default() + subtitle_font = ImageFont.load_default() + + # "AeThex" in cyan + text_x = int(height * 0.7) + title_y = height // 2 - int(height * 0.15) + draw.text((text_x, title_y), "AeThex", font=title_font, fill=CYAN) + + # "Engine" in white + bbox = draw.textbbox((text_x, title_y), "AeThex ", font=title_font) + engine_x = bbox[2] + draw.text((engine_x, title_y), "Engine", font=title_font, fill=WHITE) + + img.save(filename) + print(f"āœ“ Created {filename} ({width}x{height})") + return img + +def create_splash(width=620, height=300, filename="splash.png"): + """Create splash screen""" + img = Image.new('RGB', (width, height), DARK_BG) + draw = ImageDraw.Draw(img) + + # Same as logo but with background + # Draw hexagon icon + icon_size = int(height * 0.6) + icon_center_x = int(height * 0.4) + icon_center_y = height // 2 + hex_size = icon_size * 0.4 + + draw_hexagon(draw, (icon_center_x, icon_center_y), hex_size + 3, None, CYAN, 6) + draw_hexagon(draw, (icon_center_x, icon_center_y), hex_size, (20, 20, 30)) + + # Draw 'A' + try: + icon_font = ImageFont.truetype("/usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf", int(icon_size * 0.5)) + title_font = ImageFont.truetype("/usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf", int(height * 0.35)) + except: + icon_font = ImageFont.load_default() + title_font = ImageFont.load_default() + + bbox = draw.textbbox((0, 0), "A", font=icon_font) + text_width = bbox[2] - bbox[0] + text_height = bbox[3] - bbox[1] + text_x = icon_center_x - text_width // 2 + text_y = icon_center_y - text_height // 2 - (bbox[1] + bbox[3]) // 2 + draw.text((text_x, text_y), "A", font=icon_font, fill=CYAN) + + # Draw text + text_x = int(height * 0.7) + title_y = height // 2 - int(height * 0.15) + draw.text((text_x, title_y), "AeThex", font=title_font, fill=CYAN) + + bbox = draw.textbbox((text_x, title_y), "AeThex ", font=title_font) + engine_x = bbox[2] + draw.text((engine_x, title_y), "Engine", font=title_font, fill=WHITE) + + img.save(filename) + print(f"āœ“ Created {filename} ({width}x{height})") + return img + +if __name__ == "__main__": + print("šŸŽØ Generating AeThex Engine branding assets...\n") + + # Main icons + create_icon(256, "icon.png") + create_icon(128, "icon_128.png") + create_icon(64, "icon_64.png") + create_icon(256, "main/app_icon.png") + + # Logos + create_logo(620, 300, "logo.png") + + # Splash + create_splash(620, 300, "main/splash.png") + + print("\nāœ… All branding assets generated!") + print("\nšŸ“ Files created:") + print(" - icon.png (256x256)") + print(" - icon_128.png") + print(" - icon_64.png") + print(" - logo.png (620x300)") + print(" - main/app_icon.png (256x256)") + print(" - main/splash.png (620x300)") + print("\nšŸ”§ Next step: Rebuild the engine to see the new branding!") diff --git a/engine/generate_windows_icons.py b/engine/generate_windows_icons.py new file mode 100644 index 00000000..b0e84cdf --- /dev/null +++ b/engine/generate_windows_icons.py @@ -0,0 +1,35 @@ +#!/usr/bin/env python3 +""" +Generate Windows .ico files for AeThex Engine +""" + +from PIL import Image +import os + +def create_ico(source_png, output_ico, sizes=[16, 32, 48, 64, 128, 256]): + """Create a multi-size .ico file""" + print(f"Creating {output_ico}...") + + # Load source image + img = Image.open(source_png) + + # Create different sizes + images = [] + for size in sizes: + resized = img.resize((size, size), Image.Resampling.LANCZOS) + images.append(resized) + + # Save as .ico + images[0].save(output_ico, format='ICO', sizes=[(img.width, img.height) for img in images], append_images=images[1:]) + + file_size = os.path.getsize(output_ico) / 1024 + print(f"āœ“ Created {output_ico} ({file_size:.1f} KB)") + +if __name__ == "__main__": + print("🪟 Generating Windows .ico files...\n") + + # Create the .ico files + create_ico("icon.png", "platform/windows/godot.ico") + create_ico("icon.png", "platform/windows/godot_console.ico") + + print("\nāœ… Windows icon files generated!") diff --git a/engine/icon.png b/engine/icon.png index c4ca72e7..2a84d2a0 100644 Binary files a/engine/icon.png and b/engine/icon.png differ diff --git a/engine/icon_128.png b/engine/icon_128.png new file mode 100644 index 00000000..39ea5e99 Binary files /dev/null and b/engine/icon_128.png differ diff --git a/engine/icon_64.png b/engine/icon_64.png new file mode 100644 index 00000000..8fd7f0ba Binary files /dev/null and b/engine/icon_64.png differ diff --git a/engine/logo.png b/engine/logo.png index 65a30ce7..cee58b1a 100644 Binary files a/engine/logo.png and b/engine/logo.png differ diff --git a/engine/main/app_icon.png b/engine/main/app_icon.png index 2f81dc86..2a84d2a0 100644 Binary files a/engine/main/app_icon.png and b/engine/main/app_icon.png differ diff --git a/engine/main/splash.png b/engine/main/splash.png index 8484932c..1a4107a1 100644 Binary files a/engine/main/splash.png and b/engine/main/splash.png differ diff --git a/engine/platform/windows/godot.ico b/engine/platform/windows/godot.ico index f0bb6822..eaabbfd7 100644 Binary files a/engine/platform/windows/godot.ico and b/engine/platform/windows/godot.ico differ diff --git a/engine/platform/windows/godot_console.ico b/engine/platform/windows/godot_console.ico index 1d27e3d6..eaabbfd7 100644 Binary files a/engine/platform/windows/godot_console.ico and b/engine/platform/windows/godot_console.ico differ