• Ever wanted an RSS feed of all your favorite gaming news sites? Go check out our new Gaming Headlines feed! Read more about it here.
Status
Not open for further replies.

Weltall Zero

Game Developer
Banned
Oct 26, 2017
19,343
Madrid
This might be too specific a technical question, but a lot of you use Unity and I got good help last time.
So I implemented a procedurally generated tileset, which wasn't too difficult (aside from some weird quirks, and still figuring out rule tiles), but I'm having trouble figuring out how to handle the colliders.

So for some context, I'm making a game with the same viewpoint as Pokemon and I'm wondering how you actually handle overlapping sprites like this (ie. where a character overlaps with part of a house or a sign). I'm assuming for structures the collider covers them in their entirety, but for NPCs and the player the collider only covers their feet so they can "walk up" to anything properly?

QpiTegz.png


So my problem is that unlike Pokemon, I also still need things like enemy attacks to collide with the entirety of the player. Should I just use a separate collider in that case (and have that one ignored by stuff like buildings/structures?)

Depending on how physics-based or tile-based your game is, you may not want to use colliders at all. Even if you use colliders, you may want to use capsules rather than rectangles to make it easier for characters to navigate corners.

Re: buildings: depends on what you want to do. If you want your characters to walk behind buildings, then the building collider would only be its base. If you want to prevent this, then yeah, it would be the entire building sprite.

Re: enemy attacks: you could indeed use different colliders, but I would certainly would not; I'd still use the smaller, player-feet collider. It just feels wrong that an enemy can hit you by visually grazing your sprite's head, even though logically their attack wouldn't have actually reached the tile where your character is standing. To take it to its logical extreme, It just doesn't make sense that an enemy attacking from the north is able to hit e.g. a very tall character from far away.

In general, try to keep player hurtboxes and enemy hitboxes small, while keeping player hitboxes and enemy hurtboxes big. It's always more satisfying to err on the side of the player whenever their attacks graze enemies or viceversa.
 

dannymate

Member
Oct 26, 2017
644
So my problem is that unlike Pokemon, I also still need things like enemy attacks to collide with the entirety of the player. Should I just use a separate collider in that case (and have that one ignored by stuff like buildings/structures?)
So if I understand you're question: How do you handle collision and getting hit when one collider doesn't fit both cases at the same time?

Now as a preface I don't typically make 2D stuff so I can't say if what I'm writing would be best practice.

Yeah it's perfectly fine to have multiple collider2d for one entity. I had a similar problem with a game jam game I made. What I did was have a 'hitbox' gameobject under a "PlayerHitbox" layer and a seperate game object with the physical collider (default or custom layer depending on what functionality you want), these were both parented to the same gameobject. (You can also have the physical collider component in the parent gaemobject itself if you prefer). You can also do the same with the enemies.

I would then use the Layer Collision Matrix and only let the "PlayerHitbox" layer interact with say "EnemyAttack" colliders. That way you can make the hitbox as big or small and offset however you want.
 
Oct 27, 2017
42,700
Depending on how physics-based or tile-based your game is, you may not want to use colliders at all. Even if you use colliders, you may want to use capsules rather than rectangles to make it easier for characters to navigate corners.

Re: buildings: depends on what you want to do. If you want your characters to walk behind buildings, then the building collider would only be its base. If you want to prevent this, then yeah, it would be the entire building sprite.

Re: enemy attacks: you could indeed use different colliders, but I would certainly would not; I'd still use the smaller, player-feet collider. It just feels wrong that an enemy can hit you by visually grazing your sprite's head, even though logically their attack wouldn't have actually reached the tile where your character is standing. To take it to its logical extreme, It just doesn't make sense that an enemy attacking from the north is able to hit e.g. a very tall character from far away.

In general, try to keep player hurtboxes and enemy hitboxes small, while keeping player hitboxes and enemy hurtboxes big. It's always more satisfying to err on the side of the player whenever their attacks graze enemies or viceversa.

