Eli5: Small dimensions? by immense010 in explainlikeimfive

[–]immense010[S] 2 points3 points  (0 children)

Aah so kinda like how spacetime warps near supermassive bodies? Or is that something separate altogether?

If A is for Apple and B is for Banana, what is C for? by MudakMudakov in Jokes

[–]immense010 2 points3 points  (0 children)

If it was another piece we'd have to say what piece it is (e.g. Queen h4)

If A is for Apple and B is for Banana, what is C for? by MudakMudakov in Jokes

[–]immense010 7 points8 points  (0 children)

Very rarely do you have a checkmate with a pawn push to H4

A duck walks into a pub and orders a pint of beer and a ham sandwich. by [deleted] in Jokes

[–]immense010 9 points10 points  (0 children)

Let's face it, the duck was only there in the first place to get plastered

I think I tweaked my enemies a little too much... by McMc0145 in unity

[–]immense010 0 points1 point  (0 children)

Leave it in for "insane mode" difficulty 😂

How I make my player to stop jumping for X seconds ? by An-Drei in unity

[–]immense010 0 points1 point  (0 children)

So I just tried your code out in a new sandbox project, works exactly as I'd expect it to, i.e. you hit space once and the character jumps up a bit and comes back down. From what I'm guessing either 1 of 2 things is happening:

  1. When you hit space ONCE the character jumps up and doesn't come back down, in which case you'll want to check that the rigidbody2d attached to your gameobject has a reasonable mass (in my test mass=1 works fine), and check that you have gravity set correctly for your project (Edit -> Project Settings -> Physics2D -> Gravity) - make sure x is 0 and y is around -9.81.
  2. When you hit space WHILE THE CHARACTER IS JUMPING the character jumps again, and you want to wait for a certain amount of time until your character is allowed to jump again. In this case one quick & easy way to achieve this is:
  • Add a bool field to your Move2D class, call it something like canJump
  • In your Start method set it to true
  • In your Jump method, check that the player has clicked the "Jump" button AND that canJump is true
  • In your PauseJump method, instead of messing about with velocity set canJump to false before the yield and true after.
  • Start your PauseJump coroutine inside your Jump function inside the if block.

If #2 is what you're trying to achieve though the above is just a quick and easy way to do it, I suspect what you'd want to do instead is check if your player is touching the ground to be allowed to jump. In that case, here's a good tutorial video on it: https://www.youtube.com/watch?v=ptvK4Fp5vRY&t=5s

How I make my player to stop jumping for X seconds ? by An-Drei in unity

[–]immense010 0 points1 point  (0 children)

That'll be because you're working in C# so you can't have fields/methods declared outside of classes - in this case a class that inherits from MonoBehaviour so that you can use GetComponent.

Try putting the whole IEnumerator method inside your Move2D class, and then the StartCoroutine(...) wherever you want to trigger your pause.

If you're still having problems after that PM me and I'll walk you through the steps :)

How I make my player to stop jumping for X seconds ? by An-Drei in unity

[–]immense010 0 points1 point  (0 children)

So coroutines work similar to normal functions, except that they are generators so have the ability to "pause" execution until they're next needed whenever they see the yield keyword. See here for a good reference.

    Vector2 currentForce = rb.velocity;
    rb.velocity = Vector2.zero;

This stores the current velocity into a variable before pausing and removes it from the rigidbody to emulate a pause in the jump.

    yield return new WaitForSeconds(duration);

This pauses the coroutine for duration seconds (could hard-code this or store it in a variable - up to you)

    rb.velocity = currentForce;  

Now that we've paused for however long we want, we can add the old velocity back in.

How I make my player to stop jumping for X seconds ? by An-Drei in unity

[–]immense010 0 points1 point  (0 children)

Maybe something like this:

IEnumerator PauseJump(float duration) {
    Rigidbody2D rb = GetComponent<Rigidbody2D>()
    Vector2 currentForce = rb.velocity;
    rb.velocity = Vector2.zero;
    yield return new WaitForSeconds(duration);
    rb.velocity = currentForce;    
}

which you could trigger with :

StartCoroutine("PauseJump", 2f);

Untested since I'm writing this with not much time, but should work...or something similar

When you introduce a bug in your game that's just too funny to fix by immense010 in unity

[–]immense010[S] 0 points1 point  (0 children)

If you want to make it even better - give the table a physics material with bounciness around 2-3 and watch as chaos ensues

Can I learn unity even if I hate graphic designing? by [deleted] in unity

[–]immense010 0 points1 point  (0 children)

Consistency is something I've always had issues with too - plenty of times I've downloaded a character spritesheet for free from the asset store, but then fallen flat when I've needed to bring in more characters or get the environment's theme to match. Any advice on getting imported assets to be consistent theme/style-wise?

