r_unity3d | Unsorted

Telegram-канал r_unity3d - r/Unity3D

156

News about the Unity engine and project showcases from Reddit. Made possible with @reddit2telegram (@r_channels).

Subscribe to a channel

r/Unity3D

My wife said that I could do something more useful

https://redd.it/1boa0zk
@r_Unity3D

Читать полностью…

r/Unity3D

Understanding enemy AI from StS

I'm working on a remake of Slay the Spire to learn game dev and Unity, and I've hit a roadblock with enemy AI. Some enemies are pretty easy to design like the Corrupt Heart (Buff-attack-attack cycle) or Cultist (buffs on turn 1 then always attacks) since their attack patterns are entirely scripted. But when I get to more complex enemies like the Jaw Worm, I get confused.


For reference, the Jaw Worm's AI is as follows:

>Always starts with Chomp.
>
>Afterwards, has a 45% chance of using Bellow, 30% chance of using Thrash, and 25% chance of using Chomp.
>
>Cannot use Bellow twice in a row, cannot use Thrash 3 times in a row, and cannot use Chomp twice in a row.

​

I've got the percent chance working by creating a random double (0.0 - 1.0) and comparing it to the percent values, and I have a system set up to calculate how many times a move has been used in a row. However, determining which move to use based on these values is still proving difficult.


For example, let's say the random double creates a value equal to 0.3, meaning the Jaw Worm's next move should be Bellow. But then, what if Bellow was the move used last turn? Which move should then be selected? Because Bellow was the last move used, neither Thrash or Chomp were used and therefore their additional logic cannot be used to narrow down the choice. So which move should it be?

Currently, I've got a giant if-statement that handles all the options, but it has to choose one of the other moves first and that doesn't seem right to me. For those of you who've worked with similar enemy AI patterns, what have you done to tackle issues or systems like this? Should I be calculating the percent chance first and then checking for a move streak (my current approach), or should I check the move streak and then calculate a percent chance?

https://redd.it/1bo8igx
@r_Unity3D

Читать полностью…

r/Unity3D

2d game kind if like the overlord anime

Hey I making a 2d inspired by rhe overlord anime, but more based around necromancy, I have it so that u can collect souls when killing things or through other means I haven't decided, and then u can spend those souls to summon different minions. I plan on having a leveling tree for each diffretn basic type of minion so after awhile they can evolve into a different type of minion, like skeleton to skeleton archer and have there be diffrent paths so it could end up being like elder lich or somthing. I would obviously make the higher level ones cost more souls. I also plan on having a leveling tree for the player, health upgrades, magic damage etc. I want any ideas that could help me make this a enjoyable game so please give any ideas or advice you may have

https://redd.it/1bo4f6u
@r_Unity3D

Читать полностью…

r/Unity3D

Downward arc movement

Hi, I am currently developing a boss fight and I want to recreate the Vengefly King attack style. I have bien trying with parabola equation but I think it doesnt work properly cause it only moves to the middle of the parabola. Do you have any advice or any solution to this?
This is the move I want to recreate.
https://www.youtube.com/watch?v=vgzoYfwNsew the attack in question it's at 0:26 sec.

https://redd.it/1bnzq64
@r_Unity3D

Читать полностью…

r/Unity3D

Do not get the 'used by composite' option in Tilemap Collider 2D component??

Hi, I am wondering if anyone has the answer about how I could make this option to appear since I want to add colliders to an isometric tilemap that I am working with. I have watched some tutorials and all of them just have that option by default but for reference I am using the 2023.2.14 version and all the tutorials are old. The documentation is saying " Used by Composite : Enable this to use this Collider with an attached Composite Collider 2D. " but since I don't know what I am doing, I am not able to solve this riddle yet.

edit: colliders work now but I still don't have the option. If anyone can explain it to me cause I am curious, that would still be greatly appreciated.

https://redd.it/1bo0hen
@r_Unity3D

Читать полностью…

r/Unity3D

Why does it say that the name "transformation is not found?"

I'm new to coding and I'm following a youtube tutorial. I need help with this code:

