Vacuum Escape (theme & title)

Title:
Vacuum Escape

Theme:
You are vacuum cleaner that became self-aware inside the factory. Incidentally, you look a lot like R2D2 from Star Wars.
You want to escape the factory. So far, you figured out that a way to do that would be to reverse and severely overpower your vacuum cleaning mechanism, so that it propels you instead (unrealistic, therefore cartoonish).
Instead of fuel there will be either a battery that can be exhausted or a heating mechanic (overheat leads to game over).

the first commit

world setup

This is pretty different from the theme stated above but for now here it is

Capture

the optimal mass for hovering in lecture 43 seems to be 0.22

the first sound effect (thrust). it does seem to have some artefacts, but they’re also there when i play the file in VLC.

and here is the script

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Rocket : MonoBehaviour
{
    Rigidbody rigidBody;
    AudioSource audioSource;

    // Start is called before the first frame update
    void Start()
    {
        rigidBody = GetComponent<Rigidbody>();
        audioSource = GetComponent<AudioSource>();
    }

    // Update is called once per frame
    void Update()
    {
        if (Input.GetKey(KeyCode.Space)) //can thrust while rotating
        {
            rigidBody.AddRelativeForce(Vector3.up);
            if (Input.GetKeyDown(KeyCode.Space)) //nested this here to avoid unnecessary computations
            {
                audioSource.Play();
            }
        }
        else if (Input.GetKeyUp(KeyCode.Space))
        //used "else" here to avoid unnecessary evaluation of two mutually exclusive conditions
        {
            audioSource.Stop();
        }

        if (Input.GetKey(KeyCode.A) && !Input.GetKey(KeyCode.D))
        {
            transform.Rotate(Vector3.forward);
        }
        else if (Input.GetKey(KeyCode.D) && !Input.GetKey(KeyCode.A)) 
            //used "else" here to avoid unnecessary evaluation of two mutually exclusive conditions
        {
            transform.Rotate(-Vector3.forward);
        }


    }
}

I might actually change the theme by the time the game is done. Here is the screenshot for lecture 51. Not an easy level, probably not fit to be the first in the game, but I find the difficulty level engaging and not frustrating.

and the backdrop version:

Game Moment:

I became less interested in the cartoony vacuum cleaner thing and more in the mechanics. It’s a rocket in space for now, the vacuum cleaner can be added later when all works fine mechanically.

I changed the name of the game and created a separate thread here


If it’s a problem to have two threads about the same game (as this one was more of a work-in-progress thread) I can safely delete this one.

Privacy & Terms