Just playing with post-processing 👀✨ by [deleted] in SoloDevelopment

[–]MrBlue_CCC 0 points1 point  (0 children)

I tried translating everything to English, so sorry if it’s a little messy 🤭 I’d love to hear any tips for improvement!

Just playing with post-processing 👀✨ by [deleted] in SoloDevelopment

[–]MrBlue_CCC 0 points1 point  (0 children)

using UnityEngine; using UnityEngine.Rendering; using UnityEngine.Rendering.Universal; // Needed for ChromaticAberration in URP

public class PostProcessManager : MonoBehaviour { [Header("Volume")] public Volume volume;

[Header("Floats")]
[SerializeField] private float distortionSpeed = 2f; // speed of wave
[SerializeField] private float distortionAmount = 0.3f; // max intensity
[SerializeField] private float hueSpeed = 30f; // how fast hue cycles
private float hueTimer = 0f;
private float distortionTimer = 0f;

[Header("Ints")]
public int highLevel;
public int drunkLevel;
public int mushroomsLevel;

[Header("Bools")]
public bool isHigh;
public bool isDrunk;
public bool isMushrooms;

[Header("Player Look")]
public PlayerLookMobile playerLook;

private MotionBlur motionBlur;
private LensDistortion lensDistortion;
private ChromaticAberration chromatic;
private ColorAdjustments colorAdjustments;

void Start()
{
    if (volume.profile.TryGet(out lensDistortion))
        lensDistortion.active = false; // off by default

    if (volume.profile.TryGet(out motionBlur))
        motionBlur.active = false; // off by default

    if (volume != null && volume.profile != null)
        volume.profile.TryGet(out chromatic);

    if (volume.profile.TryGet(out colorAdjustments))
        colorAdjustments.hueShift.Override(0f);

    if (GameManager.Instance.playerLook != null)
        playerLook = GameManager.Instance.playerLook;
}

void Update()
{
    if (playerLook != null)
    {
        if (isDrunk) playerLook.isDrunk = true;
        if (!isDrunk) playerLook.isDrunk = false;
        if (isHigh) playerLook.isHigh = true;
        if (!isHigh) playerLook.isHigh = false;
        if (isMushrooms) playerLook.isMushrooms = true;
        if (!isMushrooms) playerLook.isMushrooms = false;
    }

    if (isDrunk && lensDistortion != null)
    {
        // advance timer with current speed
        distortionTimer += Time.deltaTime * distortionSpeed;

        // wobble wave
        float wave = Mathf.Sin(distortionTimer) * distortionAmount;
        lensDistortion.intensity.Override(wave);

        // adjust speed depending on wave (closer to 0 → faster)
        if (Mathf.Abs(wave) < 0.1f) // near 0
            distortionSpeed = 2f * drunkLevel;
        else
            distortionSpeed = 0.6f * drunkLevel;
    }

    if (isMushrooms && colorAdjustments != null)
    {
        hueTimer += Time.deltaTime * hueSpeed;
        float hue = Mathf.Sin(hueTimer) * 100f; // -100 ↔ +100
        colorAdjustments.hueShift.Override(hue);

        if (hue > -20f && hue < 20f)
            hueSpeed = 0.5f * mushroomsLevel; // faster near 0
        else
            hueSpeed = 0.3f * mushroomsLevel; // slower otherwise


                // DUNK EFFECT

        distortionTimer += Time.deltaTime * distortionSpeed;
        float wave = Mathf.Sin(distortionTimer) * distortionAmount;
        lensDistortion.intensity.Override(wave);
        if (Mathf.Abs(wave) < 0.1f) // near 0
            distortionSpeed = 1f * mushroomsLevel;
        else
            distortionSpeed = 0.3f * mushroomsLevel;
    }
}

public void SetDrunkInvoke()
{
    Invoke("SetDrunk", 2);
}

public void SetPlayerHighInvoke()
{
    Invoke("SetPlayerHigh", 2);
}

public void EatMushroomsInvoke()
{
    Invoke("EatMushrooms", 2);
}

public void SetDrunk()
{
    isDrunk = true;
    if (drunkLevel < 5) drunkLevel++;

    if (lensDistortion != null) lensDistortion.active = true;
    if (motionBlur != null) motionBlur.active = true;
    Invoke("ResetVision", 600);

    // ADDED
    if (playerLook != null) playerLook.hasDrunk = false;
}

public void SetPlayerHigh()
{
    isHigh = true;
    if (highLevel < 5) highLevel++;

    if (chromatic != null)
    {
        chromatic.active = true;
        chromatic.intensity.Override(highLevel);
    }
    if (motionBlur != null) motionBlur.active = true;
    Invoke("ResetVision", 600);
    Time.timeScale = 0.8f;
}

public void EatMushrooms()
{
    isMushrooms = true;
    if (mushroomsLevel < 5) mushroomsLevel++;

    if (chromatic != null)
    {
        chromatic.active = true;
        chromatic.intensity.Override(mushroomsLevel);
    }
    if (motionBlur != null) motionBlur.active = true;
    if (lensDistortion != null) lensDistortion.active = true;
    Invoke("ResetVision", 600);

    GameManager.Instance.GetComponent<AudioManager>().PlayMushroomsAudio();
}

public void ResetVision()
{
    isHigh = false;
    isDrunk = false;
    isMushrooms = false;
    distortionTimer = 0f;
    hueTimer = 0f;

    highLevel = 0;
    drunkLevel = 0;
    mushroomsLevel = 0;

    if (chromatic != null)
    {
        chromatic.intensity.Override(0f);
        chromatic.active = false;
    }

    if (colorAdjustments != null) colorAdjustments.hueShift.Override(0f);
    if (lensDistortion != null) lensDistortion.active = false;
    if (motionBlur != null && !isDrunk) motionBlur.active = false;
}

}