​

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class a : StateMachineBehaviour
{
private float horizontal;
private float speed = 8f;
private float jumpingPower=16f;
private bool isFacingRight=true;
[SerializeField\] private Rigidbody2D rb;
[SerializeField\] private Transform groundCheck;
[SerializeField\] private LayerMask groundlayer;
void Update()
{
horizontal = Input.GetAxisRaw("horizontal");
if (Input.GetButtonDown("Jump") && IsGrounded())
{
rb.velocity = new Vector2(rb.velocity.x, jumpingPower);
}
if (Input.GetButtonUp("Jump") && rb.velocity.y > 0f)
{
rb.velocity = new Vector2(rb.velocity.x, rb.velocity.y * 0.5f);
}

Flip();
}

private void FixedUpdate()
{
rb.velocity = new Vector2(horizontal * speed, rb.velocity.y);
}
private bool IsGrounded()
{
return Physics2D.OverlapCircle(groundCheck.position, 0.2f, groundlayer);
}
private void Flip()
{
if (isFacingRight && horizontal < 0f || !isFacingRight && horizontal > 0f)
{
isFacingRight = !isFacingRight;
Vector3 localScale = transform.localScale;
localScale.x *= -1f;
transform.localScale = localScale;
}
}
}

&#x200B;

&#x200B;

(if you guys make any changes pls do the whole code in there as well so I can just copy and paste it back in.)

https://redd.it/1bnxc52
@r_Unity3D

Читать полностью…

r/Unity3D

How can I improve the rain particles, no matter what I try they kind of end up as flat grey patches to my eye, any tips or tricks?

https://redd.it/1bnohg4
@r_Unity3D

Читать полностью…

r/Unity3D

isTrigger and OnTriggerEnter2D

I'm a bit confused about this. Are these statements correct?

1.) In order to use OnTriggerEnter2D object A or object B has to have isTrigger box checked.
2.) If isTrigger box is checked, then you will pass through that object instead of crashing into it.

https://redd.it/1bnpy4t
@r_Unity3D

Читать полностью…

r/Unity3D

My Steam game got a big update
https://redd.it/1bnl5xc
@r_Unity3D

Читать полностью…

r/Unity3D

Which image lends itself best to be used as Steam's capsule image?
https://redd.it/1bnhkyq
@r_Unity3D

Читать полностью…

r/Unity3D

Just updated the demo of my first game, would love to hear your feedback :) Link in the comments

https://redd.it/1bkbgm3
@r_Unity3D

Читать полностью…

r/Unity3D

Take your time and you will win, for sure! No need to rush expert mode.
https://redd.it/1bkhad9
@r_Unity3D

Читать полностью…

r/Unity3D

Help with blurry textures in Unity!
https://redd.it/1bkbeu8
@r_Unity3D

Читать полностью…

r/Unity3D

Sometimes making design decisions so hard while developing a game. For example which card design would you prefer?

https://redd.it/1bkbomy
@r_Unity3D

Читать полностью…

r/Unity3D

Changed my trees to be breakable when spells are cast on them

https://redd.it/1bk6d17
@r_Unity3D

Читать полностью…

r/Unity3D

Riding a turtle and climbing an island to enjoy the view. Does this sell the idea of exploration and feel-good adventure ?

https://redd.it/1bo7jwc
@r_Unity3D

Читать полностью…

r/Unity3D

Health dependent animation

I wanted to have a character, which would be completely white/gray/black

If you hit it, a color would propogate from the point of impact on the character

To make it even trickier, I want it to color only a certain amount of the overall % area of the body. Any additional hit will just spread it further, from the original "wound" position (not create new "wounds" in the new hit positions)

In addition, I'd like the % of color to be relative to the damage taken from the overall health.

How feasable is it?

Can it be generic to match different character size and shape? Should also be flexible to overall health

I'm very new to game dev, so even a raw direction to what should I look into is good. Like what do I even search on YT/Google to help me with it?

Not afraid of code compelxity, so you can get technical in coding terms, but if you suggest gamedev specifics or Unity terms, I'd appreciate lamen terms ;)

