Search Unity

A preview of my project and help request

Discussion in 'Editor & General Support' started by Matscrich, Aug 3, 2020.

  1. Matscrich

    Matscrich

    Joined:
    Jul 30, 2020
    Posts:
    5
    Hello guys,
    I have recently put my hand on content from the shockwave game Gorillaz.
    I like the game so i'm attempting to port it. I decided to use Unity for this project, i'm a beginner.
    Here is a preview of what i got so far:
    (You can play it x2 if you want)

    So as you can see, the raycast demo is running quite slow on my PC.

    I need help with learning Unity and i need help with a scipt (from Director) that contains the driving model of the original game. I don't know programming, so i wish someone could help translating it for Unity.

    Of all the things that i need to learn on Unity, there are the questions coming to my mind now:
    How to import models with their textures/ UV maps ?
    and
    Can someone tell me why Unity is running 2 times too slow ?

    If you have links to some good tutorials, i'd appreciate it

    Thank you
     
  2. DiegoDePalacio

    DiegoDePalacio

    Unity Technologies

    Joined:
    Oct 28, 2009
    Posts:
    507
    Hello @Matscrich,

    It's nice that you're learning Unity... It's pretty fun to create games with it ;)

    Unfortunately, there are a lot of possible reasons why your project is not running smoothly. It depends on a lot of factors, but if you learn Unity, you'll be able to find why by yourself and to improve not only the performance, but also the gameplay, physics, and all the other systems that your game is using.

    About importing models, Unity is able to import the textures and UV's automatically for you if the model's file format it's supported and has such information included.

    On the other hand, my recommendation for you is to choose and follow Unity's official tutorials, which you can find here: https://learn.unity.com/.


    Happy learning!
     
    Matscrich likes this.
  3. Matscrich

    Matscrich

    Joined:
    Jul 30, 2020
    Posts:
    5
    Last edited: Aug 3, 2020
    DiegoDePalacio likes this.
  4. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,196
    Looking at your video, that doesn't necessarily strike me as having performance problems. You're getting a smooth framerate, it's just that all of the physics seems to be progressing kind of slowly. Things I'd check:
    • Go to Edit -> Project Settings -> Physics. What's Gravity set to? Around y = -9.81 will give you "realistic" gravity. However, realistic gravity in games often feels very floating and slow. So games often use -20 or -30 for gravity, to making falling feel faster. What I'm seeing in the video looks almost like y = -3 or -4.
    • Go to Edit -> Project Settings -> Time. Typical settings here would be 0.02 for Fixed Timestep, and 1 for Time Scale.
    • In some script you have, doesn't matter which script as long as it's in the scene, print out Time.timeScale, and make sure it's "1". If not, you'll get a slow-mo effect.
    • In the Game View window, click on the Stats button along the top. This will give you a rough idea of the FPS you're getting. I suspect you're getting reasonably good FPS (indicating the hardware is keeping up with things), and that your game is configured to feel like it's running more slowly.
     
  5. Matscrich

    Matscrich

    Joined:
    Jul 30, 2020
    Posts:
    5
    @dgoyette
    - The Gravity is at y= -9.81
    - i get 78FPS after opening the project
    - For the fixed timestep i see: 0.01666667 (1/60) , and 1 for the scale

    I want to check the scripts timescale but i don't know how to do.
     
  6. Matscrich

    Matscrich

    Joined:
    Jul 30, 2020
    Posts:
    5
    When i tried again this time, the game seemed to run faster. The only difference was that "Maximize on Play" was enabled.
    After comparing, the game is definitely running slower in the "small" game window.
     
  7. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,196
    In that case, I'd look at the code you're using to move objects. You might have some screen-size dependent code. That shouldn't affect how quickly things fall under gravity, but it could affect how quickly the vehicle turns.

    As for checking the timescale, you just need to put a Debug.Log(Time.timeScale) statement somewhere in a script in your scene. Probably it's "1", but it's good to make sure something isn't setting Time.timeScale to something less than 1.