<?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 Roger moore on Medium]]></title>
        <description><![CDATA[Stories by Roger moore on Medium]]></description>
        <link>https://medium.com/@rogermoore06?source=rss-48e151d2d978------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*dmbNkD5D-u45r44go_cf0g.png</url>
            <title>Stories by Roger moore on Medium</title>
            <link>https://medium.com/@rogermoore06?source=rss-48e151d2d978------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 13:14:42 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@rogermoore06/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[Working with Collision Layers in Unity]]></title>
            <link>https://medium.com/@rogermoore06/working-with-collision-layers-in-unity-862089435681?source=rss-48e151d2d978------2</link>
            <guid isPermaLink="false">https://medium.com/p/862089435681</guid>
            <category><![CDATA[gamedevhq]]></category>
            <dc:creator><![CDATA[Roger moore]]></dc:creator>
            <pubDate>Mon, 23 Oct 2023 06:13:23 GMT</pubDate>
            <atom:updated>2023-10-23T06:13:23.322Z</atom:updated>
            <content:encoded><![CDATA[<p>Objective: go over collision layers in unity</p><p>Introduction</p><p>In Unity, creating a game that feels responsive and polished often comes down to getting the physics right. One important aspect of this is managing how different objects interact with one another. This article delves into the concept of collision layers, a powerful tool in Unity that allows you to control which objects collide with each other. We’ll use a classic example to illustrate this concept: a player, a sword attack, an enemy, and an enemy attack. By assigning each of these objects to distinct collision layers, you can ensure that your player doesn’t harm itself, and the enemy behaves in a similar manner.</p><p>Understanding Collision Layers</p><p>Unity’s collision layers are a way to categorize different objects and control how they interact in the game world. You can think of collision layers as a set of rules that define which objects will collide with each other and which won’t. This functionality is managed through Unity’s built-in Physics settings.</p><p>Setting up Collision Layers</p><p>Let’s start by setting up our collision layers. In Unity, you can do this by going to “Edit” -&gt; “Project Settings” -&gt; “Physics.” In the “Layer Collision Matrix” section, you’ll find a matrix that allows you to define which layers interact with each other.</p><p>For our example, let’s create three layers: “Player,” “Enemy,” and “Sword.”</p><p>Layer Setup:</p><ol><li>Player: This layer is for the player character. You can assign the player character’s GameObject to this layer.</li><li>Enemy: Objects representing your game’s enemies, which include both the enemy characters and their attack objects.</li><li>Sword: The layer for all sword attack objects.</li><li>EnemyAttack: A dedicated layer for enemy attacks.</li></ol><p>Matrix Configuration:</p><p>In the “Layer Collision Matrix,” configure your layers as follows:</p><ul><li>Player: It should not interact with itself, so uncheck the box at the intersection of “Player” and “Player.”</li><li>Player and Enemy: For our player-enemy interactions, ensure the boxes at the intersections of “Player” and “Enemy” are checked. This setup allows the player to interact with enemies. If you don’t want the player to interact with enemies, you can leave these boxes unchecked.</li><li>Sword and Enemy: Since we don’t want the player’s sword to interact with the player itself, uncheck the box at the intersection of “Player” and “Sword.”</li><li>Enemy and Enemy: This will depend on your game mechanics. If your enemies can harm each other, check the box at the intersection of “Enemy” and “Enemy.” If not, leave it unchecked.</li><li>EnemyAttack and Player: Ensure that the box at the intersection of “EnemyAttack” and “Player” is checked if you want enemy attacks to affect the player.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/328/1*7zISdzLhIf8U9mZpdt-i0Q.png" /></figure><p>Conclusion</p><p>Utilizing collision layers in Unity can be incredibly beneficial for creating a cleaner and more controlled gaming experience. This method allows you to fine-tune the physics of your game and streamline interactions between different types of objects. By configuring these layers correctly and implementing them in your scripts, you can create gameplay that feels more polished and intuitive. Whether you’re working on a complex combat system like our example or any other type of game, understanding collision layers is an essential part of mastering Unity’s physics and creating a better player experience.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=862089435681" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[IDamagable Interface in Unity]]></title>
            <link>https://medium.com/@rogermoore06/idamagable-interface-in-unity-c4a959bab12c?source=rss-48e151d2d978------2</link>
            <guid isPermaLink="false">https://medium.com/p/c4a959bab12c</guid>
            <category><![CDATA[gamedevhq]]></category>
            <dc:creator><![CDATA[Roger moore]]></dc:creator>
            <pubDate>Thu, 12 Oct 2023 02:06:26 GMT</pubDate>
            <atom:updated>2023-10-12T02:06:26.745Z</atom:updated>
            <content:encoded><![CDATA[<p>Objective: go over interfaces with a damageable example</p><p><strong>Introduction</strong></p><p>Implementing damage systems is a fundamental aspect of many game projects. In Unity, one way to create consistent and modular damage interactions is by using interfaces. The IDamageable interface, as described in this article, sets up a contract for any objects that can take damage in your game. This method of structuring damage mechanics is not only versatile but also a good practice for maintaining clean, organized code.</p><p><strong>The IDamageable Interface</strong></p><p>To begin, you create the IDamageable interface, which acts as a blueprint for any object in your game that can take damage. This interface defines two critical members:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/244/1*ajmlLX1q5R7Ig6FH6r-MFA.png" /></figure><ul><li>health: This property, represented as an integer, holds the current health of the object. The getter and setter allow us to access and modify this value. By making it a property, we can keep track of health changes efficiently and apply restrictions, such as not allowing negative health values.</li><li>Damage(int amount): The method defines how damage is applied to the object. It takes an integer parameter amount representing the damage inflicted. This method will be implemented differently for each class that uses the interface, depending on the specific behaviors and actions you want for each damageable entity.</li></ul><p><strong>Implementing IDamageable</strong></p><p>With the IDamageable interface established, you can implement it in any class that needs to take damage. For instance, let’s consider an enemy type, the Skeleton:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/352/1*snQ3VKAA_jubOWmS3_DYjQ.png" /></figure><p>In the Skeleton class, you implement the IDamageable interface, which requires you to provide an implementation for both the health property and the Damage(int amount) method.</p><ul><li>The health property is set up as a public integer with a getter and setter, complying with the IDamageable definition.</li><li>In the Damage(int amount) method, you specify how the Skeleton reacts when damaged. Here, you log the hit, reduce health, and trigger either the death or hit animation based on the remaining health.</li></ul><p><strong>Utilizing the Base Class</strong></p><p>If all your enemies share a similar implementation for the IDamageable interface, it could be more efficient to implement it in the base class, Enemy, as suggested in your code. This helps reduce redundancy and ensures consistent behavior across all enemy types.</p><p><strong>Interacting with Damage</strong></p><p>To complete the system, you create an Attack script that handles the detection of damage. This script is attached to your damaging objects, such as weapons. When the damaging object collides with a damageable object, it inflicts damage. The code below demonstrates this interaction:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/603/1*-dHmoFMSFLY5MwvwA66iPw.png" /></figure><p>Here’s a breakdown:</p><ul><li>In the Attack script, you define an integer variable, _damage, to specify the amount of damage the attack will deal.</li><li>In the OnTriggerEnter2D method, you check if the collided object has a component that implements IDamageable. This check allows for flexible, dynamic damage interactions.</li><li>If the collision involves a damageable object, you call the Damage(int amount) method on it, inflicting the specified damage.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/1*ChPVHzMH4BSuHU1cO_RxsQ.gif" /></figure><p><strong>Conclusion</strong></p><p>The IDamageable interface provides a structured approach to handling damage in Unity. By implementing this interface in classes, you can ensure consistent and organized damage mechanics throughout your game. This method allows for easily customizable damage reactions for different entities in your game while also promoting code reusability. As you develop complex damage systems, this approach will help you maintain clean, well-structured code and improve the overall quality of your game.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c4a959bab12c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Hitbox Attack System Unity2D]]></title>
            <link>https://medium.com/@rogermoore06/hitbox-attack-system-unity2d-39ee977dcec0?source=rss-48e151d2d978------2</link>
            <guid isPermaLink="false">https://medium.com/p/39ee977dcec0</guid>
            <category><![CDATA[gamedevhq]]></category>
            <dc:creator><![CDATA[Roger moore]]></dc:creator>
            <pubDate>Wed, 11 Oct 2023 02:29:45 GMT</pubDate>
            <atom:updated>2023-10-11T02:29:45.630Z</atom:updated>
            <content:encoded><![CDATA[<p>Objective: go over setting up attacking in this 2d game</p><p><strong>Introduction</strong></p><p>Creating an engaging combat system is a cornerstone of many 2D games, whether it’s a classic beat ’em up or a more modern action-adventure. One of the key components of such a system is a hitbox attack system, allowing your characters to deliver punishing blows to their foes. In Unity2D, achieving this can be both intuitive and effective. In this article, we’ll explore the process of setting up a hitbox attack system in Unity2D, taking your game’s combat to the next level.</p><p><strong>The Basics of Hitbox Attacks</strong></p><p>A hitbox, in the context of a 2D game, is an invisible area or shape associated with an attacking action, such as swinging a sword or throwing a punch. When this hitbox collides with an enemy’s hurtbox (typically a collider associated with the enemy), it registers a hit. To implement this system, you need to create a hitbox and manage its interactions with the game world.</p><p><strong>Creating the Hitbox</strong></p><p>In Unity2D, you can create a hitbox by adding a collider GameObject to your character or weapon. Here’s how:</p><ol><li>Create a Collider: Add a 2D collider component (e.g., Box Collider 2D or Circle Collider 2D) to your character or weapon GameObject.</li><li>The Attack Script: Attach a C# script (like the Attack script) to the GameObject. This script will handle the logic when the hitbox makes contact with an enemy&#39;s hurtbox.</li></ol><p>Let’s take a closer look at the Attack script:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/424/1*zqW1N-BAImNJvTV7oaYL3w.png" /></figure><p>In the script:</p><ul><li>We handle collisions with other 2D colliders by implementing the OnTriggerEnter2D method. When a collision occurs, this method is called automatically.</li><li>We use the collision parameter to access information about the object we&#39;ve collided with. In this example, we log the name of the collided object. In practice, you&#39;d likely trigger more significant actions like reducing the enemy&#39;s health.</li></ul><p><strong>Controlling the Hitbox</strong></p><p>An essential part of the hitbox attack system is controlling when the hitbox is active. Typically, a hitbox should only be active during the specific animation frames where an attack occurs. Unity’s animation system, Animator, can help with this. Here’s how to do it:</p><ol><li>Create an Animation: In your character or weapon GameObject, create an animation that corresponds to the attack action. This animation should include keyframes at the frames where the attack hitbox should be active.</li><li>Attach Hitbox to Animation: Make sure your hitbox GameObject is a child of the character or weapon GameObject. In the animation timeline, you can enable or disable the hitbox GameObject by toggling its active state. This can be done by selecting the hitbox in the Hierarchy and enabling/disabling it using the checkbox.</li><li>Animator Controller: Create an Animator Controller and assign it to your character or weapon. In the Animator Controller, create a transition from your character’s current state to the attack animation state, ensuring that the hitbox is active during this transition.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/502/1*0PaSoQwD3h_vOZLdWsfckA.gif" /></figure><p><strong>Testing and Refining</strong></p><p>After implementing the hitbox system, it’s essential to thoroughly test and refine it. Check for issues like:</p><ul><li>Proper Hit Detection: Ensure that the hitbox accurately registers hits when in contact with enemy hurtboxes.</li><li>Timing: Check that the hitbox is only active during the intended frames of the attack animation.</li><li>Feedback: Implement feedback mechanisms, such as visual effects or audio cues, to make hits feel impactful.</li></ul><p><strong>Conclusion</strong></p><p>Implementing a hitbox attack system in Unity2D can elevate your game’s combat experience. By creating and controlling hitboxes within the game’s animation system, you can design satisfying combat interactions. Remember, successful implementation often involves testing, iterating, and ensuring that your hitboxes provide precise and responsive feedback to the player. With this system in place, your game’s combat can become an engaging and immersive experience.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=39ee977dcec0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Designing Enemies using Abstract Classes]]></title>
            <link>https://medium.com/@rogermoore06/designing-enemies-using-abstract-classes-82a3c93ed792?source=rss-48e151d2d978------2</link>
            <guid isPermaLink="false">https://medium.com/p/82a3c93ed792</guid>
            <category><![CDATA[gamedevhq]]></category>
            <dc:creator><![CDATA[Roger moore]]></dc:creator>
            <pubDate>Tue, 10 Oct 2023 00:27:25 GMT</pubDate>
            <atom:updated>2023-10-10T00:27:25.073Z</atom:updated>
            <content:encoded><![CDATA[<p>Objective: give a SIMPLE example of enemies with abstract classes</p><p>Introduction</p><p>In the world of game development, creating intricate and dynamic characters is a fundamental aspect. A critical tool for achieving this is inheritance, bolstered by the concept of abstract classes. In Unity, these concepts are paramount for building diverse and interactive game entities. In this article, we will explore the use of abstract classes and inheritance by examining a simple but illustrative example: the creation of two distinct enemies in a game, a Spider, and a Moss Giant.</p><p>Understanding the Problem</p><p>Before we delve into the code, let’s establish the problem we aim to solve: creating different enemy types in a game, each with its unique behavior, while also sharing common characteristics like health, speed, and attack mechanisms.</p><p>Abstract Classes and Commonality</p><p>To achieve this, we employ an abstract class called Enemy. Abstract classes are like blueprints for other classes and cannot be instantiated on their own. They serve as a foundation for derived classes and allow us to define common properties and methods shared by all enemy types.</p><p>Let’s take a closer look at the Enemy class:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/337/1*EZ8aP5WuboP-JXoFMzq1Nw.png" /></figure><p>Here’s what’s happening:</p><ul><li>We define an abstract class Enemy that inherits from MonoBehaviour, Unity&#39;s base class for all script components.</li><li>Within Enemy, we declare fields for common attributes: health, speed, and gems. These attributes will be shared among all enemy types.</li><li>We provide a virtual method Attack(). This means that derived classes can choose to override this method if they need different attack behavior. However, they are not obligated to do so.</li><li>We also declare an abstract method Update(). This method must be implemented by any derived class, ensuring that all enemies have an Update() function, but each enemy can define its specific behavior.</li></ul><p>Concrete Enemy Types</p><p>With the Enemy abstract class defined, we can now create concrete enemy types. Let&#39;s explore two examples: the Spider and the Moss Giant.</p><p>Spider Class</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/299/1*D8QSb_n-vRGXH6guYOO9-w.png" /></figure><p>Here’s what’s happening in the Spider class:</p><ul><li>We create a class called Spider that inherits from our abstract Enemy class.</li><li>In the Start() method, which is called when the object is created, we call the Attack() method specific to the Spider.</li><li>We override the Update() method to provide custom updating behavior for the Spider. In this case, we simply log a message.</li><li>We override the Attack() method, which was marked as virtual in the abstract class. This allows us to provide a unique attack implementation for the Spider.</li></ul><p>Moss Giant Class</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/609/1*OBeto8AAEM28cX-WsyLFLw.png" /></figure><p>In the MossGiant class:</p><ul><li>We create a class called MossGiant that also inherits from our Enemy abstract class.</li><li>Like the Spider, we override the Update() method to provide custom updating behavior.</li><li>In the Attack() method, we call base.Attack(). This invokes the Attack() method defined in the base class (i.e., Enemy), allowing us to extend the base functionality while adding unique behavior for the Moss Giant.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/887/1*aqLXcbATchN7M9lTzT6z7w.gif" /></figure><p>Conclusion</p><p>By using abstract classes and inheritance in Unity, we can efficiently create diverse enemy types with shared attributes and behaviors. Abstract classes serve as a foundation for common properties and methods, while derived classes (such as Spider and MossGiant) can extend and customize the functionality as needed. This powerful technique is fundamental in building complex game entities and systems within the Unity game engine.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=82a3c93ed792" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Camera Follow System in Unity]]></title>
            <link>https://medium.com/@rogermoore06/camera-follow-system-in-unity-6251e8335ed2?source=rss-48e151d2d978------2</link>
            <guid isPermaLink="false">https://medium.com/p/6251e8335ed2</guid>
            <category><![CDATA[gamedevhq]]></category>
            <dc:creator><![CDATA[Roger moore]]></dc:creator>
            <pubDate>Mon, 09 Oct 2023 04:22:52 GMT</pubDate>
            <atom:updated>2023-10-09T04:22:52.012Z</atom:updated>
            <content:encoded><![CDATA[<p>Objective: go over following the player with cinemachine</p><p>Introduction</p><p>In game development, creating an immersive and dynamic gaming experience is essential. A significant aspect of achieving this is ensuring that the player’s viewpoint, represented by the in-game camera, is always focused on the action. In Unity, one of the most powerful tools to accomplish this is Cinemachine. This article will delve into the world of Camera Follow Systems, with a focus on using Cinemachine to implement smooth and engaging camera tracking for your Unity games.</p><p>Why a Camera Follow System Matters</p><p>A Camera Follow System does precisely what its name suggests: it keeps the in-game camera locked onto a specific target, typically the player character. While this might sound straightforward, its importance cannot be understated:</p><ol><li>Enhanced Gameplay: A well-implemented Camera Follow System provides players with a clear view of the game world, making it easier to navigate and interact with the environment.</li><li>Storytelling: In narrative-driven games, a camera that follows the action can effectively convey the story, enhancing immersion and engagement.</li><li>Visual Appeal: Smooth camera transitions and follow systems can greatly improve the visual appeal of your game.</li></ol><p>Setting Up Cinemachine</p><p>Before we dive into implementing a Camera Follow System using Cinemachine, you need to set up Cinemachine in your Unity project if you haven’t already. Follow these steps:</p><ol><li>Installation: Start by installing Cinemachine. Open the Unity Package Manager (Window -&gt; Package Manager), search for Cinemachine, and click Install.</li><li>Create a Virtual Camera: To create a virtual camera, go to GameObject -&gt; Cinemachine -&gt; FreeLook Camera. You can choose other camera types based on your game’s requirements, but FreeLook provides a lot of flexibility.</li><li>Configuring the Virtual Camera: Once created, select the virtual camera in the Hierarchy. You’ll see the Inspector populated with various settings. For a basic setup, you can adjust the Follow and Look At fields. Drag and drop your player character into these fields.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/518/1*7jqrxgkF4N4M-ohrz3vfvw.gif" /></figure><p>Fine-tuning the Camera Follow System</p><p>While the steps above will create a basic Camera Follow System, you can fine-tune your setup for a more polished result:</p><ol><li>Dead Zones and Soft Zones: Cinemachine allows you to set dead zones where the camera won’t move, and soft zones where it will start moving slowly. This creates a smoother follow experience.</li><li>Orbit and Rig Settings: In the FreeLook Camera component, you can customize various parameters like orbital radius, height, and speed. These settings are essential for controlling how the camera follows the player.</li><li>Transitions: Cinemachine supports camera blending. You can create different virtual cameras for various game scenarios (e.g., exploration, combat) and smoothly transition between them using Cinemachine’s excellent blending capabilities.</li><li>Impulse Listeners: Cinemachine also supports Impulse Listeners, allowing for camera shakes or other effects when significant in-game events occur.</li></ol><p>Advanced Techniques</p><p>Once you’ve mastered the basics, you can explore more advanced techniques:</p><ol><li>Target Groups: Cinemachine lets you follow not just one but multiple targets simultaneously. This is useful for games with multiple characters or complex scenes.</li><li>Dolly and Track: Create cinematic sequences by using the Dolly Track feature. This is perfect for cutscenes or dynamic storytelling.</li><li>Noise: Adding noise to your camera can simulate real-world camera movements, making your game feel more immersive.</li></ol><p>Testing and Iteration</p><p>Remember, creating the perfect Camera Follow System often requires testing and iteration. Playtest your game thoroughly to ensure that the camera movement enhances the gaming experience without causing motion sickness or discomfort.</p><p>Conclusion</p><p>A Camera Follow System, implemented skillfully with Cinemachine in Unity, can significantly impact your game’s overall quality. It’s an essential tool for providing players with a clear, engaging, and visually pleasing experience. Start with the basics, experiment with advanced features, and remember that the perfect camera setup can make your game stand out in the crowded world of game development.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6251e8335ed2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Influence of Social Media and Job Application Setbacks on Mental Health and Career Prospects]]></title>
            <link>https://medium.com/@rogermoore06/the-influence-of-social-media-and-job-application-setbacks-on-mental-health-and-career-prospects-df6f7352564f?source=rss-48e151d2d978------2</link>
            <guid isPermaLink="false">https://medium.com/p/df6f7352564f</guid>
            <category><![CDATA[gamedevhq]]></category>
            <dc:creator><![CDATA[Roger moore]]></dc:creator>
            <pubDate>Sun, 08 Oct 2023 04:48:31 GMT</pubDate>
            <atom:updated>2023-10-08T04:48:31.301Z</atom:updated>
            <content:encoded><![CDATA[<p>Objective: This exploration delves into the impact of social media as well as rejections encountered during the job application process on individuals’ mental well-being and the outlook for their future careers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cUwx9O4Rqzjjf2_Q8b68bQ.jpeg" /></figure><p>In today’s interconnected world, social media platforms like LinkedIn have become essential tools for job seekers and professionals to network, share accomplishments, and search for new career opportunities. However, the pervasive use of social media in the job search process has introduced a set of challenges that can significantly impact an individual’s mental health and future outlook.</p><h3>The Positive Aspects of Social Media</h3><p>Before delving into the potential negative effects, it’s important to acknowledge the positive aspects of platforms like LinkedIn:</p><h3>1. Networking Opportunities</h3><p>LinkedIn provides a platform for professionals to connect, share insights, and build meaningful relationships with others in their field. Networking can lead to valuable career opportunities and personal growth.</p><h3>2. Skill Enhancement</h3><p>Through LinkedIn, individuals can access a wealth of industry-related content, such as articles, courses, and webinars, that can help them acquire new skills and stay updated on industry trends.</p><h3>3. Personal Branding</h3><p>LinkedIn allows individuals to showcase their achievements, experiences, and expertise. This personal branding can help job seekers stand out to potential employers.</p><h3>The Dark Side of Social Media</h3><p>While social media can offer numerous benefits, it’s also associated with several potential downsides:</p><h3>1. Constant Comparison</h3><p>One of the most significant negative aspects of social media is the tendency for users to compare their achievements and progress to others. On platforms like LinkedIn, where individuals often share their career successes, this can lead to feelings of inadequacy and imposter syndrome.</p><h3>2. Rejections and Silence</h3><p>Job application rejections, especially when they accumulate, can have a profound impact on an individual’s self-esteem and mental health. The silence that often accompanies rejections can be particularly discouraging. LinkedIn may exacerbate these feelings as users witness connections celebrating their own successes.</p><h3>3. Cyberbullying and Negative Comments</h3><p>Online platforms are not immune to cyberbullying and negative comments. Disparaging remarks or unsolicited advice from connections or strangers can be hurtful and damaging to one’s mental well-being.</p><h3>The Mental Health Toll</h3><p>The constant exposure to social media, rejections, and negative comments can contribute to several mental health challenges:</p><h3>1. Anxiety and Depression</h3><p>Repeated job application rejections and the fear of judgment on social media can lead to increased anxiety and depression. The pressure to maintain a curated online presence can intensify these feelings.</p><h3>2. Decreased Self-Esteem</h3><p>Job rejections and negative comments can erode an individual’s self-esteem and confidence. It becomes easy to question one’s worth and abilities.</p><h3>3. Burnout</h3><p>The never-ending job search, coupled with maintaining an active social media presence, can result in burnout. Constantly seeking validation and new opportunities can lead to exhaustion.</p><h3>Coping Strategies and Solutions</h3><p>To mitigate the negative impact of social media and job application rejections, consider these strategies:</p><h3>1. Limit Social Media Exposure</h3><p>Set boundaries for your social media use. Allocate specific times each day to check LinkedIn and avoid comparing yourself to others.</p><h3>2. Focus on Real Connections</h3><p>Quality matters more than quantity when it comes to connections. Invest time in nurturing genuine professional relationships that provide support and encouragement.</p><h3>3. Practice Self-Compassion</h3><p>Be kind to yourself. Rejections are a natural part of the job search process and don’t define your worth or abilities.</p><h3>4. Seek Professional Help</h3><p>If feelings of anxiety or depression persist, consider seeking support from a mental health professional. They can provide strategies to manage stress and improve mental well-being.</p><h3>5. Diversify Your Job Search</h3><p>Explore different avenues for job hunting, such as networking events, job fairs, and industry-specific websites. A varied approach can reduce dependence on a single platform.</p><h3>6. Unplug When Necessary</h3><p>Take regular breaks from social media and the job search process to recharge and focus on other aspects of life.</p><h3>Conclusion</h3><p>Social media, including platforms like LinkedIn, can be both a boon and a burden in the modern job search. While it offers unprecedented networking opportunities and resources, it also poses significant challenges to mental health and self-esteem, particularly when rejections and negative comments accumulate. By adopting healthy coping strategies and maintaining a balanced perspective, individuals can harness the benefits of social media while safeguarding their mental well-being and future outlook. Remember, your worth extends far beyond the likes and comments on a screen, and setbacks are merely stepping stones on your career journey.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=df6f7352564f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Flyweight Pattern]]></title>
            <link>https://medium.com/@rogermoore06/flyweight-pattern-a98dd924e653?source=rss-48e151d2d978------2</link>
            <guid isPermaLink="false">https://medium.com/p/a98dd924e653</guid>
            <category><![CDATA[gamedevhq]]></category>
            <dc:creator><![CDATA[Roger moore]]></dc:creator>
            <pubDate>Sat, 07 Oct 2023 03:01:03 GMT</pubDate>
            <atom:updated>2023-10-07T03:01:03.775Z</atom:updated>
            <content:encoded><![CDATA[<p>Objective: Dive into the versatile Flyweight design pattern</p><p>Picture an expansive game world with a multitude of objects, each unique in its own right. Implementing this lush environment in real-time is a daunting task for any graphics programmer. As you peer into the code, all you see are the millions of polygons and textures you must somehow transmit to the GPU every sixtieth of a second.</p><p>Now, consider this challenge for creating a variety of game entities, such as enemies. Each enemy possesses its distinct characteristics — meshes, textures, positions, and more. If we were to represent each enemy as a unique object, it would be a massive resource hog. This is where the Flyweight design pattern, often underestimated in its simplicity, comes to our rescue.</p><h3>The Essence of the Flyweight Pattern</h3><p>The Flyweight Pattern is a solution to the problem of high memory consumption when dealing with a vast number of similar objects, each with shared attributes. This pattern allows you to represent these shared attributes efficiently, thereby reducing memory usage.</p><p>In essence, the Flyweight pattern separates an object’s state into two categories:</p><ol><li>Intrinsic State: This is the shared, unchanging part of an object’s state. It is often referred to as the “context-free” stuff. In a game, this could include textures, meshes, or models that are the same for every instance of a particular object type.</li><li>Extrinsic State: This part of the state is unique to each instance of the object. It includes data like the object’s position, scale, color, or any other instance-specific attributes.</li></ol><h3>Applying the Flyweight Pattern in Unity</h3><p>Now, let’s explore how you can apply the Flyweight pattern in Unity using a simple example — enemies in a game. While this example uses enemies, the pattern is versatile and can be applied to various game elements.</p><h3>1. Define the Intrinsic State</h3><p>Start by identifying the common attributes shared among multiple instances of a game entity. For enemies, this might include the enemy’s mesh, texture, animations, and other characteristics that don’t change between instances.</p><p>This EnemyModel class encapsulates the intrinsic state of an enemy. You&#39;ll only need one instance of this class for all enemy objects of the same type.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/539/1*va5rJw3Wan4b97vAYMx6zw.png" /></figure><h3>2. Create the Flyweight Objects</h3><p>Instantiate the shared EnemyModel objects for each enemy type in your game. These should be created only once and reused across all enemy instances of the same type.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/446/1*D5Ei_FyuO5DVa3y55ia4zA.png" /></figure><h3>3. Use the Flyweight Objects</h3><p>When you want to spawn an enemy, use the shared EnemyModel for that enemy type and provide the unique attributes (extrinsic state) like the position.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/697/1*PI0lUox-VgNyfvQMDyakDA.png" /></figure><h3>Conclusion</h3><p>The Flyweight pattern is a game development secret weapon when dealing with numerous similar game elements. By segregating shared attributes (intrinsic state) from unique ones (extrinsic state), you can significantly optimize memory usage and create complex game worlds efficiently.</p><p>While we’ve used enemy entities as an example, the Flyweight pattern is highly adaptable. You can apply it to trees in a forest, terrain types in a strategy game, or any scenario where you need to manage numerous similar objects efficiently.</p><p>By understanding and implementing the Flyweight pattern, you empower yourself to create expansive and intricate game environments without overwhelming your system’s resources. Remember, the key is to find the shared attributes, create shared instances, and use them wisely to strike the perfect balance between performance and complexity in your game development projects.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a98dd924e653" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Perspective Parallax in Unity]]></title>
            <link>https://medium.com/@rogermoore06/perspective-parallax-in-unity-a1bea3acf351?source=rss-48e151d2d978------2</link>
            <guid isPermaLink="false">https://medium.com/p/a1bea3acf351</guid>
            <category><![CDATA[gamedevhq]]></category>
            <dc:creator><![CDATA[Roger moore]]></dc:creator>
            <pubDate>Fri, 06 Oct 2023 01:22:20 GMT</pubDate>
            <atom:updated>2023-10-06T01:22:20.369Z</atom:updated>
            <content:encoded><![CDATA[<p>Objective: go over Perspective Parallax to add depth and realism to your Unity game environments.</p><p>Creating visually stunning and immersive game environments is a hallmark of modern game design. One technique that significantly contributes to the depth and realism of your scenes is Perspective Parallax. In this comprehensive guide, we’ll explore what Perspective Parallax is and how you can use it in Unity to breathe life into your 2D games.</p><h3>Understanding Perspective Parallax</h3><p>Perspective Parallax is a visual effect that simulates the way objects appear to move relative to one another when observed from different positions. This effect imitates the phenomenon of objects in the foreground appearing to move faster than objects in the background as the viewer’s perspective changes.</p><p>In 2D game development, Perspective Parallax can be employed to create a sense of depth by making background layers move at different rates. This mimics the behavior of objects in the real world and enhances the overall immersion of your game.</p><h3>Implementing Perspective Parallax in Unity</h3><p>Now, let’s delve into the steps to implement Perspective Parallax in Unity. We’ll assume you have a basic 2D game project set up.</p><h3>1. Prepare Your Scene</h3><p>Begin by creating or importing the elements you want in your scene, such as background images or objects. It’s crucial to organize these elements into distinct layers based on their position in the scene. Layers closer to the foreground should be separated from those further in the background.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/324/1*8AeCsvI5MXw71jTSgd72Tw.png" /></figure><h3>2. Adjusting Z-values</h3><p>To achieve Perspective Parallax, we’ll modify the Z-values of the various layers in your scene. Z-values determine the depth of an object or layer in a 3D space, even in a 2D game.</p><ul><li>Select the elements or objects you want to adjust in the Hierarchy panel.</li><li>In the Inspector, locate the Transform component, where you’ll find the Position field.</li><li>While maintaining the X and Y values, modify the Z-value. Layers closer to the camera should have lower Z-values, while those further away should have higher Z-values.</li><li>For example, if you have a foreground layer (e.g., a road) that you want to appear closer to the player, set its Z-value to a small negative number like -1.</li><li>Background layers (e.g., a distant mountain range) should have larger negative Z-values, such as -5 or -10.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/661/1*6s7du4igJCmHRvuRk5OmSA.gif" /></figure><h3>3. Setting Up the Camera</h3><p>To fully achieve Perspective Parallax, you need to configure the camera:</p><ul><li>Select your main camera in the Hierarchy panel.</li><li>In the Inspector, locate the Projection field under the Camera component.</li><li>Change the projection from Orthographic to Perspective. This alteration allows the camera to render depth, making objects with different Z-values appear as if they are receding into the distance.</li></ul><p>ex. Orthographic view</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/626/1*hs5p6jcRe7ziL8CjK24_pQ.gif" /></figure><p>ex. Perspective:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/626/1*Iet9-b-Cxkhcc0spIMHFiA.gif" /></figure><h3>4. Fine-tuning Parallax Speed</h3><p>By default, objects at different Z-values will move together. To create the desired Perspective Parallax effect, you must control the movement speed of each layer.</p><ul><li>Select the layers in your scene individually.</li><li>Adjust the Position property’s X and Y values over time using keyframes or animation tools to control the parallax effect.</li><li>Layers closer to the camera should have faster movement speeds, while layers further away should move more slowly. Experiment with different speeds to achieve the desired depth perception.</li></ul><h3>5. Play and Refine</h3><p>Play your game and observe how the Perspective Parallax effect enhances the visual depth of your scene. Iterate on the Z-values and movement speeds as needed to achieve the perfect balance between realism and visual appeal.</p><h3>Conclusion</h3><p>Incorporating Perspective Parallax into your Unity 2D games can significantly elevate the visual quality and immersion of your scenes. This technique imitates real-world depth perception by making background layers move at different speeds relative to the foreground, creating a captivating and lifelike environment.</p><p>As you experiment with Perspective Parallax, you’ll gain a deeper understanding of how to fine-tune the Z-values and movement speeds to achieve the desired effect for your specific game. This powerful tool adds an extra layer of depth and complexity to your game design arsenal, enabling you to create breathtaking and dynamic game worlds that captivate players and immerse them in your gaming universe.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a1bea3acf351" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Painting collectables with a brush]]></title>
            <link>https://medium.com/@rogermoore06/painting-collectables-with-a-brush-cda0b33acafe?source=rss-48e151d2d978------2</link>
            <guid isPermaLink="false">https://medium.com/p/cda0b33acafe</guid>
            <category><![CDATA[gamedevhq]]></category>
            <dc:creator><![CDATA[Roger moore]]></dc:creator>
            <pubDate>Wed, 04 Oct 2023 03:43:48 GMT</pubDate>
            <atom:updated>2023-10-04T03:43:48.999Z</atom:updated>
            <content:encoded><![CDATA[<p>Objective: go over the gameObject brush</p><p>In game development, creating collectable items is a fundamental part of designing an engaging player experience. Unity offers various tools to streamline this process, including the GameObject Brush. This powerful tool allows you to easily place and paint collectable prefabs in your game world. In this comprehensive guide, we’ll explore how to use the GameObject Brush to add collectable diamonds to your scene.</p><h3>What is the GameObject Brush?</h3><p>The GameObject Brush is a versatile feature in Unity’s Tilemap system that enables you to place and paint prefabs directly onto your scene. It’s especially useful for adding collectable items, power-ups, or any other interactive objects that enhance your game’s gameplay and aesthetics.</p><h3>Getting Started</h3><p>Let’s dive into the steps to create and paint collectable prefabs using the GameObject Brush:</p><h3>1. Preparing Your Collectable Prefab</h3><p>Before you can start using the GameObject Brush, you need a collectable prefab. For this guide, we’ll assume you have already created a diamond collectable prefab. If not, follow these steps to create one:</p><ul><li>Create a new 2D sprite or import an image for your collectable.</li><li>Create an empty GameObject by right-clicking in the Hierarchy panel and selecting Create Empty.</li><li>Rename the empty GameObject to something like “DiamondCollectable.”</li><li>Attach a Sprite Renderer component to your empty GameObject. Assign the 2D sprite you created as the sprite for the renderer.</li><li>If your collectable needs to have physics properties, such as rigidbody or collider components, add them accordingly.</li><li>Once your collectable prefab is set up, make sure it’s saved as an asset in your project.</li></ul><h3>2. Accessing the GameObject Brush</h3><p>Now that you have your collectable prefab ready, it’s time to access the GameObject Brush:</p><ul><li>Go to the Window menu and select 2D -&gt; Tile Palette to open the Tile Palette window.</li><li>In the Tile Palette window, you’ll find a button with a paintbrush icon. This is the GameObject Brush. Click it to activate the tool.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/244/1*-svIObsidqBC0UnnZcZvhg.png" /></figure><h3>3. Using the GameObject Brush</h3><p>With the GameObject Brush activated, follow these steps to place and paint your collectable prefabs:</p><ul><li>Click the GameObject Brush button to select it.</li><li>In the Inspector, you’ll notice a field labeled Game Object. This is where you’ll slot your collectable prefab.</li><li>Drag your diamond collectable prefab from the Assets folder into the Game Object field.</li><li>Now, you can start painting your collectable prefabs onto your scene just like you would with tiles. Click and drag in your Scene view to add multiple instances of the collectable.</li><li>Customize your brush settings using the options provided in the Tile Palette window. You can adjust the brush size, spacing, and more to achieve the desired placement and density of collectables.</li><li>To remove collectables, simply right-click and drag the brush over them.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/983/1*WiO1xP1DSB-tdkBI5GSCkw.gif" /></figure><h3>Conclusion</h3><p>The GameObject Brush in Unity is a powerful tool for adding collectable prefabs to your game scenes. With a well-prepared collectable prefab and an understanding of the GameObject Brush’s capabilities, you can effortlessly populate your game world with engaging and interactive items.</p><p>Collectables play a crucial role in enhancing gameplay and player satisfaction, so mastering the GameObject Brush is a valuable skill for any Unity game developer. Start creating captivating collectables for your games today and watch as your players enjoy the immersive experience you’ve crafted.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cda0b33acafe" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Animated Tile Sets in Unity]]></title>
            <link>https://medium.com/@rogermoore06/animated-tile-sets-in-unity-7de7fca28125?source=rss-48e151d2d978------2</link>
            <guid isPermaLink="false">https://medium.com/p/7de7fca28125</guid>
            <category><![CDATA[gamedevhq]]></category>
            <dc:creator><![CDATA[Roger moore]]></dc:creator>
            <pubDate>Wed, 04 Oct 2023 03:08:43 GMT</pubDate>
            <atom:updated>2023-10-04T03:08:43.263Z</atom:updated>
            <content:encoded><![CDATA[<p>Objective: go over animated tilesets</p><p>Animated tilesets are a fantastic way to add life and vibrancy to your 2D game environments in Unity. They allow you to breathe movement and animation into your scenes by combining the power of Unity’s Tilemap system with animated sprites. In this in-depth guide, we’ll delve into the world of animated tilesets, covering everything from creating assets to adding them to your Tilemap.</p><h3>What are Animated Tile Sets?</h3><p>Animated tile sets are a special type of tileset that contain animated sprites. Instead of using static tiles for your level design, these tilesets let you integrate animated elements seamlessly into your 2D game. These animations can range from flowing water and flickering torches to animated backgrounds, bringing your game world to life.</p><h3>Getting Started</h3><p>Let’s break down the steps to create and use animated tilesets in Unity:</p><h3>1. Import the 2D Tilemap Extras Package (if not already imported)</h3><p>Before we can dive into creating animated tilesets, we need to ensure that we have the necessary tools. Unity provides the “2D Tilemap Extras” package, which is not included by default. If you haven’t imported it already, follow these steps:</p><ul><li>Open Unity.</li><li>Go to Window -&gt; Package Manager.</li><li>In the Package Manager, search for “2D Tilemap Extras” and click the “Install” button.</li></ul><p>This package extends Unity’s Tilemap system with additional features, including support for animated tiles.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*T8TJ4l-bp95_cHJpeCNguw.png" /></figure><h3>2. Creating an Animated Tile Asset</h3><p>Once you have the “2D Tilemap Extras” package installed, you can create an animated tile asset:</p><ul><li>In your Unity project, right-click in the Assets folder (or any subfolder where you want to keep your tiles).</li><li>Navigate to Create -&gt; 2D -&gt; Tiles -&gt; Animated Tile. This action will create a new Animated Tile asset.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/709/1*cV_QRmoucwg9YdGdG3XC2w.png" /></figure><h3>3. Configuring the Animated Tile Asset</h3><p>With the animated tile asset created, you need to configure it:</p><ul><li>Double-click the newly created Animated Tile asset to open it in the Inspector.</li><li>In the asset’s settings, you’ll notice a section for frames. This is where you can drag and drop your animated sprites. Ensure that the sprites are set up with their animation frames correctly sliced.</li><li>Below the frames section, you’ll find an option to adjust the animation speed. This setting determines how fast the animation plays. Experiment with different speeds until you achieve the desired effect.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/657/1*1nYG7GHZVwUQ-YimT8d7uw.gif" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/309/1*88_b0S25IAHvP1K1k4L7Ow.png" /></figure><h3>4. Using Animated Tiles in Your Tile Palette</h3><p>Now that you have your animated tile asset ready, it’s time to use it in your Tile Palette:</p><ul><li>Open the Tile Palette by going to Window -&gt; 2D -&gt; Tile Palette.</li><li>In the Tile Palette window, create or select an existing palette.</li><li>Drag the animated tile asset you created earlier into the palette. You should now see your animated tile listed in the palette, ready to be used.</li></ul><p>Now drag the animated tiles into a palette, and now you can paint the animated tile just like any other tile.</p><h3>5. Painting with Animated Tiles</h3><p>With the animated tile in your palette, you can start painting with it just like any other tile:</p><ul><li>Select the animated tile from your palette.</li><li>Use the brush tool or other painting tools to add the animated tile to your Tilemap. As you paint, you’ll see the animation come to life in your scene.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/505/1*82KioKZY3QjFEPDtfs5NQA.gif" /></figure><h3>Conclusion</h3><p>Animated tilesets add a new dimension to your 2D Unity games, making your environments more dynamic and captivating. By combining Unity’s Tilemap system with animated sprites, you can easily create flowing water, flickering torches, or any other animated element your game requires.</p><p>Mastering animated tilesets might take some practice, but the results are well worth the effort. So go ahead, breathe life into your 2D game worlds with animated tilesets and watch your game environments come alive with movement and animation!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7de7fca28125" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>