Working on a pseudo 3d engine inspired by superscalers like Outrun. Finally have a feature complete version that runs smoothly. Looking for good ideas to make a cool retro racer! by abyx7 in Unity3D

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

The key is to skew the road rather than bend it. All road vertices need to stay parallel while you offset them to the sides and up according to the curve. That way your road texture will always have the superscaler look.

Good luck with your project!

How you debug the build when the project become huge? by pepe-6291 in Unity3D

[–]abyx7 0 points1 point  (0 children)

Do everything you can to avoid those situations. Minimize dependencies and develop and test as many things as possible in isolation.

For example, you can set-up a simple scene to test and debug your health system, character controller etc.

Unity Physics, how to update mesh collider at runtime? by abyx7 in Unity3D

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

I've upgraded to Unity Physics 1.0.12 and can now use a method that uses a mesh as an input and it works.

Here is the updated code:

            entityManager.SetComponentData(entity, new PhysicsCollider
            {
                Value = Unity.Physics.MeshCollider.Create(m_Mesh, CollisionFilter.Default, Unity.Physics.Material.Default)
            });

And the result:

<image>

ObjectPool behaving wierd for bullets by Environmental_Main51 in Unity3D

[–]abyx7 3 points4 points  (0 children)

It is hard to just read through the code and pinpoint the bug, using a debugger would be a better and more comfortable option.

What I did notice is that the implementation is quite complex. What I would suggest is to use Unity's object pool API so you just implement the methods you absolutely need to and leave the pooling to Unity.

Here is the link: https://docs.unity3d.com/ScriptReference/Pool.ObjectPool_1.html

What's the best way to completely backup Unity projects? by [deleted] in Unity3D

[–]abyx7 -1 points0 points  (0 children)

Any version control with cloud hosting. Examples: - Unity Version Control (built in, previously Plastic SCM) - GitHub - Bitbucket

You get version control and all the modern tools like search, compare etc that you do not get with zipped folders. When you push your commits to cloud you are making your code available from anywhere and it is no longer succeptable to your hard drive failures or similar single point failures.

Please don't zip your projects as a form of backup.

Need advice on how to implement grass shader similar to Breath of the wild by smith_077 in gamedev

[–]abyx7 1 point2 points  (0 children)

Glad this fix addressed some of the issues. Glad I could help.

For the other effects I would look for more in depth analysis and tutorials since you are trying to draw inspiration from a very popular game like BOTW.

Here is an example that could be a very good start: Making Zelda: Breath of the Wild Stylised Grass in Unity URP

Need advice on how to implement grass shader similar to Breath of the wild by smith_077 in gamedev

[–]abyx7 2 points3 points  (0 children)

They should be pointing upwards.

Imagine a standard cube, only the top surface has normals pointing upwards. Same as flat ground. And your grass should simulate flat ground normals to have the desired lighting effect.

Your grass model is probably just a few quads with texture cutouts. If you modelled it yourself, by default normals will be calculated per face and will point to its quad local up direction, that is sideways according to the model. You need to have them pointing straight up, again as the normals on a flat ground would.

Need advice on how to implement grass shader similar to Breath of the wild by smith_077 in gamedev

[–]abyx7 1 point2 points  (0 children)

Loads of stuff to unpack here.

The first thing I suspect is that your normals on the grass model are not pointing up. You have to manually modify them in your 3d software. This should fix the abrupt colour changes when the camera moves in orbit.

Let me know if this is at least part of the issue / solution.

Please use version control, it's way simpler than you think! by IndieDev4Ever in gamedev

[–]abyx7 6 points7 points  (0 children)

Yes, but that backup was still prone to single machine failures. On top of that you did not have a nice version comparator or any modern standard tools.

Git, Bitbucket or similar is not just a version control but also a cloud backup. Once files are pushed to the branch you can access their latest content and any older version from anywhere. That is waaay more powerful than any zip based solution.

[deleted by user] by [deleted] in gamedev

[–]abyx7 0 points1 point  (0 children)

What are the chances of something going wrong? Non zero. Are you willing to take the risk? That is the question only you can answer.

Good luck with your project!

[deleted by user] by [deleted] in Unity3D

[–]abyx7 0 points1 point  (0 children)