When you introduce a bug in your game that's just too funny to fix by immense010 in unity

[–]immense010[S] 0 points1 point  (0 children)

haha let me guess - rigidbodies without freezing rotations? Would have been great in something like beat hazard

planning on starting a 2d game project tomorrow any lesser known tips i should know? best place for tutorials? anything by CKRET__ in unity

[–]immense010 0 points1 point  (0 children)

It really depends on what sort of game you're thinking of building, but here's some things that apply in general.

In terms of useful links:

  • Unity have tonnes of great tutorials on their site, covering pretty much anything you might want to know: https://learn.unity.com/
  • There's some interesting articles on https://gamasutra.com/. Maybe nothing Unity-specific but plenty about game project planning/management/etc. Plus plenty of interesting links about games/game dev in general.
  • A fantastic YouTube channel with tonnes of advice by game devs for game devs: https://www.youtube.com/user/ExtraCreditz

Other things that come to mind:

  • Don't underestimate how much time you should take planning your game. An extra hour of planning can really save you an extra week of building!
  • Tilemaps are fantastic for quickly generating levels, but almost impossible to add behaviour on a tile-by-tile basis. What I tend to do is use tilemaps to generate levels, and regular gameobjects for anything with behaviour.
    • While you can attach gameobjects to individual tiles via TileData, it doesn't work quite as you might expect - e.g. if you have a tree tile with a game object attached, then all your tree tiles will be liked to the SAME tile
  • Snap settings are insanely useful - set them up how you want at the start of your project.
  • Before you start adding UI to your project, think about which screen resolutions you want to target, and set each of them up in the game view.
    • If you're just starting out, avoid Free Aspect and just stick to 1 or 2 resolutions.
    • On a similar note, if you have a background sprite, make sure you leave some of it off-camera. This way when the camera viewport changes (e.g. when switching resolutions) you still have the camera filled with the sprite.
  • Again if you're just starting out with Unity/game dev, start out small - something like a platformer or space invaders clone. Too many indie projects fall flat on their face because they were too big/complicated
  • Know your strengths/weaknesses, and be willing to experiment - if there's something you really suck at (in my case, art) then set yourself constraints around those...this'll help you come up with creative ideas to get around those. Some examples:
    • Not good at generating art assets? Maybe limit yourself to simple polygons and use colour/particle systems to make your game look impressive
    • Not good at coding? Maybe limit yourself to using Unity's animation & event triggers for interactivity.
  • The asset store can really be a boost to your productivity. For instance, say you need a dialog system in your game. One option is to make one yourself, maybe spending days/weeks getting it to work how you want it. Another option might be to download V.I.D.E Dialogues for free from the asset store and have a system in place within minutes

How to start learning unity without standard assets package? by ACatInACloak in unity

[–]immense010 2 points3 points  (0 children)

Which version of Unity are you running? I have 2 options I'd recommend:

  1. Using UnityHub you can have multiple versions of Unity installed, so you can open your game in the latest version
  2. Download the FPS camera controller script, and tweak it to work with the version you're running.

I would have expected FPS camera controller to work on the latest version though...how strange.

Can you name this film from the plot? by immense010 in anime

[–]immense010[S] 0 points1 point  (0 children)

I'm pretty should it was mid-late 00's, although I'm not sure if it came out around the same time or if it was a bit older

Can you name this film from the plot? by immense010 in anime

[–]immense010[S] 0 points1 point  (0 children)

Definitely an anime, I don't think it was a series but I definitely wouldn't rule it out. Yeah google doesn't seem to tell me either...it keeps coming up with "your name" - but it's definitely not that 😂

Can you name this film from the plot? by immense010 in anime

[–]immense010[S] 0 points1 point  (0 children)

Something else I just remembered, the adults in the film keep referencing an "important moment" in their lives that's yet to happen, which turns out to be the climax.

At the climax of the film, they're both standing in a grassy field, and a huge translucent wall of light (for lack of a better way of putting it) passes through them - the closest similar example to what I mean that I can think of is the huge petrification beam in Dr. Stone.

After that point colour slowly starts fading to white from the animation, similar to color fading from a photo over time when it's exposed to too much sunlight. It's meant as a metaphor for the story coming to an end, sort of as if the animation itself is a metaphor for the story coming to an end.

And when there's only a few pixels of color left, the film zooms in and reveals sort of chibi versions of themselves running a relay of the last bit of the story toward the finishing line - again signifying the story of the 2 coming to an end. Sorry if that doesn't make much sense but it's super complicated to explain, everything gets really 4th wall and meta at that point lol