Thanks for the suggestions. There was a video I watched (which I can't seem to find anymore) that went over the weird quirks of the 2D Zelda games when it came to perspective and combat. I think they tend to ere on the side of what visually collides instead of what actually collides, given the perspective and relative positions. I think that was just to alleviate potential player confusion. I'll probably mess around to see what works best for mine.

So if I understand you're question: How do you handle collision and getting hit when one collider doesn't fit both cases at the same time?

Now as a preface I don't typically make 2D stuff so I can't say if what I'm writing would be best practice.

Yeah it's perfectly fine to have multiple collider2d for one entity. I had a similar problem with a game jam game I made. What I did was have a 'hitbox' gameobject under a "PlayerHitbox" layer and a seperate game object with the physical collider (default or custom layer depending on what functionality you want), these were both parented to the same gameobject. (You can also have the physical collider component in the parent gaemobject itself if you prefer). You can also do the same with the enemies.

I would then use the Layer Collision Matrix and only let the "PlayerHitbox" layer interact with say "EnemyAttack" colliders. That way you can make the hitbox as big or small and offset however you want.

Yeah, I may end up using multiple colliders. I've definitely made use of the layer collision matrix, just to make things simpler
 

Weltall Zero

Game Developer
Banned
Oct 26, 2017
19,343
Madrid
Thanks for the suggestions. There was a video I watched (which I can't seem to find anymore) that went over the weird quirks of the 2D Zelda games when it came to perspective and combat. I think they tend to ere on the side of what visually collides instead of what actually collides, given the perspective and relative positions. I think that was just to alleviate potential player confusion. I'll probably mess around to see what works best for mine.

Yeah, I may end up using multiple colliders. I've definitely made use of the layer collision matrix, just to make things simpler

Probably obvious but remember to make the hitbox a trigger (non-physical) collider, while the movement one should be kept as physical if you're using Unity's physics for movement.
 
Oct 25, 2017
682
I'm quickly realizing that I'm going to need a lot of tools to keep making these puzzles. I'm on making my second puzzle, and it's a lot of labor to write it out. I'm also suspecting one of my mechanics isn't obvious enough, as I keep having to reference mappings rather than having a good idea what the answer should be...

More of a code-side question, but json or DBs? I've been storing everything in json for now, which is fine while I'm hacking things together and want to change them, but I've been wondering if I should put everything into a DB when it's finalized.
 

wwm0nkey

Member
Oct 25, 2017
15,553
Re-trying my Betrayal at House on the Hill re-imagining and for like 1 day of work it's turning out nice, mostly thanks to Dungeon Architect making it real easy for me to get tile generation in here rather than just pure random madness.

NCczQnS.jpg


Still a lot to do, like actually make more new tiles for random generation, but after I have all the ones I need and generation works well with them I am going to try a rough "on paper" play through up until a Haunt is triggered, after that I need to network it and test out the paper play through there and it's time to actually do some gameplay lol

For those who have never played the board game, essentially what is going to happen is there are room tiles with omens in them, after one is triggered a random roll is going to happen, if the roll is lower than the total active omens a haunt starts and one player will betray the group, but they won't know they are the traitor until the haunt actually starts.The haunt rules are 100% different depending on what room and what omen was triggered.
 

Toma

Scratching that Itch.io http://bit.ly/ItchERA
Member
Oct 25, 2017
5,831
Good evening fellas, I do have my fair share of experience with testing and giving impressions on Indie Games for like a million years and built up my own website for impressions now. Someone has brought to my attention that I could offer some help to our resident indie dev community to give some feedback if you guys want it :)

I cant offer an in depth analysis thesis, but I'll take a few minutes to dig into whatever you guys have and give you some general feedback if there are any takers. You can just poke me via private message or quote this post.

Thanks for working on your dreams everyone! I started building my own dream games so many times and failed miserably every time. I would love to at least support other Indie devs a bit.
 

Weltall Zero

Game Developer
Banned
Oct 26, 2017
19,343
Madrid
Good evening fellas, I do have my fair share of experience with testing and giving impressions on Indie Games for like a million years and built up my own website for impressions now. Someone has brought to my attention that I could offer some help to our resident indie dev community to give some feedback if you guys want it :)

I cant offer an in depth analysis thesis, but I'll take a few minutes to dig into whatever you guys have and give you some general feedback if there are any takers. You can just poke me via private message or quote this post.

Thanks for working on your dreams everyone! I started building my own dream games so many times and failed miserably every time. I would love to at least support other Indie devs a bit.

Thank you for the offer! Already took it with Divinoids and the feedback has been awesome. :)

General question to all Unity users — what are your favourite assets on the asset store, both free and paid?

I don't use any other than Rewired, but that one is kind of essential if you're making a controller-based game. To be fair I haven't given the new Unity control system a try, but Rewired is so complete, exhaustive and "just works" with so many controllers that I doubt I'll ever give the former a try.
 

wwm0nkey

Member
Oct 25, 2017
15,553
Got a FP controller in my project now and added a stamina system, still need to do the new tiles that's didn't come from dungeon Architect, but its coming along. Afterbthe tiles are in and working my wife is going to model them while I work on getting a haunt to trigger correctly.

 

Darksol

Member
Oct 28, 2017
1,704
Japan
Thanks for the unity suggestions all — some cool stuff in there. We're doing a 2D platformer so some are more useful than others, but still, I'm definitely gonna have fun perusing the asset store once my pc arrives.
 
