An Intruder on the Desktop: Virtual Cat and Mouse Chase Application with Python

It all started when my sister showed me a video she was watching while taking a break at work. In the video, there was a cute virtual cat animation following the cursor with smooth focus on the desktop. When she threw out the question, “Can we make this for our computers?”, as a software developer, it was impossible not to roll up my sleeves.

The result is a virtual cat simulation that tirelessly chases a large white ball attached to the tip of your mouse across the screen. It turned out to be a completely open-source and fun project, but it’s worth giving a small warning right from the start: the presence of a digital cat constantly trying to catch your cursor on the screen might make it a bit difficult to focus. Also, a personal note from me: it is strictly not recommended to install and use it on work computers!

Python Virtual Cat Chase Application

Figure 1: The virtual cat chasing the white ball at the tip of the cursor on the desktop.


Update: v2.0.0.0 Is Here 🎉

After sharing the first version, two pieces of feedback kept coming back: “it doesn’t work on my second monitor” and “any chance of getting this in a language other than Turkish?” I listened to both, and v2.0.0.0 is the result:

  • 🖥️ Full Multi-Monitor Support: The cat and ball now follow your cursor across every monitor connected to your system, not just the primary one. Move your mouse to any screen and the pair follows seamlessly.
  • 🌍 Multi-Language Support (English Included): The app itself defaults to Turkish out of the box — that’s the developer’s native language, after all — but full English support ships with every release. Switching the cat over to English takes about ten seconds; I’ll walk through it below.
  • ⚙️ No-Code Settings: Speed, boredom timing, purring frequency, and every other parameter can now be tuned from a plain settings file sitting next to the app — no Python knowledge required.
  • 📦 Customization Survives the Compiled Build: Settings and language files aren’t baked into the .exe; they live in an external settings/ folder that’s read at every launch. That means you can change the language or tweak the behavior of the compiled release without touching Python or recompiling anything.

For English-Speaking Users: How to Switch Languages

When you download and run v2.0.0.0, the cat will greet you in Turkish first, since that’s the default. To switch to English, open the settings/settings.json file that ships next to the executable in any plain text editor, find the line "LANGUAGE": "tr", change it to "LANGUAGE": "en", save, and restart the app. That’s it — no recompiling, no extra downloads. The English text is already bundled in settings/lang/en.json.

Want a language other than Turkish or English? Drop a new JSON file into settings/lang/ (say, de.json for German), following the same structure as tr.json/en.json — a messages section for in-app text and a bubble_texts section for the cat’s 100 idle one-liners — then point LANGUAGE at that file’s name in settings.json. The source code doesn’t need to change at all.


The Logic Behind the Project and the Development Process

Ensuring that a virtual character on the screen reacts to the user’s mouse movements in a real-time and smooth manner was the most enjoyable part of the project. If the cat’s movement consisted solely of teleporting to the coordinates of the mouse, all the naturalness would be lost.

Dynamic Tracking Algorithm

The acceleration, deceleration, and turning angles exhibited by the cat as it runs toward the large white ball at the tip of the mouse are based on a mathematical tracking algorithm. The fact that the cat speeds up when you suddenly pull the mouse away, and slows down to a stop as it approaches the cursor, adds an organic feel to the simulation. I managed to build this smooth movement structure by utilizing Python’s visualization and interface capabilities.

The Multi-Monitor Problem

In v1, the cat and ball were confined to the primary display’s boundaries; move your cursor to a second monitor and the pair would simply vanish. For v2, I added logic that scans the coordinates of every screen attached to the system and repositions the cat and ball onto whichever monitor the cursor is currently on. On Windows this works out of the box; on Linux and macOS, the optional screeninfo library provides the same experience.

The Power of Open Source and the GitHub Family

I shared the code completely open-source so that the project can be developed by anyone, new movement animations can be added to the cat, or the tracked object can be customized. You can access the raw state and architecture of the code directly through the GitHub repository.

🔗 GitHub Repository: Cat Ball Chase Project Page


Installation and Direct Run (Quick Start)

