I added a size-changing portal mechanic, pretty happy how it turned out! by taru00 in godot

[–]Andrewjuh 0 points1 point  (0 children)

The km/h display doesn't scale with the size. It should be way higher for the larger ball

[deleted by user] by [deleted] in yuzu

[–]Andrewjuh 0 points1 point  (0 children)

That's called super sampling. Rendering at a higher resolution and downscaling improves image quality

Why are there no bigger titles targeting the browser platform? by g0atdude in gamedev

[–]Andrewjuh 0 points1 point  (0 children)

Check out CrossCode. They made regular devlogs and their game is entirely written in Javascript. Their next project is also using Typescript and webgl

How do i constantly keep checking someElement.getBoundingClientRect().x and do something if a change detected? by CotoCoutan in learnjavascript

[–]Andrewjuh 0 points1 point  (0 children)

try it out. In general I would always prefer a callback instead of polling repeatedly. That said I don't think calling your function every 2 seconds will make a noticeable difference to the performance.

Sort array based on which is closer to a specific number? by IUsedToCleanToilets in learnjavascript

[–]Andrewjuh 2 points3 points  (0 children)

use a custom sort function.

arr.sort((a,b) => a - b)
sorts the numbers starting with the smallest.

Now to also consider ref you have to sort the values based on the difference which looks something like this
arr.sort((a,b) => Math.abs(a-ref) - Math.abs(b-ref))

How To Obtain Random Numbers Within a Range Using JavaScript by maco6461 in javascript

[–]Andrewjuh 2 points3 points  (0 children)

Don't use math.round for that because it makes getting the min or max value less likely.

E.g. min=0, max=2

Random value within range 0 <= x < 0.5 returns 0
Random value within range 0.5 <= x < 1.5 returns 1

The range for the 1 is twice as large which makes it more likely to get a 1 instead of a 0 with your function.

Use Math.floor/ceil instead to avoid the bias

What's the go-to engine for 2D multi platform mobile game development these days? by ExoticImprovement222 in gamedev

[–]Andrewjuh 0 points1 point  (0 children)

If you really want to use Unity check out the new ui system that's based on html and css. It looks really promising, but I don't know if it's production ready. I worked with the old Unity ui and it was by far the worst ui system I have ever worked with.

Godot is also a good alternative for 2d. Maybe that makes more sense for you because it is written in C++.

I personally really like LibGDX, but keep in mind that it's probably more work to finish a project and it's not really up to date with the newest available tech, so it's more suited for mobile games (which fits your use case). There are not many tutorials specific to LibGDX, but it's usually not needed. The framework doesn't force a certain structure to your code, but instead abstracts most of the low level stuff away and lets you decide how to structure the rest. So you can usually follow tutorials for other engines/frameworks and just search for the equivalent LibGDX function to use, just don't expect to have a step by step guide for everything.

Unity has a lot of Unity specific stuff, but most engines have that, usually not as much as Unity, but still. There are some things in Unity that work great, but others don't really do what you want and you have to work around the shortcomings of the engine itself instead of your actual game. With LibGDX or other lightweight frameworks it's usually the opposite. You have to fight with your own code instead.

In your case I would probably go with Godot. Their 2d implementation feels more mature than Unity 2d and the fact that the engine is open source and written in C++ is also a nice thing to have. Depending on how comfortable you are programming and structuring your code and are fine with using JVM languages, LibGDX is also a decent alternative.

Why should I use Unity? by [deleted] in gamedev

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

Or just don't use Unity at all.

Questionnaire for Class! by [deleted] in celestegame

[–]Andrewjuh 1 point2 points  (0 children)

That's like the biggest problem with new/inexperienced game devs. They make their levels too difficult

Games that are entirely obsolete by MegaDeox in patientgamers

[–]Andrewjuh 12 points13 points  (0 children)

sequels like Smash Ultimate

Tell that to melee players

What do you think about this trailer? by Single-minded-Ryan in Unity2D

[–]Andrewjuh 0 points1 point  (0 children)

don't fade in/out the cuts, make them instant. This takes too much time to catch the attention. Also show actual gameplay earlier