Oct 25, 2017
682
Making the inventory screen for my game lately, does this layout look good enough? Everything is pretty placeholder so I'm open for any feedback!


I'd move the numbers a bit closer to the centre of the item personally. They feel just outside enough to be awkward to look at, where they barely overlap while still being mostly outside. Otherwise, I think it looks fine without knowing anything about your game (I haven't looked into it as of posting). I'd only worry if you plan to have a lot of items, as 2 rows of 6 can lead to a lot of scrolling with that text box there.
 

kombucha

Alt-Account
Banned
Jan 15, 2021
94
A friend of mine just sent me this:
www.humblebundle.com

Humble Learn Unity Game Development Bundle 2021

Kickstart your game development career. Get software like Complete Unity Developer 2D & Complete Unity Developer 3D. Plus, pay what you want & support charity!
The highest tier looks pretty comprehensive. Thoughts? Anyone has any experience with gamedev.tv?

just do yourself a favour and use official unity learning courses, they are well designed and give you a brilliant intro and foundation to start with
 
Oct 20, 2018
1,281
Brazil
I'd move the numbers a bit closer to the centre of the item personally. They feel just outside enough to be awkward to look at, where they barely overlap while still being mostly outside. Otherwise, I think it looks fine without knowing anything about your game (I haven't looked into it as of posting). I'd only worry if you plan to have a lot of items, as 2 rows of 6 can lead to a lot of scrolling with that text box there.

I see what you mean, I'll definitely move the numbers then, thanks a bunch! As for the number of item slots, I'll still adjust it later to make them smaller (gotta make that inventory title text smaller too), I'm going for a 3x6 or 4x6 grid probably, depends on the number of items I'll have in the game. It's definitely not gonna have scrolling though, since this is gonna be a Zelda-like it's not gonna have that many items to justify that.
 

kombucha

Alt-Account
Banned
Jan 15, 2021
94
Oh wow, I didn't even know about these; thank you! They sure do a monumentally shitty job of cross-referencing them from their very own documentation or anywhere else. :S
I recommend this one to start with
learn.unity.com

Create with Code Live - Summer 2020 - Unity Learn

If you're an emerging intermediate programmer interested in developing a portfolio piece, join the Create with Code: Game Jam on October 23, 2020. This version of Create with Code Live was held July - September 2020.

They've done a lot of live streams during the summer in which they debugged stuff and added new features, answered a bunch of questions, so I'd recommend watching those as well.
 

jblanco

Member
Oct 27, 2017
1,489
With all this cold and snow in the Seattle area I figured I would make #screenshotsaturday winter themed. :)
 
Oct 20, 2018
1,281
Brazil
Was messing around with this pretty grass shader and I'm not sure if I'll keep it or not just yet but I really dig this juxtaposition of modern graphics with retro-looking lowpoly models.

 
Oct 20, 2018
1,281
Brazil
Joyce is a very kind person and incredibly humble! Great to see someone else talking about how helpful her posts are!

I just found her stuff the other day and yeah she makes lots of good posts! Her game is looking super nice as well. Feels like everytime I think "damn, X would make my game look real nice" she comes out with a tutorial for exactly what I need (I was literally looking for grass shaders with player interaction a week ago then I saw this).
 

K Monkey

Member
Oct 25, 2017
278
Just saw in the Nintendo eShop charts (download only games) for North America that my game reached 19th position on week beginning 13th Feb 2021!

It was as high as 18 yesterday so hopefully the trend continues :)

 

Weltall Zero

Game Developer
Banned
Oct 26, 2017
19,343
Madrid
Just saw in the Nintendo eShop charts (download only games) for North America that my game reached 19th position on week beginning 13th Feb 2021!

It was as high as 18 yesterday so hopefully the trend continues :)



Wow, that's massive, congratulations! Bodes very well for Ergastulum, which somehow I just now realized it's the third one in the series. :)
 

Mike Armbrust

Member
Oct 25, 2017
528
hapax15.png


I've never worked on something this high fidelity before. It's addictive and is genuinely hurting my gameplay. I keep getting distracted making small improvements instead of focusing on critical challenges that will block me from releasing.

I still don't have an ending yet I'm making a character model in a 100% first person game...


EDT:

Speaking of distractions... I moved most of my UI to smartwatch style wristbands. The text scrolls around them and can be freely edited. Kinda like health display in Dead Space, but more immersive and less critical for gameplay.

dev59.png


Although I don't have this model rigged yet, so I had to improvise when testing out the view.

hapax23.png
 
Last edited:

fiskyfisko

Member
Mar 23, 2018
182
I released a demo of my souls-like rpg few weeks ago, it has cute antrho characters and hard combat. Give it a try if you like these kinda games! Any feedback appreciated.

 