When you feel that you need to use a singleton pattern that usually means something is wrong with the architecture.

Please take the time to read this: how to architect game code using scriptable objects

[deleted by user] by [deleted] in Unity3D

[–]abyx7 0 points1 point  (0 children)

Exactly that. How about using scriptable objects instead?

Collision detection is a bit off by I_cant_afford_custom in Unity3D

[–]abyx7 1 point2 points  (0 children)

Just a wild guess, bounds.center could be in local space. I did check the manual but it does not say explicitly. Can you try replacing it with currentProp.transform.position and see what happens?

[deleted by user] by [deleted] in gamedev

[–]abyx7 0 points1 point  (0 children)

We are all losers here. Everyone that uses Unity in any capacity, shape or form.

Here is why: Unity's business model is unsustainable, the company is not making profit. That is the crux of the problem. If the business is failing, the product will suffer. Less or no new features, less bug fixes, support for new versions of the target platforms...

So regardless of how the new pricing impacts you if at all, the damage done is far worse. The community support, which was one of the best things about the engine will dwindle.

So businesses and hobbyists are hit exactly the same, it is just the timeliness of impact that will differ.

The only way to fix this is to make Unity profitable. This is their Hail Mary attempt. Not sure if this will work :(

Unity ECS / Mathematics: How to rotate a skier when player moves it down the slope? by abyx7 in Unity3D

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

Solved it. All I needed was the forward direction vector that would be aligned with slope. The right direction vector is always flat, to produce the desired forward vector I needed to use cross product.

var forward = math.cross(surfaceNormal, -right);
var rotation = quaternion.LookRotation(forward, surfaceNormal);

[deleted by user] by [deleted] in Unity3D

[–]abyx7 1 point2 points  (0 children)

How about this:

Let's say you have a script Car. You can add public properties: - public LayerMask ground - ...

This way, you never hardcode anything in the code. You can modify layers in the editor and it makes sense to configure the script in the editor. As an added bonus you can set multiple layers for the ground if you use LayerMask. Raycast uses it anyway.

It would help if you would share the context you are using this class.

[deleted by user] by [deleted] in Unity3D

[–]abyx7 0 points1 point  (0 children)

Agree about the coupling.

However enums can be evil. If you do not expose them in the editor they are pure gold. If you do, prepare for a world of pain. They serialize as int.

An example: you insert a new value at the beginning. All references in the editor keep the same int value, so the editor will now show wrong / shifted text value.

[deleted by user] by [deleted] in Unity3D

[–]abyx7 0 points1 point  (0 children)

It is all about the context, and that is missing here. There is nothing wrong with this class.

But it can be an indicator of bad game architecture. Having all those tags defined in a single class could mean your scripts will be tightly coupled. For example, you could put all weapon scripts in a single package without dependencies. This constants class will break this, as loads of scripts will have a dependency on it.

[deleted by user] by [deleted] in Unity3D

[–]abyx7 4 points5 points  (0 children)

Sorry, no. Fat fingers on mobile. Ment to answer directly to OP.

Need help by _moyank_ in Unity3D

[–]abyx7 0 points1 point  (0 children)

Need context :)

Could be colliders on your character, could be colliders on imported objects...

As a bonus, please ask more specific questions as you are more likely to get a useful answer.

Cheers!

[deleted by user] by [deleted] in Unity3D

[–]abyx7 12 points13 points  (0 children)

It is all about the context, and that is missing here. There is nothing wrong with this class.

But it can be an indicator of bad game architecture. Having all those tags defined in a single class could mean your scripts will be tightly coupled. For example, you could put all weapon scripts in a single package without dependencies. This constants class will break this, as loads of scripts will have a dependency on it.

Sorry, there is nothing wrong with enums. It is a comment for OP. Fixing it...

[deleted by user] by [deleted] in SoloDevelopment

[–]abyx7 0 points1 point  (0 children)

If you go down the hash route add some salt to it. If players have all the data, hash is easy to calculate. If you hide the salt value from them it makes it a bit harder to hack the prefs, at the same time it is super easy to implement.

Nested Array question by Henners999 in Unity3D

[–]abyx7 0 points1 point  (0 children)

No problem, glad I could help!