Stack Exchange - Game Development
2,399 FOLLOWERS
Game Development Stack Exchange is a question and answer site for professional and independent game developers.
Stack Exchange - Game Development
3d ago
public interface IVector3ValueList
{
public List<Vector3> GetVector3List();
}
public class Vector3ListGetter : IVector3ValueList
{
private List<float> xList, yList, zList;
public Vector3ListGetter(List<float> xList, List<float> yList, List<float> zList)
{
this.xList = xList;
this.yList = yList;
this.zList = zList;
}
public List<Vector3> GetVector3List()
{
float minX = xList.Min();
float minY = yList.Min();
float minZ = zList.Min();
// return ...
}
}
public class Start ..read more
Stack Exchange - Game Development
3d ago
I'd like to build a game engine once I'm done with my current project. I tried a while ago with the language I'm most proficient in (C++) but I ran into several issues--primarily stemming from the fact that memory management in C++ either requires the use of smart pointers (which are super clunky and annoying), destructors (which makes it near impossible to escape an object), or manually memory management (with .deinit() methods just screaming to cause a memory leak).
I'd like a language that is compiled, has no garbage collector pauses (so ARC is fine, so long as it isn't deferred like it is ..read more
Stack Exchange - Game Development
3d ago
There are many Unity assets that create simplified LOD's for many complex or big meshes. This LOD technique will make the apps run faster and more efficient.
I am new to Unity and LOD. So, I am curious about how LOD works. (I am sorry if my questions are too basic and not interesting.)
Here is the situation:
Suppose I have a BIG mesh with 20,000 triangles. Then, I use a Unity asset to create 3 LOD's for this BIG mesh. My questions are:
(1) If I generate 3 LODs for my original FBX (as mentioned above), does this mean this Unity asset will generate 3 separate FBX files for these 3 LODs, and stor ..read more
Stack Exchange - Game Development
3d ago
I have a 2D rope cutting game similar to cut the rope, and I want to add ropes that can be extended further than if it laid flat. Easy said: I want to stretch the rope.
Currently I have a parent game object, and following child objects:
Anchor Start
Rope 1
Rope 2
Rope 3
...
Rope 7
Anchor End
Each object has a hinge joint with the Rigidbody2D component set to the Rigidbody2D of the gameobject above in hierachy. Anchor End has Rope 7's Rigidbody2D, and Anchor Start has no Rigidbody2D. When I try to move an anchor far away from the other one, the rope parts glitch out.
Is there a way to spawn n ..read more
Stack Exchange - Game Development
3d ago
In OpenGL I am using the following construct to convert the depth to logarithmic:
gl_Position.z = 2.0*log(gl_Position.w/near)/log(far/near) - 1;
gl_Position.z *= gl_Position.w;
If in a fragment shader I want to read the depth value and undo the logarithmic part. How can I achieve that ..read more
Stack Exchange - Game Development
3d ago
I have a problem on the canvas. When I remove the camera in the FPS Controller player and UnChecked the FPS Controller it works but when the Camera is inside the the FPS Controller I can't click anything ..read more
Stack Exchange - Game Development
3d ago
I can load .pck file with ProjectSettings.load_resource_pack(...) method. But when it comes to load encrypted .pck file, I can't load. So how can I load encrtpted .pck file ..read more
Stack Exchange - Game Development
3d ago
I'm a newbie in game development and looking for some advice from the community about getting game assets. I've been messing around with Luma and Meshy for making 3D models, and they've been surprisingly not bad. But I'm kind of torn on whether diving into AI tools would make things easier or just be more of a headache.
I want to quickly build my small game. How can AI productivity tools support asset generation? What do I need to know about using them in place of traditional development practices ..read more
Stack Exchange - Game Development
3d ago
So I was making this demo scene where there are tons of shells(green little rectangles), and they come from a prefab with shader and material that supports GPU instancing. But when I check the FrameDebugger, I noticed that my shell draw calls are broken into 2 different draw calls. And the cause was just confusing to me: SRP Batcher.
As far as I know, the SRP batcher was not compatible with GPU Instancing in the first place. Why would SRP batcher just randomly has anything to do with GPU Instancing? Did it just randomly decide to break my draw call batch? What should I do to restore the batc ..read more
Stack Exchange - Game Development
3d ago
Like the title, I have a program drawing some cubes on screen, the problem appeared after I switched computers, from desktop to laptop (Which has a bigger resolution).
I'm using the half space algorthim to fill the triangles on the cubes, as such:
DIMENSION tr = new DIMENSION(tri.outline.x, tri.outline.y, tri.outline.w, tri.outline.h);
for(int x = tr.x; x < tr.w; x++){
for(int y = tr.y; y < tr.h; y++){
double ha = FNS.HalfSpace(a, b, x, y); // for A and B points
double hb = FNS.HalfSpace(b, c, x, y); // for B and C points
double hc = FNS.HalfSpace(c, a, x, y ..read more