News about the Unity engine and project showcases from Reddit. Made possible with @reddit2telegram (@r_channels).
After a long time on and off learning Unity I finally finished a silly little game
I started to learn a little bit of Unity years ago. I always had these little burst of motivation for about a week, gave up again until I started again months later and gave up again.
I want to finally really start learning development and I just finished my first project and uploaded it to Itch.
https://dv-rain.itch.io/snakepong
I actually just took Snake and Pong and put it together, so not really an original game (although I think this twist is quite fun and challenging)
But it feels good to finally make it a "complete game" that is playable with a menu, options, a bug-free experience (?) and I also think the visuals and sounds are kinda nice.
If a single person will ever have fun with it for just a few minutes I'm happy.
Now on to my next project, can't wait to learn more.
https://redd.it/1j48w0t
@r_Unity3D
I tried making a cozy game. I was terrible at it, so I made this 😇
https://redd.it/1j45mgh
@r_Unity3D
Nintendo 64 Style Lighting - Update
https://redd.it/1j41f29
@r_Unity3D
How can I create this weird style?
https://redd.it/1j3zk58
@r_Unity3D
My approach to Jump Buffers for the perfect feeling jump / double jump
When it comes to a fantastic feeling jump and responsive controls, input buffers and jump buffering is a no brainer. This is when you detect the player has pressed a button too early (sometimes by only a frame) and decide it was close enough. Without this, your controls can feel like your button presses did literally nothing if you aren't perfect.
On my quest to create a down right sexy feeling jump/movement, I encountered some things I just wanted to vent out for others to see. Mini dev log I guess of what I did today. This will be geared towards Unity's Input System, but the logic is easy enough to follow and recreate in other engines/systems.
________________________________________________________________________________________
There are a few ways to do a Jump Buffer, and a common one is a counter that resets itself every time you repress the jump button but can't yet jump. While the counter is active it checks each update for when the conditions for jumping are met, and jumps automatically for you. Very simple, works for most cases.
However, let's say your game has double jumping. Now this counter method no longer works as smooth as you intended since often players may jump early before touching the ground meaning to do a normal jump, but end up wasting their double jump. This leads to frustration, especially hard tight/hard platforming levels. This is easily remedied by using a ray cast instead to detect ground early. If you are too close, do not double jump but buffer a normal jump.
My own Player has children gameobjects that would block this ray cast so I make sure to filter the contact points first. A simple function I use to grab a viable raycast that detected the closest point to the ground:
private RaycastHit2D FindClosestGroundRaycast()
{
List<RaycastHit2D> hitResults = new();
RaycastHit2D closestHittingRay = default;
Physics2D.Raycast(transform.position + offset, Vector2.down, contactFilter, hitResults, Mathf.Infinity);
float shortestDistance = Mathf.Infinity; // Start with the maximum possible distance
foreach(RaycastHit2D hitResult in hitResults)
{
if(hitResult.collider.tag != "Player") // Ignore attached child colliders
{
if (hitResult.distance < shortestDistance)
{
closestHittingRay = hitResult;
shortestDistance = hitResult.distance;
}
}
}
return closestHittingRay;
}
RaycastHit2D myJumpBufferRaycast;
FixedUpdate()
{
myJumpBufferRaycast = FindClosestGroundRaycast();
}
But let's say you happen to have a Jump Cut where you look for when you release a button. A common feature in platforming games to have full control over jumps.
There is an edge case with jump cuts + buffering where your jumps can now be buffered and released early before even landing if players quickly tap the jump button shortly after jumping already (players try to bunny hop or something). You released the jump before landing, so you can no longer cut your jump that was just buffered without repressing and activating your double jump! OH NO :L
Luckily, this is easily solved by buffering your cancel as well just like you did the jump. You have an detect an active jump buffer. This tends to feel a little off if you just add the jump cancel buffer by itself, so it's best to wait another few frames/\~0.1 seconds before the Jump Cancel Buffer activates a jump cut. If you don't wait that tiny amount, your jump will be cut/canceled it the literal frame you start to jump, once again reintroducing the feeling of your jump button not registering your press.
I use a library called UniTask by Cysharp for this part of my code alongside Unity's Input System, but don't be confused. It's just a fancy
Whats with all the same re-skinned simulator games recently?
You might have noticed it as well. The same basic gameplay just slightly different theme popping up recently. Here is the list i have found so far:
* [TCG Card Shop Simulator](https://store.steampowered.com/app/3070070/TCG_Card_Shop_Simulator/)
* [Internet Cafe & Supermarket Simulator 2024](https://store.steampowered.com/app/2738380/Internet_Cafe__Supermarket_Simulator_2024/)
* [Supermarket Simulator](https://store.steampowered.com/app/2670630/Supermarket_Simulator/)
* [MALL MANAGER SIMULATOR](https://store.steampowered.com/app/3092980/MALL_MANAGER_SIMULATOR/)
* [Grocery Store Simulator](https://store.steampowered.com/app/2961880/Grocery_Store_Simulator/)
* [Tech Market Simulator](https://store.steampowered.com/app/3225600/Tech_Market_Simulator/)
* [My Café Manager Simulator](https://store.steampowered.com/app/3078950/My_Caf_Manager_Simulator/)
* [Fast Food Simulator](https://store.steampowered.com/app/2916430/Fast_Food_Simulator/)
* [Grocery Store Tycoon](https://store.steampowered.com/app/2870330/Grocery_Store_Tycoon/)
* [Liquor Store Simulator](https://store.steampowered.com/app/3124550/Liquor_Store_Simulator/)
* [Hotel Owner Simulator](https://store.steampowered.com/app/3158480/Hotel_Owner_Simulator/)
* [Cinemaster Cinema Simulator](https://store.steampowered.com/app/3327470/Cinemaster_Cinema_Simulator/)
* [Laundry Store Simulator](https://store.steampowered.com/app/3150440/Laundry_Store_Simulator/)
* [Hardware Store Simulator](https://store.steampowered.com/app/3358560/Hardware_Store_Simulator/)
All using the same asset packs. A lot of them published by Playway
Seem to be using a very similar asset package such as:
* https://assetstore.unity.com/packages/templates/packs/checkout-frenzy-convenience-store-simulator-310321
* https://assetstore.unity.com/packages/templates/systems/market-shop-store-and-retail-game-creator-for-both-pc-and-mobile-291107
* https://assetstore.unity.com/packages/templates/systems/store-simulator-supermarket-game-template-309463
Does anyone have any idea whats going on here? Or is it just a trend thats currently popular?
https://redd.it/1j3uy51
@r_Unity3D
Original Seinfeld Pixel Art Illustration
https://redd.it/1j3s635
@r_Unity3D
I've got hand-painted backgrounds projected on 3D. It's not efficient, but the dynamic lighting makes it worth it.
https://redd.it/1iyjndk
@r_Unity3D
Hey i released a short 10 minute demo for my game on steam if you want to take a break and play it don't hesitate !
https://redd.it/1iy8eev
@r_Unity3D
The effects of layoffs are beginning to show..
https://redd.it/1iy6n41
@r_Unity3D
testing new hands mechanic for horror game
https://redd.it/1ixxis6
@r_Unity3D
The most annoying thing here!
Every time i open up reddit i see the same question "HoW dO i GeT iNtO uNiTy AnD gAmEdEv?"
Let me tell you how to start and it only takes you 1minute:
Step 1: Give up if u dont know how to search up the other 10k posts that asked the same question this week ur not cut for gamedev!
And for all the others, can we pls stop responding and downvote those questions?
Ty byeeee
https://redd.it/1ixx8go
@r_Unity3D
Flip Improved in my game. what should I do next?
https://redd.it/1ixv4qp
@r_Unity3D
What (technically) makes Guns of Fury so buttery smooth?
https://youtu.be/0PVHGIuv4Sk?si=CjdSoDM_rO97kwRi&t=2857
https://redd.it/1j455xc
@r_Unity3D
Project DRAG - (Customize) - Open Beta
https://redd.it/1j445zt
@r_Unity3D
Help me understand why my first game is repulsive || Scary 10min median time played
My artist partner and I have been working for 10 months on our first game. And we saw the SNF as a perfect opportunity to release a Demo and see what the world could think about it.
It's been a great first experience for us. We gathered 1000 wishlist, which is always a pleasant milestone, but in the same time, clearly not enough to do anything.
What is the scariest is the average playtime stat... 10min ONLY !
Unfortunately, the one-to-one testing and our friends are probably to kind to tell us what is wrong with it, so I thought about sending this question to "The Internet", where people are more straight forward.
Here is our free demo link : https://store.steampowered.com/app/3403090/Fire\_Hero\_\_Pixel\_Rescue/
If some of you would be interested to test it out and tell us what is wrong, and why 70% of people stop after 10min, that would help us tremendously !
If my post is not appropriate to this subreddit, feel free to close it and tell me where I could ask this question.
Thanks a lot for your time <3
https://redd.it/1j42rfn
@r_Unity3D
GetTile is returning null
https://redd.it/1j3z3br
@r_Unity3D
coroutine-like function meant to be asynchronous. And my "CharacterController2D" is just a script for handling physics since I like to separate controls from physics. I can call it's functions to move my body accordingly, with the benefit being a reusable script that can be slapped on enemy AI. Here is what the jumping controls look like:
// Gets called when you press the Jump Button.
OnJump(InputAction.CallbackContext context)
{
// If I am not touching the ground or walls (game has wall sliding/jumping)
if(!characterController2D.isGrounded && !characterController2D.isTouchingWalls)
{
// The faster I fall, the more buffer I give my players for more responsiveness
float bufferDistance = Mathf.Lerp(minBufferLength, maxBufferLength, characterController2D.VerticalVelocity / maxBufferFallingVelocity);
// If I have not just jumped, and the raycast is within my buffering distance
if(!notJumpingUp && jumpBufferRaycast.collider != null && jumpBufferRaycast.distance <= bufferDistance)
{
// If there is already a buffer, I don't do anything. Leave.
if(!isJumpBufferActive)
JumpBuffer(context);
return;
}
// Similar buffer logic would go here for my wall jump buffer, with its own ray
// Main difference is it looks for player's moving horizontally into a wall
}
// This is my where jump/double jump/wall jump logic goes.
// if(on the wall) {do wall jump}
// else if( double jump logic check) {do double jump}
// else {do a normal jump}
}
// Gets called when you release the Jump Button
CancelJump(InputAction.CallbackContext context)
{ // I have buffered a jump, but not a jump cancel yet.
if(isJumpBufferActive && !isJumpCancelBufferActive)
JumpCancelBuffer(context);
if(characterController2D.isJumpingUp && !characterController2D.isWallSliding)
characterController2D.JumpCut();
}
private async void JumpBuffer(InputAction.CallbackContext context)
{ isJumpBufferActive = true;
await UniTask.WaitUntil(() => characterController2D.isGrounded);
isJumpBufferActive = false;
OnJump(context);
}
private async void JumpCancelBuffer(InputAction.CallbackContext context)
{
isJumpCancelBufferActive = true;
await UniTask.WaitUntil(() => characterController2D.isJumpingUp);
await UniTask.Delay(100); // Wait 100 milliseconds before cutting the jump.
isJumpCancelBufferActive = false;
CancelJump(context);
}
Some parts of this might seem a bit round-about or excessive, but that's just what was necessary to handle edge cases for maximum consistency. Nothing is worse than when controls betray expectations/desires in the heat of the moment.
Without a proper jump cut buffer alongside my jump buffer, I would do a buggy looking double jump. Without filtering a raycast, it would be blocked by undesired objects. Without dynamically adjusting the buffer's detection length based on falling speed, it always felt like I either buffered jumps way too high or way too low depending on how slow/fast I was going.
It was imperative I got it right, since my double jump is also an attack that would be used frequently as player's are incentivized to use it as close to enemy's heads as possible without touching. Sorta reminiscent of how you jump on enemies in Mario but without the safety. Miss timing will cause you to be hurt by contact damage.
It took me quite some attempts/hours to get to the bottom of having a consistent and responsive feeling jump. But not many people talk about handling jump buffers when it comes to having a double
How do I get rid of this line in my custom Unity shader?
https://redd.it/1j3vh9f
@r_Unity3D
Planning on verticality, so that means… Double Jump! 🦘🦘
https://redd.it/1j3sziw
@r_Unity3D
Made this physics based ship controller for my game. What can i improve?
https://redd.it/1j3gfm0
@r_Unity3D
Is there a better way to handle events?
https://redd.it/1iyac8j
@r_Unity3D
Making a game where you can enslave a nest, slap thrusters on it, and create a mobile murder base. After 2 years of development, my vision is finally coming to light (regardless of the Geneva suggesti- I mean convention)
https://redd.it/1iyf8ie
@r_Unity3D
Tony Hawk in Space - What do you think of concept?
https://redd.it/1iy997a
@r_Unity3D
“Unity oyun cafe” is now closed
https://redd.it/1iy3e4g
@r_Unity3D
Finally wrapped up a new demo for our alchemic card adventure. What do you think?
https://redd.it/1iy0chb
@r_Unity3D
Growing up with LucasArts and the adventure magic of the 80s and 90s, we started hand-drawing our 2D adventure game in Unity3D 11 years ago. We're releasing Elroy and the Aliens on April 2nd!
https://redd.it/1ixvr1n
@r_Unity3D
Growing up with LucasArts and the adventure magic of the 80s and 90s, we started hand-drawing our 2D adventure game 11 years ago. We're releasing Elroy and the Aliens on April 2nd!
https://redd.it/1ixvbzm
@r_Unity3D