Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(1 edit)

Thanks for the comment and thank you also for actually going to check the source to fix some of the bugs.

I reviewed your pull request now and it's looking good so I will probably accept it and make a new build with those fixes. There was one thing about your fixes that I wanted to ask about. What does the ? exactly do in these lines: Transform transform = FindObjectOfType<Player>()?.transform;  ? I haven't seen that syntax before but if I can guess it correctly it might become handy in the future too.

Another thing: I would like to add special thanks mention to the game credits for your help if it's okay with you? Would you prefer to be credited with you itch.io username or something else? Or of course if you, don't want me putting any mention there, that's your call.

(+1)

The object?.function() is working like a 

if(object != null) object.function();

So, it is a short form to avoid null exceptions. Esp helpful when you are unsure is something is initialized and it's not really important that it happens. But it's still a null check so it's better to avoid it if it can be avoided. 

Another suggestion I would give you is to work more with [Serializedfield] instead of searching for components. The component search is very time-consuming. If you need to search for a component, try to avoid doing it in Update and if possible, cache it in a local variable in Start or Awake. I know it's not possible in all cases.

I tried to look for the stuck issue. But I could not figure it out... it might be fixed with the two ground detectors, at least you should be able to jump in that case. I think it was partly related to the fact that you were half off the platform.

(1 edit)

Yeah, I'm hoping getting stuck issue would be resolved by your fix. After thinking about it I suspect it might be related to a situation in which the character is physically colliding with the platform but the ground check claims the character to be on air applying constant downward velocity to the character which might then hinder sidewise movement.

Thanks for the explanation! It makes sense and will totally be useful to remember in the future. So would FindObjectOfType<Player>()?.transform then return null in case the object is not found?

About using FindObjects and GetComponents... I was prioritizing code writing speed over code execution speed because I had very limited time to work with the jam project. I know that they are slow but I believed this to be small scaled enough project that it wouldn't affect performance too much.

By the way, you did not answer to my last question about how would it be okay to mention you as special thanks in the game credits (and would you prefer your username or some other name to be used)?

(+1)

Oops... I missed the last part. Sure, Vendolis is the internet name that I generally use. Thanks a lot.

Yes "Transform transform = FindObjectOfType<Player>()?.transform" would result in null to be assigned and the .transform not to be executed. It is basically like the lines ends before the "?". 

And yes... yes I totally understand that time is an essential part of a Jam. I don't think anyone's code looks clean here.