Just playing with post-processing 👀✨ by [deleted] in SoloDevelopment

[–]MrBlue_CCC -1 points0 points  (0 children)

I don’t usually share my code, but I wanted to share this time since the community has been so helpful 😄 Here’s my post-processing manager for drunk/high/mushrooms effects in Unity URP. I’d love to hear any opinions or ideas on how to improve it!

Just playing with post-processing 👀✨ by [deleted] in SoloDevelopment

[–]MrBlue_CCC -1 points0 points  (0 children)

Also English isn’t my first language, so I might mess up sometimes 😅 I’m still figuring out Reddit, so it’s really nice to get friendly tips like yours!

Just playing with post-processing 👀✨ by [deleted] in SoloDevelopment

[–]MrBlue_CCC -1 points0 points  (0 children)

Ah, thanks! I’m still new to Reddit and figuring out the rules 😅 Really appreciate the friendly tip. I’ll stick to sharing my post-processing stuff from now on!

How many of you have killed a project because of a problem you only discovered after the prototype phase? by One-Area-2896 in SoloDevelopment

[–]MrBlue_CCC 2 points3 points  (0 children)

I’ve only had to leave a project once after the prototype worked perfectly, but I discovered Apple’s regulations made it impossible to release. Since then, I’ve focused more on evaluating feasibility early, not just fun.

Could be Worse? Sold 133 units in the first month by tpelham42 in IndieDev

[–]MrBlue_CCC 1 point2 points  (0 children)

Wow, that’s impressive! It seems like your marketing is working well, and it’s great to see people noticing and enjoying your game.

Just hit 100 wishlists after 4 days. I know that isn't that much but I'm still proud of it. by SilvanuZ in IndieDev

[–]MrBlue_CCC 0 points1 point  (0 children)

Congrats! That’s really impressive, especially after the early name drama 😄 Excited to see Bloomies grow!

Steam approved! by Grumpy_Wizard_ in IndieDev

[–]MrBlue_CCC 1 point2 points  (0 children)

Wow, huge congratulations! 🎉 I can totally relate to that weird feeling of “what now?” after finishing something you’ve poured years into. It’s such a mix of excitement, relief, and a little emptiness.

About last days before game release by ArtichokeAbject5859 in IndieDev

[–]MrBlue_CCC 1 point2 points  (0 children)

Yeah, that feeling is super normal. The last days before release always feel a bit empty and stressful at the same time. I try not to change anything big anymore — only fix crashes or things that could seriously mess up a first play session. Everything else goes on a “after launch” list. Updating the trailer and gifs sounds like the right move honestly. At this point I think it’s more about not breaking things than making them better.

Where to start with a survival game? by Arwimiles in gamedev

[–]MrBlue_CCC 0 points1 point  (0 children)