You don’t need to set up a Python environment and wrestle with libraries to try the project on your computer. I have prepared compiled versions of the application for those who want to welcome a virtual pet partner directly to their desktop without getting into technical details.

🚀 Direct Download (v2.0.0.0 — Latest, Multi-Monitor & Multi-Language Support): KediTopTakibi.zip

🕰️ Previous Release (v1.0.0.0): KediTopTakibi.exe

When you download v2.0.0.0, you’ll get a .zip file containing KediTopTakibi.exe alongside a settings/ folder. Just keep that folder in the same location as the .exe — that’s how the app reads its settings and language, no other setup needed. And remember: the app will speak Turkish by default until you flip the switch described above.

(It’s worth reminding you again; if you don’t want your boss or colleagues coming up behind you and seeing a cat chasing a white ball on the screen, keeping this fun for your personal computers at home would be a wiser engineering decision.)


For Developers: What’s Under the Hood?

If you want to get into the kitchen of the work, change the cat’s speed parameters, or integrate another object instead of the white ball, you can start by cloning the Python project. The basic requirements are quite standard:

pip install pyautogui keyboard
python KediTopTakibi.py

Optimizations were applied in the project to capture screen coordinates instantly and to draw the cat figure smoothly even at high frame rates (FPS). In order to prevent it from unnecessarily fatiguing the processor (CPU) while running in the background and slowing down your computer to hinder your work, the loop intervals were meticulously optimized.

If you’re running from source, settings and languages live in the same place: settings/settings.json, settings/lang/tr.json, and settings/lang/en.json inside the project folder. You can personalize your own build just by editing those files — no need to touch a single line of Python.


Conclusion

Starting with inspiration from a small video frame, this tiny simulation turned into a sweet project that makes the desktop a bit more fun. With v2.0.0.0, it can now find you no matter which monitor you’re working on, and it can chat with you in your own language too. You can also fork the code to bring new mechanics to the project, and share your experiences with your desktop’s new guest with me via GitHub, LinkedIn, and social media!

#blog #python #tkinter #simulation #open-source #entertainment #multi-language #cat #catslovers

Related Contents

Introduction to the IoT World with ESP32: From Scratch to Advanced Project Development Guide

A comprehensive technical blog post where we thoroughly examine the dual-core architecture, pin constraints, and deep sleep modes of the ESP32 microcontroller, and develop an end-to-end MQTT-connected sensor station.

blog iot esp32 esp8266 arduino free-rtos deep-sleep electronics wi-fi bluetooth embedded-systems mqtt-protocol arduino-ide

Modern Rechargeable Battery Technologies and Electrochemical Performance Analysis

This blog post, which details modern battery technologies and the electrochemical operating principles of these systems, examines the technical specifications, performance metrics, and usage advantages of Li-ion, LiFePO4, NiMH, Ni-Cd, and lead-acid batteries from an engineering perspective.

blog electronics battery-technologies lithium-ion li-ion battery-performance lifepo4 nickel-metal-hydride rechargeable-batteries battery-management-systems ni-cd ni-mh energy-systems battery-analysis

Post-Exploitation Strategies and In-Depth Analysis in Internal Network Penetration Tests

This article analyzes post-exploitation techniques in internal network penetration tests, including privilege escalation methods, persistence mechanisms, and lateral movement processes within Active Directory with technical code examples. Professional tools such as Mimikatz, Impacket, and BloodHound are covered.

blog cyber-security network-security information-security cloud-security network privilege-escalation penetration-testing red-team post-exploitation active-directory lateral-movement intranet internal-network local-network

OWASP Top 10 Security Strategies in .NET 8 Projects

A critical guide for secure coding in .NET 8 projects! Discover how to protect your application using tools like EF Core, Data Protection API, and policy-based authorization against OWASP Top 10 threats with technical examples. Learn fundamental strategies for secure software architecture.

blog cyber-security dotnet owasp network-security information-security cloud-security

Modern Network Strategies with Zero Trust Architecture

