<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Tecmage on Medium]]></title>
        <description><![CDATA[Stories by Tecmage on Medium]]></description>
        <link>https://medium.com/@tecmage?source=rss-578f7542c4f2------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*dRpHWF6YnkOk_NHhmnlOUw.jpeg</url>
            <title>Stories by Tecmage on Medium</title>
            <link>https://medium.com/@tecmage?source=rss-578f7542c4f2------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 13:15:09 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@tecmage/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Building a Retro Kung Fu Game with Pygame: A Step-by-Step Journey]]></title>
            <link>https://tecmage.medium.com/building-a-retro-kung-fu-game-with-pygame-a-step-by-step-journey-3f42d1938c1d?source=rss-578f7542c4f2------2</link>
            <guid isPermaLink="false">https://medium.com/p/3f42d1938c1d</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[education]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[game-development]]></category>
            <category><![CDATA[aws-cli]]></category>
            <dc:creator><![CDATA[Tecmage]]></dc:creator>
            <pubDate>Sun, 25 May 2025 16:01:14 GMT</pubDate>
            <atom:updated>2025-05-25T16:01:14.380Z</atom:updated>
            <content:encoded><![CDATA[<p>Building a Retro Kung Fu Game with Pygame: A Step-by-Step Journey</p><p>Introduction</p><p>Remember those classic Nintendo kung fu games that kept us glued to our screens <br>for hours? The simple yet addictive gameplay of dodging, jumping, and punching <br>your way through waves of enemies has a timeless appeal. In this article, I’ll <br>walk you through how I built a retro-style kung fu game using Python and the <br>Pygame library, complete with player controls, enemy AI, and core game <br>mechanics.</p><p>The Vision</p><p>I wanted to create a game that captured the essence of classic side-scrolling <br>fighting games with:<br>• Intuitive controls (arrow keys for movement, space for attacks)<br>• Enemy AI with different behaviors<br>• Health and scoring systems<br>• The satisfying feeling of defeating enemies with well-timed punches</p><p>Setting Up the Project</p><p>The game is structured with a modular approach, separating concerns into <br>different Python files:</p><p>kungfu_game/<br>├── run.py # Entry point<br>├── game.py # Main game loop and management<br>├── player.py # Player character mechanics<br>├── enemy.py # Enemy AI and behavior<br>├── assets/ # Directory for game assets<br>└── README.md # Documentation</p><p>This organization makes the code more maintainable and easier to expand with new<br>features.</p><p>The Player Character</p><p>The heart of any fighting game is the player character. Our kung fu master has <br>several key abilities:</p><p>python<br>def jump(self, ground_height):<br> if self.is_on_ground(ground_height) and not self.is_dodging:<br> self.velocity_y = -self.JUMP_STRENGTH<br> self.is_jumping = True<br> self.image = self.jumping_image</p><p>def punch(self):<br> if not self.is_punching and not self.is_dodging:<br> self.is_punching = True<br> self.punch_timer = 0<br> self.image = self.punching_image</p><p>def dodge(self, ground_height):<br> if self.is_on_ground(ground_height) and not self.is_jumping and not self.is_dodging:<br> self.is_dodging = True<br> self.dodge_timer = 0<br> self.image = self.dodging_image<br> self.rect.y += 40 # Move down to simulate crouching</p><p>These methods handle the core gameplay mechanics, ensuring that actions like <br>punching and dodging have appropriate cooldowns and can’t be performed <br>simultaneously.</p><p>Enemy AI</p><p>What’s a kung fu game without opponents? Our enemies have three distinct <br>behaviors:</p><p>1. Patrol: Wander back and forth when the player is far away<br>2. Chase: Pursue the player when they come within detection range<br>3. Attack: Strike when the player is within attack range</p><p>python<br>def update(self, player_rect):<br> # Update attack cooldown<br> if self.attack_cooldown &gt; 0:<br> self.attack_cooldown -= 1<br> <br> # AI behavior based on state<br> player_distance = abs(self.rect.centerx — player_rect.centerx)<br> <br> # Change state based on player distance<br> if player_distance &lt; self.attack_range:<br> self.state = “attack”<br> elif player_distance &lt; self.detection_range:<br> self.state = “chase”<br> else:<br> self.state = “patrol”</p><p>This simple state machine creates enemies that feel responsive to the player’s <br>actions, making combat more engaging.</p><p>Game Loop and Collision Detection</p><p>The main game loop handles updates, rendering, and collision detection:</p><p>python<br>def _update(self):<br> # Update player and enemies…<br> <br> # Check for player punch collisions<br> punch_rect = self.player.get_punch_rect()<br> if punch_rect:<br> for enemy in self.enemies:<br> if punch_rect.colliderect(enemy.rect):<br> if enemy.take_damage(20): # Enemy defeated<br> self.score += enemy.get_points()<br> enemy.kill()<br> <br> # Check for enemy attacks on player…</p><p>Collision detection is crucial for combat mechanics, determining when punches <br>connect and when the player takes damage.</p><p>## Visual Feedback and UI</p><p>Even with simple graphics, providing clear visual feedback is essential:</p><p>• The player changes appearance when punching or dodging<br>• A health bar shows the player’s current status<br>• Score counter tracks defeated enemies<br>• Game over screen appears when health reaches zero</p><p>Challenges and Solutions</p><p>Physics Implementation</p><p>Implementing jumping physics required careful tuning of gravity and jump <br>strength:</p><p>python<br># Apply gravity<br>if not self.is_on_ground(ground_height):<br> self.velocity_y += self.GRAVITY<br> self.rect.y += self.velocity_y<br>else:<br> self.rect.bottom = ground_height<br> self.velocity_y = 0<br> self.is_jumping = False</p><p>Finding the right values for these constants was a process of trial and error to<br>achieve satisfying movement.</p><p>Enemy Spawning</p><p>To keep the game challenging but fair, enemies spawn at regular intervals:</p><p>python<br># Spawn new enemies periodically<br>self.enemy_spawn_timer += 1<br>if self.enemy_spawn_timer &gt;= 180: # Every 3 seconds (at 60 FPS)<br> self._spawn_enemies(1)<br> self.enemy_spawn_timer = 0</p><p>This creates a steady flow of opponents without overwhelming the player.</p><p>Future Enhancements</p><p>While the current version captures the core gameplay, there’s plenty of room for<br>expansion:</p><p>1. Sprite Animations: Replace the placeholder rectangles with animated character <br>sprites<br>2. Sound Effects: Add impact sounds, background music, and voice effects<br>3. Level Design: Create multiple stages with unique layouts and challenges<br>4. Boss Battles: Implement special enemies with more complex attack patterns<br>5. Power-ups: Add collectible items that enhance the player’s abilities</p><p>Conclusion</p><p>Building this kung fu game with Pygame demonstrates how accessible game <br>development has become. With just a few hundred lines of Python code, we’ve <br>created a functional game that captures the essence of classic arcade fighters.</p><p>The modular design makes it easy to expand and refine, whether you’re looking to<br>add new features or use it as a learning tool for game development concepts.</p><p>Ready to try your hand at game development? The complete source code is <br>available to explore, modify, and expand upon. Happy coding, and may your kung <br>fu be strong!</p><p>━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</p><p>This project was created using Python 3.10 and Pygame 2.6.1. All code examples <br>are available in the full project repository.<br>Here is the link to the repository: <a href="https://github.com/rpsmaini/awsCLI-game-rpsm">https://github.com/rpsmaini/awsCLI-game-rpsm</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3f42d1938c1d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Back to Blog!!!]]></title>
            <link>https://tecmage.medium.com/back-to-blog-b2a8439dda6e?source=rss-578f7542c4f2------2</link>
            <guid isPermaLink="false">https://medium.com/p/b2a8439dda6e</guid>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[tech-events]]></category>
            <category><![CDATA[university]]></category>
            <category><![CDATA[techcommunity]]></category>
            <category><![CDATA[ignou]]></category>
            <dc:creator><![CDATA[Tecmage]]></dc:creator>
            <pubDate>Thu, 26 Oct 2023 15:49:39 GMT</pubDate>
            <atom:updated>2023-10-26T15:49:39.370Z</atom:updated>
            <content:encoded><![CDATA[<p>Hello readers I am back to writing my blogs after a really long time(I guess 2+ years). Well in my previous blog, I promised to stay consistent in my content. So where I have been???<br>To answer simply these last 2 years were a roller coaster, new people, new ventures, new experiences, college. Got engaged with tech communities, and indulged with individuals. You will see this in my next blogs where I will be sharing my experiences. If you find posts interesting, have any questions, wish to exchange any learnings, experiences, or opportunities, or wish to collaborate I am down for it. So stay tuned for the next blogs.<br>In the meantime check out my previous blogs.</p><p>(p.s. Constructive feedback/ suggestions are always welcome)</p><p>Contact me: <a href="http://mainiravpreet@gmail.com/">email</a><br>or<br>Connect on <a href="https://www.linkedin.com/in/ravpreet-singh-maini-0346b21b6/">Linkedin</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b2a8439dda6e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Greetings, to all my readers welcome to my TechPEP-Talks series.]]></title>
            <link>https://tecmage.medium.com/greetings-to-all-my-readers-welcome-to-my-techpep-talks-series-28a44ca71af?source=rss-578f7542c4f2------2</link>
            <guid isPermaLink="false">https://medium.com/p/28a44ca71af</guid>
            <dc:creator><![CDATA[Tecmage]]></dc:creator>
            <pubDate>Mon, 13 Sep 2021 16:34:09 GMT</pubDate>
            <atom:updated>2021-09-13T16:34:09.094Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*i42iHXm2QVMpYHG5" /><figcaption>Photo by <a href="https://unsplash.com/@franki?utm_source=medium&amp;utm_medium=referral">Franki Chamaki</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Greetings, to all my readers welcome to my <strong><em>TechPEP-Talks </em></strong>series. In this section we are going to discuss about tech in present and it’s actions which is shaping future.</p><p>As for today we are going to see data science terminology <em>a.k.a</em> lingo. Some common terms used in data science workplace.</p><ol><li>Statistics - statistics is an inherently necessary component of data science. With wide range of real life applications it includes your general mean, median, mode to probability distribution to complex Bayesian statistics, dimension reduction.</li><li>Algorithm- ML algorithms or simply algorithm is a set of rules or instructions that are followed by a computer programme to implement calculations or perform other problem-solving functions. Broadly classified into: 1. Supervised Algorithms 2. Unsupervised Algorithms</li><li>Outliers- a data point that is drastically different or distant from other data points. The major source of errors are measurement error, data entry errors, errors in data processing, problems with a sample or simply a natural result in the data.</li><li>Metadata- Metadata is data about the data or documentation about the information which is required by the users. For example: A library catalog may be considered metadata. The directory metadata consists of several predefined components representing specific attributes of a resource, and each item can have one or more values. These components could be the name of the author, the name of the document, the publisher’s name etc.</li></ol><p>That’s it for part one Thank you readers for reading.</p><p>P.S: Apologies for making you wait. Due to some Commitments I wasn’t available. Now you will get articles monthly. So stay tuned in.</p><p>Follow me on <a href="http://www.linkedin.com/in/ravpreet-singh-maini-0346b21b6">Linkedin</a></p><p>or</p><p>Join my channel on <a href="https://discord.gg/8jc5Q3YKxs">Discord</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=28a44ca71af" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[MOOCs worth student’s time?]]></title>
            <link>https://tecmage.medium.com/moocs-worth-students-time-1d537cc854c5?source=rss-578f7542c4f2------2</link>
            <guid isPermaLink="false">https://medium.com/p/1d537cc854c5</guid>
            <category><![CDATA[education-technology]]></category>
            <category><![CDATA[mooc-courses]]></category>
            <category><![CDATA[technology]]></category>
            <dc:creator><![CDATA[Tecmage]]></dc:creator>
            <pubDate>Sun, 11 Jul 2021 16:06:16 GMT</pubDate>
            <atom:updated>2021-07-11T16:06:16.893Z</atom:updated>
            <content:encoded><![CDATA[<p>Greetings, MOOCs(Massive Open Online Courses) are online courses where learners irrespective of age, majors, qualification and geographical barriers can upskill themselves or extend their knowledge almost for free.</p><p>As compared to traditional classroom methods where they could serve a few hundreds or thousands of students, MOOCs can serve millions of learners around the globe giving them decent education.</p><p>Here are my opinion on MOOCs:</p><ol><li>Via. MOOCs learners can learn with their own pace and flexibility which gives them a sense of convenience and comfort.</li><li>Thanks to MOOCs learners can learn for topnotch institutes like <em>Harvard, MIT, UBC, UCL, Wharton business</em> and these are not limited to universities even organizations like <em>IBM, AWS, Google, CISCO, Microsoft</em> also provide MOOCs to familiarize learners with their latest tools.</li><li>MOOCs are not limited to tech and management learners can learn designing, languages or for personal development and many more.</li><li>Even in some courses learner is rewarded with a Certificate of Completion so you could post on your social network.</li><li>Another point I want to mention, not every MOOC is free some may cost a few bucks but still if you are getting all these benefits above that I mentioned, It’s worth learner’s resources and time.</li></ol><p>Here are links to some MOOCs which you can explore on your own:</p><ol><li><a href="https://www.greatlearning.in/academy">Great Learning</a> gives a lot of free courses and there <a href="https://www.greatlearning.in/academy/learn-for-free/live-sessions">On-demand sessions</a> are also decent if learners are not so comfortable in English their catalogue also contains courses in Hindi.</li><li>Coursera, I personally recommend like this platform because it has well structured courseware and a large number of institutes providing MOOCs.</li><li>IBM open P-TECH, is a MOOC platform by IBM giving you MOOCs on tech with tools like watson, ibmcloud etc.</li></ol><p>I hope this may help you. Thank you for reading.</p><p>Follow me on <a href="http://www.linkedin.com/in/ravpreet-singh-maini-0346b21b6">Linkedin</a></p><p>or</p><p>Join my channel on <a href="https://discord.gg/8jc5Q3YKxs">Discord</a></p><p>Tune in for every Sunday for new articles</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1d537cc854c5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[IT Automation with Python Professional Certificate. A learner’s Experience]]></title>
            <link>https://tecmage.medium.com/it-automation-with-python-professional-certificate-a-learners-experience-f42d4db76652?source=rss-578f7542c4f2------2</link>
            <guid isPermaLink="false">https://medium.com/p/f42d4db76652</guid>
            <category><![CDATA[edtech]]></category>
            <category><![CDATA[tech]]></category>
            <category><![CDATA[information-technology]]></category>
            <dc:creator><![CDATA[Tecmage]]></dc:creator>
            <pubDate>Sun, 04 Jul 2021 18:59:19 GMT</pubDate>
            <atom:updated>2021-07-04T18:59:19.629Z</atom:updated>
            <content:encoded><![CDATA[<p>Greetings, Previously I wrote about how to get started in IT by Google IT</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/256/1*AeTV5Dl7WL5Isj-Bg0GRfA.png" /><figcaption>Badge of Completion</figcaption></figure><p>Support Professional Certificate.</p><p>For learners who want to dive deep into IT world and learn today’s industry tools and techniques IT Automation with Python is a good starting point.</p><p>Google IT Automation with Python comes under <a href="https://grow.google/programs/it-support">Grow with Google</a> program and is available on <a href="https://www.coursera.org/professional-certificates/google-it-automation?utm_source=google&amp;utm_medium=institutions&amp;utm_campaign=gwgsite">coursera</a> starting at 15$/mo.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jQ9aUprHqjTKnvOZLZlsjA.jpeg" /><figcaption>Certificate of Completion</figcaption></figure><p>This professional certificate consists of 6 courses including capestone project. According to learner’s pace and flexibility course could be finished somewhere 1.5 months to 6 months.</p><p>Here are my Opinions :</p><ol><li>Decent course ware including qwiklabs to asses your knowledge and to stimulate real world scenarios.</li><li>This course ware includes OOP (Object Oriented Programming) with python, tools GCP(Google Cloud Platform), Puppet an automation tool, VCS(Versioning Control System) Git and Github, bash scripting which are explained in convenient way.</li><li>After Completion, learners receive badge and certificate of completion. Make sure to upload to your social network to standout from others.</li><li>Though, this certificate familiarizes from industry standard concepts and tools for beginners Google IT Support Professional Certificate is recommended. Providing them foundations.</li></ol><p>Thank You for Reading.</p><p>For more relevant information follow me on :</p><p>follow me on Linkedin: <a href="http://www.linkedin.com/in/ravpreet-singh-maini-0346b21b6">www.linkedin.com/in/ravpreet-singh-maini-0346b21b6</a></p><p>or</p><p>Join my Discord channel named (tech_novice):<a href="https://discord.gg/8jc5Q3YKxs">https://discord.gg/8jc5Q3YKxs</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f42d4db76652" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Google IT Support Certificate. It is worth IT?]]></title>
            <link>https://tecmage.medium.com/google-it-support-certificate-it-is-worth-it-18f5cfab8b?source=rss-578f7542c4f2------2</link>
            <guid isPermaLink="false">https://medium.com/p/18f5cfab8b</guid>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[education-technology]]></category>
            <category><![CDATA[information-technology]]></category>
            <dc:creator><![CDATA[Tecmage]]></dc:creator>
            <pubDate>Sun, 27 Jun 2021 19:04:19 GMT</pubDate>
            <atom:updated>2021-06-27T19:04:19.090Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*-Hj5LqELAfn8TtK_aAfknQ.png" /><figcaption>Badge received from Credly.com</figcaption></figure><p>Greetings, nowadays there has been an upsurge it IT(Information Technology) Jobs. For students who want to learn and make career out of IT or professionals shifting there career in this field, Google IT Support is one-stop-shop to learn IT fundamentals quickly and conveniently.</p><p>Google IT Support Professional Certificate comes under Grow with Google programme powered by Google <a href="https://grow.google/certificates/">https://grow.google/certificates</a></p><p>and is currently available on educational platform coursera <a href="https://www.coursera.org/">https://www.coursera.org</a> starting at just around $15/mo. According to student flexibility this course can be finished within a month or you can take your time and finish it within 5 months.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Vwc2bVJBqqUeHjPcoVatXw.jpeg" /><figcaption>Certificate of completion</figcaption></figure><p>Here are now my personal opinion on this certificate/specialization :</p><ol><li>you get decent course ware with quizzes and qwiklabs and instructors students get full worth of their money.</li><li>On completion, students receive a badge, certificate of completion, 12 college credits from ACE(American Council of Education).</li><li>If you are US-citizen or US-visa holder you can visit site <a href="https://grow.google/employers/">https://grow.google/employers</a> where you can fill your job application for entry level role.</li><li>Though it provides a plethora of benefits still it’s a professional certificate so a college degree is always recommended.</li><li>If you want to learn ABC of IT is a great starting point but if want to learn more there is another course with intermediate difficulty ‘IT Automation with Python’ Certificate.</li></ol><p>Thanks for reading.</p><p>follow me on Linkedin: <a href="http://www.linkedin.com/in/ravpreet-singh-maini-0346b21b6">www.linkedin.com/in/ravpreet-singh-maini-0346b21b6</a></p><p>or</p><p>Join my Discord channel named (tech_novice):<a href="https://discord.gg/8jc5Q3YKxs">https://discord.gg/8jc5Q3YKxs</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=18f5cfab8b" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>