156
News about the Unity engine and project showcases from Reddit. Made possible with @reddit2telegram (@r_channels).
Drawing Physics: Dynamic Lines that can be erased?
I'm working on a project that's a platformer, where you draw lines to platform off of. One type of line I want in the game is a line that falls from gravity after being drawn.
https://i.redd.it/if9fr4phmdne1.gif
What I've got so far is a line made up of smaller segments that are instantiated as the player draws with the mouse, that are all under a parent rigidbody. When the player stops drawing, that rigidbody is set to dynamic, and the entire line/shape the player drew falls as one object.
The main problem I'm having is being able to erase a small chunk of that shape, and have the physics work accordingly. In the first gif, If the player draws a straight line and cuts it in half by erasing, the left and right portions of the line go into their own parent rigidbodies, and now these segments each have their own physics.
However in the second gif, if the player draws a loop, where two portions of the line cross over each other, and then erase in the middle of that loop, the game needs to recognize that the shape is still "solid" and connected. I'm struggling to find a solution for this. I considered having each segment of the line recognize which ones it was touching as the line was being drawn, but objects under the same rigidbody don't detect triggers/collisions with each other.
https://i.redd.it/zpjnkhcimdne1.gif
I'd appreciate if someone can help me figure this out, I'm still a beginner to Unity. Thanks!
https://redd.it/1j670tg
@r_Unity3D
I love my new bullet seeking ability.
https://redd.it/1j63tfj
@r_Unity3D
Why would you want to use ScriptableObjects?
Hello I'm a newbie to Unity and C#, but I'm a senior dev working with TS in my day job.
Currently I'm having a hard time understanding why I would want to use ScriptableObjects. Say for example I want to create a CardData SO
using UnityEngine;
CreateAssetMenu(fileName = "CardData", menuName = "ScriptableObjects/CardData", order = 0)
public class CardData : ScriptableObject
{
public CardId Id;
public string DisplayName;
public CardCategory Categories;
public Sprite CardImage;
TextArea(3, 10)
public string Description;
public CardRarity Rarity;
public int BaseSellPrice;
}
I could create bunch of these scriptable objects in my Resources folder, but I've found two major problems with it.
1. Refactoring a property/field to be a different name completely wipes the corresponding data from the SO instance. Meaning if I had 100 card SOs that property value would be completly wiped even though I just wanted to rename the field.
2. Can't just CRTL+F the codebase and find particular values like searching a card by its name. Well not unless you include .asset files to show up in your editor which bloats everything
3. Overall its generally a bit clunkier to edit values in the Unity Edtior vs the IDE, as a solo indie dev I don't get why I would want to do that in the Unity Editor
Please tell me I'm missing something here because its really looking like static classes extending an interface/abstract class is the way to go here.
https://redd.it/1j63p2q
@r_Unity3D
I've been working on a little Couch Multiplayer game on my free time and I just made the Steam Page public!
https://redd.it/1j5xv6s
@r_Unity3D
How to implement falling tiles like the sand tiles in Terraria for a 2d mining game
I'm making a 2d mining game with tilemaps and I want to implement a mechanic where if you destroy a "sturdy" tile on the ceiling of a cave for example and above that tile is a "falling" tile like a sand tile, that tile would fall to the ground below, along with its colliding tiles above, and deal damage to the player if standing below. How would you go about coding a mechanic like this? I just started learning programming and I'm really lost here/ struggling to find any resources online. I would really appreciate it if someone could point me to the right direction! Thanks! 🙏😊
https://redd.it/1j5w70s
@r_Unity3D
I made my first $50 with my free mobile game!
Hello fellow devs!
I just hit $50 in revenue with my free mobile game. It’s not a lot, but it’s honest work!
I wanted to share a breakdown of what worked, what didn’t, and what I’ve learned along the way.
How does my free game make money?
My game monetizes through in-app purchases (IAPs) and rewarded ads—but no banners or interstitials.
I aim for fair progression, but players can speed things up by watching ads or purchasing items. Despite having a very low DAU (\~10 daily active users), I still manage to earn $1.50 to $2.50 per day from ads.
I know a lot of people dislike ads in mobile games, and I totally get why—especially compared to PC/console experiences. However I still considere my content pretty 'fair' compared to the mobile game market.
How am I getting players?
So far, all my traffic is organic. I’ve mainly promoted my game by posting on various subreddits.
r/gamedev & r/unity3D – Great for exposure, but not really my target audience.
r/IOSGaming & r/AndroidGaming – Better conversion and engagement rates!
I also try to post when my target audience is online using tools like LaterForReddit. Not sure how much of a difference it makes, it might be totally useless.
What I’m working on now
Right now, I’m gathering as much player feedback as possible to improve progression, balance, onboarding and overall polish
I’ve already reworked multiple parts of the game, and I’m constantly iterating based on feedback.
Future plans (next 3-4 months)
I’ll be expanding my marketing efforts beyond Reddit, focusing on TikTok & YouTube Shorts – Posting short videos about the game’s development, gameplay, and behind-the-scenes content.
Advice for fellow indie devs
One big lesson I’ve learned: Even harsh criticism can be valuable.
Yeah, some people will be straight-up insulting, but there’s often a nugget of truth hidden in their feedback. Don’t let your ego block you from improving your game!
The Game :
If you want to try it out and give me feedbacks about what you did or didn’t liked, here are the link :
IOS: https://apps.apple.com/fr/app/zroad-survival/id6584530506?l=en-GB
ANDROID: https://play.google.com/store/apps/details?id=com.SkyJackInteractive.ZRoad
That’s it for now! If you have any tips, feedback, or just want to chat about mobile game dev, let me know! 😊
https://redd.it/1j5rzh7
@r_Unity3D
Spent 8 Years Developing my Unity Asset but its Finally Released (hope its worth it!)
8 years ago I was searching for a nice in-game developer console tool to use, something that lets me easily add commands, auto-complete, and whatever else you might expect (just like we had in the days of Source games!).
I didn't find anything I liked, some were too simple, some overly complicated, and so one thing led to another, and somehow I ended up spending years of on-and-off work developing my 'dream' console tool. My general goals were:
\- It must be extremely simple to install and use, while being very powerful. Usability shouldn't be sacrificed for power, nor the power for usability.
\- It must come 'batteries included' and look nice, but simultaneously be fully configurable
\- It must be high performance (1 million lines of logs was the benchmark)
\- It should be usable by both devs and users (if wanted by devs), to allow for the classic experience of shipping dev tools with your games!
Now I am very satisfied and proud to say that all this, and many other things, were achieved with the Ingame Developer Console!
Not only do we have installation by dropping 1 prefab and ability to have multiple setting profiles you can swap (e.g. different settings between mobiles and desktops), we also have syntax highlighting, autocomplete for commands, arguments, structs, overloads, game objects, and much more!
'Explode' command with 1 argument 'pos' of type Vector3, and the autocomplete options for pos
You can find detailed documentation here and a video here (please tell me if you want more tutorials on how to use it).
To celebrate the launch after all these years, I am giving away 5 free keys for the Ingame Developer Console and 5 free keys for my previous tool, the Visual Item Database.
If you want a key, please comment with which tool you are interested in (or both!). Its first come first serve.
Looking forward to hearing your feedback and questions!
Edit:
Wow thanks so much everyone for the positivity and comments, really appreciate it!
We have already ran out of console keys within minutes (!) but we have keys left for the visual item database (for now!).
Since we have such high demand, over the next 24h Ill randomly distribute 5 more keys for the console to those who are interested, so please leave your comments below!
Thanks again everyone!
https://redd.it/1j5nyl9
@r_Unity3D
Drawing a grid over a sprite
I'm making an isometric 2d game and i want to create a grid over a sprite (Table for example) so the players can place objects above sprites. I can't find any information related to this topic, i already created a tilemap and a grid for the floor but i'm not sure how to create another one over a sprite.
I would love to create a system like the "Unpacked" game has:
https://preview.redd.it/38hbyxy0i9ne1.png?width=1920&format=png&auto=webp&s=7a9f5bff68c8c97ae60671320f558e727a86ae8d
Thanks for the help in advance.
https://redd.it/1j5mg0z
@r_Unity3D
My game, We Could Be Heroes is OUT NOW on PlayStation 5, I'm pretty proud as a Unity solo dev.
https://redd.it/1j5k59z
@r_Unity3D
Does anyone wanna try my audiobook app for free?
https://youtu.be/xEgnmqoB2sY?si=u73HIQ3M_mkVXD8z
https://redd.it/1j5j1y2
@r_Unity3D
ChangeState in Update or FixedUpdate or somewhere else?
public class GroundState : State
{
public GroundState(Character character, StateMachine stateMachine)
: base(character, stateMachine) { }
public override void EnterState() { }
public override void UpdateState()
{
if (Input.GetKeyDown(KeyCode.Space))
{
character.jumpInput = true;
character.currentJumpCount++;
stateMachine.ChangeState(new JumpState(character, stateMachine));
}
if ((character.horizontalInput == 0))
{
character.moveInput = 0;
stateMachine.ChangeState(new IdleState(character, stateMachine));
}
}
public override void FixedUpdateState()
{
if (character.jumpInput == true)
{
character.rb.linearVelocity = new Vector2(
character.rb.linearVelocity.x,
character.jumpForce
);
character.jumpInput = false;
}
if (character.moveInput == 0 && !(stateMachine.currentState is IdleState))
{
character.rb.linearVelocity = new Vector2(0, character.rb.linearVelocity.y);
}
}
Hey, I'm still a beginner but I have a question that bothers me a lot. I heard that you should do statechanges in Update, but that causes problems for me. If my character jumps from GroundState into JumpState (child of AirState), he still counts as grounded and turns Idle before Falling even though he's in the air. I CAN fix this by putting the ChangeState() into FixedUpdate and just use Update to store the input, but I feel that could cause other problems with different framerates, FixedUpdate is always just recommended for physics updates. So, where do people put these ChangeState() methods?
https://redd.it/1j5fzus
@r_Unity3D
I liked how the piston animation turned out
https://redd.it/1j5bgzu
@r_Unity3D
Super Tony Hawk Galaxy - Added rocket and 2 planet shapes
https://redd.it/1j56pmh
@r_Unity3D
Topdown movement relative to mouse
Hello everyone. I am trying to make a topdown movement like Darkwood. I am currently capeable of making it so player rotates towards mouse and w moves forward relative to mouse and s backwards relative to mouse, my problem is figuring out how to strafe A and D Relative to the players orientation (way they are facing) right now it is relative to mouse. But that makes player strafe in a circle around the mouse.
Ive tried alot of things but cant seem to get it to work.
My script looks like this currently:
using UnityEngine;
using UnityEngine.InputSystem;
namespace TopDown.Movement
{
RequireComponent(typeof(PlayerInput))
public class PlayerMovement : Mover
{
private Camera mainCamera;
private Vector2 inputDirection; // Holder styr på spillerens input
private void Start()
{
mainCamera = Camera.main;
}
private void Update()
{
// Når input er forskelligt fra nul, beregn bevægelse
if (inputDirection != Vector2.zero)
{
// Find musens position i world space
Vector3 mouseWorldPos = mainCamera.ScreenToWorldPoint(Input.mousePosition);
mouseWorldPos.z = 0; // Sikrer 2D-space
// Retning fra spilleren til musen
Vector3 directionToMouse = (mouseWorldPos - transform.position).normalized;
// Strafe vektor (venstre og højre i forhold til musen)
Vector3 strafeDirection = new Vector3(directionToMouse.y, -directionToMouse.x, 0);
// Bestem bevægelsesretning: frem mod musen og strafe i den retning
currentInput = (directionToMouse inputDirection.y) + (strafeDirection inputDirection.x);
}
else
{
// Stopper bevægelse når inputDirection er nul
currentInput = Vector3.zero;
}
}
private void OnMove(InputValue value)
{
inputDirection = value.Get<Vector2>();
// Gem input
}
}
}
https://redd.it/1j57c7j
@r_Unity3D
Looking for Feedback on Our Character Selection Panel – What Do You Think?
https://redd.it/1j53ijr
@r_Unity3D
Planets (Space) See Down Below!
https://redd.it/1j64evs
@r_Unity3D
How to make Speed Power Up temporary?
https://redd.it/1j63pi3
@r_Unity3D
The player can now control the hue of the computer screens in my game because why not!
https://redd.it/1j5yg4v
@r_Unity3D
Uhh I've decided to use PID controllers for my turrets to make them more silly 🤗
https://redd.it/1j5sqoy
@r_Unity3D
Classes in Unity
I'm new to unity but I have a reasonable amount of programming experience in python. I'm working on a shooter game but need a little help understanding how classes work in unity.
For example, for my item system, my first thought is to create an 'Item' class, and then have a 'Weapon' class that inherits from Item so that weapons can be treated as items while having extra functionality. However, I'm not sure how I would do something like this in unity (What's the difference between a GameObject and an object, is a prefab a type of class, etc).
I'd appreciate any help/advice either in general with classes in unity, or possible implementations of the specific example given.
Thanks
https://redd.it/1j5uedk
@r_Unity3D
We're working on a Lava biome in our indie game, based solely on how it looks how would you expect it to impact gameplay? we're trying to improve how we communicate with the player without literal instructions.
https://redd.it/1j5pb5l
@r_Unity3D
Taming a Piglet with a Skill-Based Lasso Minigame
https://redd.it/1j5ojbs
@r_Unity3D
What started as a side project over 4 years ago has grown beyond what I ever imagined - I am officially Publisher Of The Week 🔥 Here is a showcase of the 'Erosion Fractal Noise' I recently added in the free gift asset, tell me what you think about it! (Link in comments)
https://redd.it/1j5kgia
@r_Unity3D
I’ve started developing a new game and would love for you to try the playtest and share your thoughts! Link to Itch.io in the comments.
https://redd.it/1j5edk1
@r_Unity3D
My MadeInUnity game called Bao Bao's Cozy Laundromat, an idler about pandas running a laundromat is out now. Feel free to give it a try. Links in the comment below.
https://redd.it/1j5ieuo
@r_Unity3D
What do you think of the new title screen for my game?
https://redd.it/1j5g8vc
@r_Unity3D
police man vs gangster
https://redd.it/1j59i82
@r_Unity3D
I'm so excited to see what you have to say about our game. Screen Pets releasing on steam on April 2.🐱🐶🦊🦝🐧🐇🦔🐹
https://redd.it/1j577w3
@r_Unity3D
Unity Selection Wheel Menu : Learn How to Make a Circular Selection Menu in Unity 6
https://youtu.be/JhLKIvE285A
https://redd.it/1j5217r
@r_Unity3D
Me getting crushed under the weight of a task that turned out heavier than expected...
https://redd.it/1j52gbw
@r_Unity3D