Zero Trust architecture is a modern security strategy that dismantles the 'default trust' paradigm in today's hybrid world, where network boundaries have become increasingly blurred. This approach treats every user, device, and service as a potential risk factor—whether inside or outside the network—by subjecting access requests to continuous, contextual, and rigorous verification.

blog cyber-security zero-trust network-security information-security cloud-security

Veri Analizi Okulu: Data Science and Artificial Intelligence Training

Operating under the coordination of Yükseköğretim Kurumu (YÖK), the Veri Analizi Okulu (VAO) combines theoretical knowledge with practice through modules in Basic Statistics, Computational Social Sciences, Panel Data Analysis, Artificial Intelligence, Digital Humanities, and Psychometrics. Check out our blog post for both a high-quality education and your career.

blog veri-analizi-okulu vao basic-statistics computational-social-sciences panel-data-analysis artificial-intelligence ai-and-facilitating-tools ai ai-and-machine-learning digital-humanities psychometrics

Nur-o-link: Remote-Controlled Robotic Arm and Vehicle System

The Nur-o-link project is an innovative robotics study that combines remote-controllable robotic arm and autonomous vehicle features, highlighting the interaction between hardware and software.

blog robotic robotic-arm robotik iot embedded cplusplus arduino esp32 remote-control software-hardware rex-8in1-v2 electronic

Gungor-robot-car: ESP32 Camera-Controlled Robot Car

A robotic vehicle project capable of live video streaming via WiFi and remote control through a browser-based interface, powered by the ESP32-WROVER module.

blog robotics robotic iot embedded cplusplus arduino esp32 esp32-cam esp32-camera remote-control robotic-car electronic electronics software-hardware

Engineering Fundamentals and Mechanical Analysis of Flexible Structures in Soft Robotic Systems

A high-technical-depth blog post focusing on control algorithms and material mechanics, exploring the transformation of traditional rigid robotic systems through flexible elastomers and bio-mimetic approaches.

blog robotics soft-robotics mechatronics control-systems simulation engineering

Collective Intelligence and Dynamic Task Allocation in Swarm Robotic Systems

A technical blog post examining the technical foundations, algorithmic approaches, and software libraries for collective intelligence, dynamic task sharing, and distributed control mechanisms in swarm robotic systems.

blog robotics autonomous swarm-robotics multi-agent-systems task-allocation ros2 collective-decision-making distributed-systems swarm-intelligence intelligent-robots

The Evolution of Robotic Systems and Modern Migration Strategies to the ROS 2 Ecosystem

This blog post addresses the architectural changes in the transition process from ROS 1 to ROS 2, the technical advantages of the DDS-based communication layer, and system modernization strategies using modern software libraries in a technical language.

blog robotic robotics autonomous ros2 dds industrial-automation real-time-systems control-systems microservices

Agriculture 4.0 and Next-Generation Approaches in Autonomous Robotic Systems

A blog post covering navigation strategies for autonomous vehicles in the Agriculture 4.0 ecosystem, deep learning-based crop monitoring algorithms, and ROS 2-based software architectures.

blog robotics autonomous agriculture-4-0 path-planning crop-monitoring ros2 smart-farming precision-agriculture ai lidar image-processing sensor-fusion edge-computing

Topological Approaches in Data Science and Graph Theory-Based Network Analysis with Gephi

This technical blog post provides an in-depth analysis of how to visualize complex relationships in big data sets using graph theory and the Gephi software, accompanied by mathematical metrics and software libraries.

blog gephi network-analysis data-visualization graph-theory network-analysis python data-science centrality-metrics complex-systems

Deep Learning-Based Object Detection and Manipulation Techniques in Autonomous Robotic Systems

A technical review and software integration of modern robotic systems equipped with deep learning architectures, 6-DoF grasping strategies, and real-time object recognition algorithms.

blog robotics autonomous ai python pytorch ros2 yolo opencv autonomous-robots deep-learning machine-learning

Deep Dive into the Fundamental Building Blocks of Electronic Design: Engineering Foundations of Passive Component Selection

