Rasmus Winterhag Portfolio

This page contains a preview of all my notable projects, click the name of the project to see more information and my contributions!.

View on GitHub
Anker

Back

Anker

Worked as sole developer
Summer 2023, January 2025 - february 2025 Language: c#


I started working on this the summer of 2023 since I wanted Placid Plastic Duck Simulator but I was cheap and thought I could make it myself, but worse. So I made it in 2D, then later at Yrgo we were supposed to make a mobile game, so I ressurected this game and upgraded it. In about a month I added

Examples of diffrent duck types The BlackHole duck which starts spinning faster and faster until it starts sucking in other ducks until something slows it down.
Black Hole Duck Code
  
  public class BlackHole : MonoBehaviour
  {
      Rigidbody2D rb2d;
      PointEffector2D pEffector;
      CircleCollider2D pEffectorTrigger;
      ParticleSystem particleSys;
      [SerializeField] float spinTrorque = 5;
      [SerializeField] int minSuckSpeed = 360;
      [SerializeField] float suckRepeatTime = 30;

      void Start()
      {
          rb2d = GetComponent<Rigidbody2D<();
          pEffector = GetComponent<PointEffector2D<();
          pEffectorTrigger = GetComponent<CircleCollider2D<();
          particleSys = GetComponent<ParticleSystem<();
  
          InvokeRepeating(nameof(StartSuck), 0, suckRepeatTime);
      }
  
      void StartSuck()
      {
          StartCoroutine(nameof(Suck));
      }
  
      IEnumerator Suck()
      {
          while (rb2d.angularVelocity < minSuckSpeed)
          {
              rb2d.AddTorque(spinTrorque, ForceMode2D.Force);
              yield return new WaitForSeconds(0.1f);
          }
          SuckParticlesEnabled(true);
          yield return new WaitForSeconds(1f);
          while (rb2d.angularVelocity < minSuckSpeed / 3)
          {
              yield return new WaitForSeconds(0.1f);
          }
          SuckParticlesEnabled(false);
      }
  
      void SuckParticlesEnabled(bool value)
      {
          pEffector.enabled = value;
          pEffectorTrigger.enabled = value;
          if (value)
          {
              particleSys.Play();
          }
          else
          {
              particleSys.Stop();
          }
      }
  }
  
  
The rocket duck that propells itself forward until it has reached rocketSpeed then stops for a little bit before starting up again.
Rocket Duck Code
  
public class RocketDuck : MonoBehaviour
{
    [SerializeField] float rocketSpeed = 1.5f;
    [SerializeField] float rocketPower = 0.5f;
    [SerializeField] float rocketCooldown = 1f;
    float speed;
    Animator anim;
    Rigidbody2D rb;
    ParticleSystem pSystem;
    float timer;
    AudioSource audioSource;
    bool rocketing = false;

    void Start()
    {
        rb = GetComponent<Rigidbody2D<();
        anim = GetComponent<Animator<();
        pSystem = GetComponent<ParticleSystem<();
        audioSource = GetComponent<AudioSource<();
        timer = rocketCooldown;
    }

    void FixedUpdate()
    {
        timer = timer + Time.fixedDeltaTime;

        speed = rb.velocity.magnitude;
        if (timer < rocketCooldown)
        {
            if (speed < rocketSpeed)
            {
                rb.AddForce(transform.up * rocketPower);
                audioSource.pitch = Random.Range(0.9f, 1.1f);
                RocketStart();
            }
            else
            {
                timer = 0f;
                RocketStop();
            }
        }
    }

    void RocketStart()
    {
        if (rocketing) { return; }
        rocketing = true;
        anim.Play("RocketDuckRocketing");
        pSystem.Play();
        audioSource.Play();
    }

    void RocketStop()
    {
        if (!rocketing) { return; }
        rocketing = false;
        anim.Play("RocketDuckIdle");
        pSystem.Stop();
        audioSource.Stop();
    }
}

  
  

I also added some additional ducks and I reworked the system for how you get ducks so that instead of only getting every duck once and then not being able to get them again. Now when you have every duck you can start to get duplicates so you can have 2 of each, then 3 of each, etc. etc.

Screenshots