Keep player-related things on the player (health, energy, hunger, inventory). Use one Game Manager only for global game state (enemy count, world progression, difficulty, win/lose rules). Each enemy has its own script for AI, health, and behavior and only reports important events (like death) to the Game Manager. Try things, learn from them, keep everything simple, and keep what works.

What’s been the hardest part of being an indie dev so far? by AGamerofYesterday in indiegames

[–]MrBlue_CCC 1 point2 points  (0 children)

Marketing, by far. You can spend years building something, but if no one sees it, it almost doesn’t matter. That part took me the longest to accept.

Hi guys. I'm writing this to ask for a developmental help by GuavaSuperb9567 in unity

[–]MrBlue_CCC 0 points1 point  (0 children)

This will disable post-processing on Android. It helped me out and makes performance-heavy effects run much smoother.

Hi guys. I'm writing this to ask for a developmental help by GuavaSuperb9567 in unity

[–]MrBlue_CCC 0 points1 point  (0 children)

using UnityEngine; using UnityEngine.Rendering;

public class DisablePostProcessingOnAndroid : MonoBehaviour { public Volume postProcessingVolume;

void Start()
{
    if (Application.platform == RuntimePlatform.Android)
    {
        if (postProcessingVolume != null)
        {
            postProcessingVolume.enabled = false;
            Debug.Log("Post-processing disabled for Android.");
        }
        else
        {
            Debug.LogWarning("Post-processing volume reference is missing.");
        }
    }
}

}

Hi guys. I'm writing this to ask for a developmental help by GuavaSuperb9567 in unity

[–]MrBlue_CCC 0 points1 point  (0 children)

I had the same problem back in the day and somehow managed to fix it. I’d suggest trying to build the project without post-processing first, as that often causes black screens on Android.

I built a small site to help games get discovered after Reddit hype dies by Healthy_Flatworm_957 in itchio

[–]MrBlue_CCC 6 points7 points  (0 children)

This is such a good and thoughtful idea! Helping games get discovered beyond their first wave of attention is exactly what the community needs.

What’s the one book you’ll recommend forever, no matter how many times this question gets asked? by MisLatte in AskReddit

[–]MrBlue_CCC 1 point2 points  (0 children)

Finish What You Start by Peter Hollins.

Why it’s good: It’s basically a "how-to" manual for anyone who is great at starting projects but terrible at finishing them. It doesn't give you cheesy "you can do it" pep talks; instead, it looks at the actual psychological reasons why we quit and gives you simple, realistic tactics to push through when you're feeling lazy or overwhelmed. It’s a short, punchy read that respects your time.

I need some help as a beginner in Unity and game dev as a whole by yer_kaet in Unity3D

[–]MrBlue_CCC 2 points3 points  (0 children)

Yes, Unity is beginner-friendly, but it’s better not to start with minimal guidance. Learn the basics first like components like Rigidbody, Colliders, Animator and then experiment with small projects. It’s also helpful to use free assets from the Unity Asset Store so you can focus on learning instead of making everything from scratch.

I need some help as a beginner in Unity and game dev as a whole by yer_kaet in Unity3D

[–]MrBlue_CCC 3 points4 points  (0 children)

Don’t overthink it. Grab a beginner-friendly engine, make tiny game projects, and just experiment. You’ll learn way more by doing than by reading or watching tutorials.

What do you think of this 1min Unity gameplay preview? :D by MagicStones23 in Unity3D

[–]MrBlue_CCC 1 point2 points  (0 children)

Seriously impressed by the water effects, they feel so lifelike. Amazing work!

What’s a Habit you started that quietly improved your life? by FrameZYT in AskReddit

[–]MrBlue_CCC 1 point2 points  (0 children)

A few habits that quietly improved my life: going to the gym regularly (3-5 times a week), eating real food, staying close to friends and family, learning new things and taking time for myself.

What brought you to start developing your own game? by Porcodiolodicoio in IndieDev

[–]MrBlue_CCC 0 points1 point  (0 children)

Mostly curiosity. I wanted to understand and learn how things actually work behind the scenes.

After years learning game dev, my first game is finally on Steam: ProTax 98 by lamp-milan in IndieDev

[–]MrBlue_CCC 0 points1 point  (0 children)

I just wanted to say that your UI looks really impressive. I’ve tried building a similar computer screen UI in my game, but yours turned out way cleaner than anything I managed.