This blog post covers the non-ideal parasitic parameters, frequency-dependent behaviors, and modern engineering selection criteria for capacitors and inductors, which are critical in electronic circuit design, along with Python-based analysis methods.

blog electronics passive-components capacitor-selection inductor-parameters esr esl frequency-analysis circuit-simulation

Advanced Spatial Analysis and Data Science Integration in Modern Geographic Information Systems

A blog post covering data mining in the ArcGIS ecosystem, Python-based automation processes, and spatial statistics methods to transform raw location data into strategic decision support mechanisms.

blog arcgis spatial-analysis geographic-information-systems python arcpy mapping spatial-statistics data-science big-data

Superposition Theorem and Analytical Investigation of Multi-Source Linear Circuits

A blog post examining the theoretical foundations, mathematical modeling, and Python-based simulation approaches of the Superposition Theorem, which analyzes the effect of each source individually and combines them in linear circuits containing multiple independent sources.

blog electric electronics superposition-theorem circuit-analysis linear-systems circuit-solution kirchhoff-laws

Mathematical Architecture of Complex Circuits and Nodal Analysis Method

Theoretical analysis of the nodal analysis method based on Kirchhoff's Current Law, the supernode concept, and modeling of circuit solutions with computational engineering approaches using the NumPy library.

blog electric electronic circuit-analysis kirchhoff-laws nodal-analysis numpy circuit-simulation circuit-theory supernode

Joule Heating and Advanced Thermal Management Strategies in Modern Electronics

A blog post covering the physical foundations of Joule heating, advanced PCB design techniques for optimizing thermal management in modern circuits, PID-based cooling algorithms, and embedded software control mechanisms.

blog electricity electronics joule joule-heating thermal-management heat-distribution power-electronics

Engineering Analysis and Selection Strategies for Resistor Parameters in Circuit Design

A technical blog post examining critical resistor parameters beyond Ohm's Law in real-world circuit designs, including parasitic effects and engineering calculations.

blog electrical electronics ohms-law circuit-analysis electronic-design resistor-selection engineering

Reduction Methods and Numerical Analysis Approaches in Linear Circuit Analysis

This article examines methods for simplifying complex electrical circuits using Thevenin and Norton theorems, mathematical analysis steps, and Python-based numerical analysis techniques from a detailed engineering perspective.

blog electric electrical-circuits circuit-analysis thevenin-theorem norton-theorem circuit-reduction linear-circuits

Professional Debugging Strategies and In-Depth Analysis Techniques in Embedded Systems Development

A technical article covering professional debugging processes in embedded systems under hardware constraints and real-time requirements, using critical methods such as JTAG/SWD analysis, memory management, and signal integrity.

blog electronics embedded-systems debugging troubleshooting jtag rtos microcontroller hardware

Communication Layers and Protocol Analysis in Modern Smart Home Ecosystems

An in-depth analysis of the technical architectures of Wi-Fi, BLE, and Zigbee protocols, mesh network structures, and software integration processes in smart home ecosystems.

blog iot zigbee wi-fi bluetooth bluetooth-ble communication-protocols electronics mesh-network

Power Management and Efficiency Strategies in Arduino Projects

A comprehensive technical article on reducing energy consumption to the microampere level in Arduino projects through hardware interventions, deep sleep modes, and the use of low-power regulators.

blog electronics arduino power-optimization embedded-systems deep-sleep battery-life avr

Raspberry Pi and Hardware Integration in Industrial Systems

A comprehensive article examining the use of Raspberry Pi in industrial automation, covering technical details from hardware isolation to RTOS kernel optimization and Modbus/MQTT communication protocols.

blog electronics raspberry-pi iiot iot industrial-automation mqtt rtos plc sensor-data-processing python

Architectural Decision Processes in IoT Projects: A Technical Analysis of ESP32 and ESP8266 Microcontrollers

A comprehensive guide providing an optimized selection strategy for IoT projects by technically analyzing the architectural differences, connectivity capabilities, and hardware features of ESP32 and ESP8266 microcontrollers.

blog iot esp32 esp8266 arduino free-rtos microcontroller electronics wi-fi bluetooth