Mastering Scene Hierarchy and Interactive Elements in LibGDX

In 2D game development, managing visual components and user interactions efficiently requires a structured rendering pipeline. LibGDX provides the com.badlogic.gdx.scenes.scene2d package, which introduces two foundational concepts: the Stage and Actors. A Stage acts as a centralized manager that handles event dispatching, coordinate transformat ...

Posted on Sun, 26 Jul 2026 16:39:31 +0000 by tony-kidsdirect

Handling Bullet Collision Removal in Pygame

When working with bullet collision detection in Pygame, bullets may continue moving after hitting walls if they are not properly removed from the active bullet list. The key is to remove the bullet from the list immediately upon collision detection. Collision Detection with Bullet Removal In the bullet's draw() or update() method, perform colli ...

Posted on Sat, 18 Jul 2026 16:09:54 +0000 by almightyegg

Python Game Development Source Code Collection

Coin Colelctor import pygame import random import os # Initialize game components def setup_game(): pygame.init() display = pygame.display.set_mode((800, 600)) pygame.display.set_caption('Coin Collector') # Load game assets game_assets = {} asset_paths = { 'background': 'assets/bg.png', 'character': ...

Posted on Fri, 17 Jul 2026 16:40:16 +0000 by shan169

Complete Guide for Porting cocos2d-x Games from Windows to Android

Porting a cocos2d-x game from Windows to Android involves multiple configuration steps and toolchain setups. This guide provides a comprehensive walkthrough based on practical experience with cocos2d-x 2.1.2, covering environment preparation, project generation, compilation, and common pitfalls. Development Environment The development environme ...

Posted on Wed, 24 Jun 2026 17:36:50 +0000 by codered27

Physics-Based Simulation: Finite Element and Finite Volume Methods

0 Introduction This document explores computational approaches for physics-based simulations in game development. While these methods are commonly used in engineering and scientific computing, their adaptation for real-time interactive applications presents unique challenges. 1 Energy-Based Physics Physics simulations fundamentally rely on ener ...

Posted on Thu, 18 Jun 2026 16:29:14 +0000 by jeff5656

Pyglet-Based Sokoban Level Editor with Mouse-Driven Sprite Tracking

This implementation builds a Sokoban level editor using Pyglet, featuring real-time sprite movement synchronized to mouse psoition, grid-based layout, and interactive tile placement. Mouse-Driven Sprite Movement A sprite follows the mouse cursor continuously. On mouse press, a tile is placed at the current grid-aligned position. The core logic ...

Posted on Mon, 08 Jun 2026 17:45:26 +0000 by jeancharles

Managing Object References for Inter-Script Communication in Unity

Setup Overview Two key nodes exist in this scenario: a Unit Manager node (equipped with Transform and UnitFactory components) and a Unit prefab node (equipped with Tarnsform and Unit components). The objective involves retrieving the Unit component from the instantiated prefab. Direct Component Reference Approach A common novice implementation ...

Posted on Fri, 29 May 2026 16:48:06 +0000 by Mirage

Implementing Dynamic Boss Battle Dialogue Generation System

Overview This module handles the generation of all boss battle dialogues before combat begins. Based on the player's current moral composition (good/neutral/evil), the system pre-generates the demon lord's (boss's) complete set of lines including entry narration, advantage taunts (10 lines), disadvantage monologues (10 lines), defeat declaratio ...

Posted on Wed, 20 May 2026 19:50:43 +0000 by perfume

Python Game Programming: Creating Gomoku with Pygame

Introduction to Python Game Development This article explores how to create a simple Gomoku (Five in a Row) game using Python and the Pygame libray. Gomoku is a classic board game where two players take turns placing stones on a grid, aiming to be the first to create a continuous line of five stones. Development Environment For this project, we ...

Posted on Wed, 20 May 2026 19:32:49 +0000 by perrohunter

Building a Turn-Based Battle Game with Python Tkinter

Tkinter is Python's built-in standard GUI library that ships with every Python installation, enabling rapid development of graphical applications. Creating the Game Interface The following implementation creates a battle game window using grid-based layout management: import tkinter as tk class Fighter: def __init__(self, name, health, att ...

Posted on Mon, 11 May 2026 12:38:22 +0000 by inkel