Also, I'm purely asking from a technical POV, not a game design view. Though I am aware it is queationable on that end

https://redd.it/1bo5lkf
@r_Unity3D

Читать полностью…

r/Unity3D

Me 5 years ago learning enemy targeting and triggering. It’s still fun to play this one!
https://redd.it/1bnyy6s
@r_Unity3D

Читать полностью…

r/Unity3D

Stuck here for 2 hours

&#x200B;

https://preview.redd.it/888arymzlmqc1.png?width=285&amp;format=png&amp;auto=webp&amp;s=b94d2874c458e1a98a8a313f067147f809229301

Ok I did not expect that I would stuck here for 2 f... hours. Well now, I have health and total health. I want to increase when it collides with healthincrementer gameobj and get healthAmount(Which is random) and plus it with health. And finally when total health is equal to 3 I want them to stop increment. They increment. And one more thing I get random values correctly but when it goes to 100 it increases more then the value that I get from healthAmount. How can I solve it ?

https://redd.it/1bo1igs
@r_Unity3D

Читать полностью…

r/Unity3D

My first game is out now on Steam! Have been working on it on Unity for about 2 years now

https://redd.it/1bnxbro
@r_Unity3D

Читать полностью…

r/Unity3D

Screenbound: A game about being distracted - 2d and 3d at the same time - and a pretty big update!

https://redd.it/1bntktl
@r_Unity3D

Читать полностью…

r/Unity3D

Pocket Inventory Series #10 : Monitor Version 1.0

https://redd.it/1bnmyap
@r_Unity3D

Читать полностью…

r/Unity3D

New project taking FOREVER to load, is this normal?

I just got unity and wanted to try it out. I've never touched a game making software before, but I got everything in order it seems, and I clicked create project, and I've been sitting here for half and hour and the progress bar hasn't moved at all. Is this a me doing something wrong problem? Is this normal? I'm about to quit and try a different software this is unusable and I'm very lost. I tried a few times, so now my only option is asking people who actually know about this haha.

uh I'm on version 2022.3.22f1 if that means anything? I know NOTHING about computers or software so I may just be stupid.

https://redd.it/1bnokez
@r_Unity3D

Читать полностью…

r/Unity3D

Screen Size

So im about to finish my Game and just created the UI. Now i face the problem on how to optimize it. I set the Canvas to Scale with Screen Size and set it to 1920x1080. I tested this on a Z Flip 5 and a S21 and in both the UI was "broken". The Buttons i placed arent in their place and the cam is a little zoomed in.

Any Idea how to fix this?

https://redd.it/1bnj1ui
@r_Unity3D

Читать полностью…

r/Unity3D

Pixel Button Text
https://redd.it/1bkndu0
@r_Unity3D

Читать полностью…

r/Unity3D

After 8 years of making bad games, my second game jam this year has seen more postive reviews than I ever expected, what do you think? Here's the trailer!
https://www.youtube.com/watch?v=9PT9K3kWT-M

https://redd.it/1bkh2xu
@r_Unity3D

Читать полностью…

r/Unity3D

Thoughts on the new design for my character

&#x200B;

Hi y'all! So lately I've been wanting to redesign the main character for my game, since I've realized he looks way too much like a mecha character lol. I've now kind of redesigned him \(the wip new version is on the left\), but I love the old design way too much. Could y'all please tell me which one has more character? Btw I should probably mention that he is supposed to be a space pirate, and that's the main reason for the redesign. Thoughts?

https://redd.it/1bkhi5x
@r_Unity3D

Читать полностью…

r/Unity3D

When players discover crazy spell synergies, it makes you glad you spent all that time optimizing stuff

https://redd.it/1bkbu0o
@r_Unity3D

Читать полностью…

r/Unity3D

Sometimes making design decisions so hard while developing a game. For example which card design would you prefer?

https://redd.it/1bkbrfy
@r_Unity3D

Читать полностью…

r/Unity3D

Today I released my chaotic animal racer, Turbo Tails!

https://redd.it/1bk8j49
@r_Unity3D

Читать полностью…
Subscribe to a channel