K Monkey

Member
Oct 25, 2017
278

Scottt

Member
Oct 25, 2017
4,208
I'm inspired by MetaHuman to work on pulling a game idea from my imagination and into reality. Do you all think it will be a viable tool for someone like me? Are you planning to get into it?

Starting as an absolute beginner, I'd like to plan out a sort of learning curriculum that can build towards the specific plans for the game. Have any of you found websites like Coursera to be of use for your projects and learning?
 

Weltall Zero

Game Developer
Banned
Oct 26, 2017
19,343
Madrid
I'm inspired by MetaHuman to work on pulling a game idea from my imagination and into reality. Do you all think it will be a viable tool for someone like me? Are you planning to get into it?

Starting as an absolute beginner, I'd like to plan out a sort of learning curriculum that can build towards the specific plans for the game. Have any of you found websites like Coursera to be of use for your projects and learning?

Very much, yes!
https://www.resetera.com/threads/in...ome-help-learn-show-and-tell.463/post-5908836
 

Weltall Zero

Game Developer
Banned
Oct 26, 2017
19,343
Madrid
Wow, that course looks wonderful. Thank you! Do you find Unity to be more inviting to beginners than Unreal?

I have never used Unreal, but Unity is generally considered more inviting, especially since it uses C# rather than C++. It has its quirks like everything else, and I find myself cursing it occassionally, but overall it's not too hard to find how to do what you want. :)
 

Scottt

Member
Oct 25, 2017
4,208
I have never used Unreal, but Unity is generally considered more inviting, especially since it uses C# rather than C++. It has its quirks like everything else, and I find myself cursing it occassionally, but overall it's not too hard to find how to do what you want. :)

Maybe I'll start with Unity instead then. I'll at least work through Coursera to see how the learning curve feels. I'm so pumped--thank you again for your help. So far I have a score written but not an actual game, so I'm looking forward to adding that teensy element.
 

Weltall Zero

Game Developer
Banned
Oct 26, 2017
19,343
Madrid
Maybe I'll start with Unity instead then. I'll at least work through Coursera to see how the learning curve feels. I'm so pumped--thank you again for your help. So far I have a score written but not an actual game, so I'm looking forward to adding that teensy element.

Delighted to help, and let us know if you get stuck anywhere. :)
 

iHeartGameDev

Member
Feb 22, 2019
1,114


I'm really excited to share that I've had the opportunity to partner with the team at Unity to create a mini-series dedicated to beginners! I'm a firm believer that lowering barriers to entry and adding new faces to the gamedev community will only increase overall creativity, so when asked to take a look at the Lego Microgame and if I was interested in making a series on it, I was happy to say yes!

If you happen to jump into this thread out of curiosity and have ever thought about learning how to make games yourself, I don't think there's ever been a friendlier starting point!
 
Oct 26, 2017
3,915


I'm really excited to share that I've had the opportunity to partner with the team at Unity to create a mini-series dedicated to beginners! I'm a firm believer that lowering barriers to entry and adding new faces to the gamedev community will only increase overall creativity, so when asked to take a look at the Lego Microgame and if I was interested in making a series on it, I was happy to say yes!

If you happen to jump into this thread out of curiosity and have ever thought about learning how to make games yourself, I don't think there's ever been a friendlier starting point!


Congrats on that collab dude, very well done! The quality oozed out from the first one you did, glad to see you've stuck with it and are getting some recognition :)
 

Weltall Zero

Game Developer
Banned
Oct 26, 2017
19,343
Madrid


I'm really excited to share that I've had the opportunity to partner with the team at Unity to create a mini-series dedicated to beginners! I'm a firm believer that lowering barriers to entry and adding new faces to the gamedev community will only increase overall creativity, so when asked to take a look at the Lego Microgame and if I was interested in making a series on it, I was happy to say yes!

If you happen to jump into this thread out of curiosity and have ever thought about learning how to make games yourself, I don't think there's ever been a friendlier starting point!


This is fantastic. I'm now wondering if mods would allow you to make a thread about this for more visibility, or if that'd be considering self-promotion... probably wouldn't hurt to ask them.

Also massive congrats on the Unity collab!
 

iHeartGameDev

Member
Feb 22, 2019
1,114
This is fantastic. I'm now wondering if mods would allow you to make a thread about this for more visibility, or if that'd be considering self-promotion... probably wouldn't hurt to ask them.

Also massive congrats on the Unity collab!

Thanks so much Weltall Zero 😊

I wouldn't really know who to ask or how to phrase the forum thread without coming off like a used-car salesman lol!
 
Status
Not open for further replies.