Trending questions
57,729 questions
0
votes
0
answers
34
views
How to draw and pick lots of smooth curving lines?
I'm trying to implement a Solar System Viewer similar to NASA's Eyes.
I got the astrophysical part (get positions of the bodies at any time)
but I wonder how to best get the orbital lines/trails (...
0
votes
0
answers
17
views
I'm trying to make a game with absolutely no experience, where do I start? [closed]
The game is called Cult of The Mindless. It follows Periwinkle and Winter in a supernatural fantasy world, where demonic forces have thought to have been long gone. However, a Satanic ruler wants to ...
6
votes
1
answer
975
views
Where do I find the explanation of some design patterns from "Game Mechanics: Advanced Game Design" book?
I have a paperback version of "Game Mechanics: Advanced Game Design" (2012) by Ernest Adams and Joris Dormans.
The book contains diagrams of multiple design patterns and refers to Appendix B ...
0
votes
0
answers
36
views
Why does the output of GUI.DrawTexture jitter in the SceneView when I scale it?
I am trying to draw an icon using GUI.DrawTexture at a world-space position iconPos to represent a sun icon.
It worked, but when ...
1
vote
1
answer
60
views
Applying localScale to elements in a verticalLayoutGroup with a gridLayout subgroup
I have a few elements inside a verticalLayoutGroup. To better visualize which one is selected, I would like to scale all other elements to 75% of their size and keep the current one as it is.
This ...
0
votes
0
answers
56
views
How to solve the issue in an HD-2D style Unity game where the upper part of the player’s sprite clips into the 3d wall when standing close to it?
I am making an Octopath Traveler like game.
I want the player to lean against a wall, but because the player’s sprite is angled while the wall is vertical, the player’s feet touch the wall while the ...
0
votes
1
answer
71
views
Increase the angle of a quaternion
I have the following quaternion, created from an angle and an axis
...
0
votes
0
answers
41
views
OBB SAT test with pre-scaled basis vectors
I am trying to do a SAT OBB collision test using OBBs that are represented as a 3D position (\$c_0\$ and \$c_1\$) and a 3x3 rotation/scale matrix (\$A\$ and \$B\$), where the columns of the rotation ...
0
votes
1
answer
67
views
How to program era-switching in an endless runner?
I'm using Unity's built-in 3D render pipeline, not the HD one. My extent of programming knowledge is basically whatever the learn.unity site provides. I decided my first game to make was going to be ...
1
vote
1
answer
63
views
Unity HDRP custom pass stencil buffer not working in build mode
I've been attempting to create this stencil/mask buffer using Unity's HDRP C# Custom Pass feature and I've been having trouble getting it to work ONLY in build mode. Here is my code:
In my ...
7
votes
4
answers
1k
views
Do customizable blank-slate protagonists limit the narrative potential of action RPGs?
I am examining protagonist design in action RPGs, and my conclusion so far is that fixed, authored protagonists consistently allow for deeper and more effective storytelling than blank-slate ...
2
votes
2
answers
982
views
Is it worthwhile to use events when there’s only one subscriber?
I'm trying to determine the best architectural approach for handling communication in Unity, specifically when the interaction is strictly one-to-one.
The Core Design Conflict
I have five crucial, ...
0
votes
0
answers
18
views
Computing minimum polygon separation along specific axis
I need to efficiently compute minimum polygon separation along X or Y axis, i.e. the distance you can move a polygon along X or Y until it collides with another one. I know how to calculate it, but ...
2
votes
1
answer
57
views
Best practice design for libgdx scene2d/box2d in different levels
I've started a libgdx game using scene2d and box2d. It's a 2D top down game, in which you can walk through the world, enter houses, etc. (think of Stardew ...).
I'm wondering, what is the best ...
0
votes
1
answer
56
views
Draw calls within SRP Batch
I noticed after I made a minimap for my 2d strategy game that there was significant lag - only to realize that every single hex is getting its own draw call/batch. I've been messing around for about a ...
12
votes
1
answer
2k
views
Destroying the parent when all children are destroyed
I have a spell system where a the spell is a self-contained game object handling all the logic. When done, it destroys itself. This works great
Then I added a second game object handling animation, ...
0
votes
3
answers
242
views
Do GPUs re-draw a all of a character's vertices/triangles/fragments every frame?
I'm a beginner in game programming and I want someone to confirm my understanding.
Let's say there's a 3D model for a character in the game. This character is made up of triangles. Each vertex in ...
1
vote
2
answers
197
views
Why is it so difficult to port Windows games to Linux?
Steve said said that Windows games won't run the same on Linux and you can't even test them equivalently because Linux doesn't know how to compute how many frames were generated in a second.
Aren't 3D ...
0
votes
0
answers
60
views
Need help on delta-time to fix jittering issue with 2D player controller
I'm trying to create a 2D side-scrolling player controller like Terraria but I can't get the delta-time right. If I set my laptop's mode to battery saver mode, my character jitters (from DT jitters) ...
-1
votes
0
answers
69
views
How to properly manage vertical offset for ghosts oscillating between tiles in Pac-Man ghost house
-2
I am implementing ghost behavior in a Pac-Man clone, specifically the behavior when ghosts are inside the ghost house during the waiting phase.
The issue is that ghosts inside the ghost house do ...
1
vote
1
answer
120
views
Decelerating player's momentum without changing direction
I'm adding deceleration to my player character, decreasing their velocity over time when the player releases the direction keys.
With the code below, at non-perfect angles, the character seems to re-...
1
vote
1
answer
80
views
Is there a "best practice" for making changes to packages
This could be answered from a perspective of Unity dev, or generically for programming - either would be beneficial.
I'm working on a game and am using two packages, More Mountains' TopDownEngine (for ...
3
votes
4
answers
276
views
How are deltatime overshoots typically dealt with--or are they dealt with at all?
So I was implementing deltatime adjustment into a game when I thought of this problem. Consider a control case, with no adjustment for framerate:
Here, our character jumps up to a max height of 12.5 ...
1
vote
0
answers
50
views
Procedurally generated 2D planets [closed]
I'm pretty new to making games, so excuse my ignorance if I say something stupid. I'm coding in cpp with raylib as a graphics thing. What I basically wanted to do is have procedurally generated ...
1
vote
1
answer
56
views
Capsule collision sticking in mirrored section of level
I have a problem with importing a 3D model from Blender into Godot 4. I created my apartment model in Blender and exported it as a .glb file into Godot 4.5. I generate the CollisionShape3D using Mesh →...
1
vote
1
answer
147
views
How does one efficiently render depth in an oblique top-down "2.5D" game?
I'm making a 2.5D game in Pygame with an oblique top-down view, where you can see both the top and front sides of the objects/environment, similar to top-down JRPGs and 2D Zelda games:
(Graphical ...
0
votes
2
answers
157
views
Does it make sense to use a compute shader with Dispatch(1,1,1) and Numthreads[1,1,1] to draw a cone?
I was working on this idea of drawing a cone rotating on the y axis with a parametric equation, using a compute shader with a function like:
...
0
votes
1
answer
152
views
How to make enemies spawn off-screen in Godot 4.5?
I am trying to make a game using Godot 4.5 where enemies spawn off-screen, but I faced this bug where they spawn on-screen instead:
The white squares are the spawned enemies and the red is the player....
0
votes
1
answer
143
views
In game engines and 3D rendering, which coordinate system results in the least amount of operations to transform and render scenes?
I understand this is a slightly esoteric question, but its something I've constantly asked myself over and over when using various 3D design tools and game engines.
In what way should models be facing,...
0
votes
0
answers
57
views
how to implement event system with SDL2?
I'm writing a C++ game engine using SDL2 and I have an SDL event loop, but I'm not really sure what I want to do with these events. I know that I'll have systems that will be interested in these ...
0
votes
0
answers
63
views
How to model tic-tac-toe as a Model View Controller Pattern in JavaFX?
I wrote a Board.java class which
draws the initial board
draws the Reset button
draws the label to indicate whose turn is it
In the Main class:
I initialized a Pane.
Initialized the Board's board ...
1
vote
1
answer
69
views
Sign out of Google Play Services through code
In the Unity engine, I am using GPGS as a token to log in via Google sign-in. It works, but now I have another issue:
As of the last update of the SDK 2.1., this method in PGS for Unity is deprecated:
...
3
votes
1
answer
168
views
What’s the correct / idiomatic way to pause a game in Unity?
I'm trying to implement a robust pause system in Unity and I'm confused about the correct approach. My first (very simple) implementation in my previous project used a ...
1
vote
1
answer
66
views
Animation can't disable gameobject
I'm using a very basic animation to create a transition, which involves deactivating a gameobject on the last keyframe.
Goal:
The ChangeRound animation is about 1 second long. It enables the UI image ...
0
votes
3
answers
163
views
How do big open worlds handle Object Pooling?
Object pools are great. They are fun to make, save you a lot of memory and fps.
But as my projects grow in size and complexity it gets harder and harder to work with them. If you only have a couple of ...
13
votes
4
answers
6k
views
Preventing meta communication in a massive multiplayer game
In developing a 4x multiplayer game where players should cooperate to implement any of the four Xs. I am interested in containing all information about the world and characters (players location, ...
0
votes
1
answer
69
views
Is an assumption of Welzl’s algorithm valid?
The stated assertion that a point outside some intermediate Minimum Enclosing Sphere is on the boundary of the final Minimum Enclosing Sphere seems unsupportable. It is true only for the first point ...
0
votes
0
answers
44
views
Coding a health and stamina bar above player in Adobe Animate
I am using Adobe Animate for my school assignment.
I have a three-segment health and stamina bar that is above the player (it isn't set to be attached to the player yet).
I have a single enemy ...
1
vote
1
answer
52
views
Can't get a Prefab to scale down accordingly inside a Container
I have a prefab with some fixed sizes on itself and its elements:
Then added a Aspect Ratio Fitter and a Preferred Height:
.
When using that prefab from a container with Horizontal Layout Group with ...
9
votes
6
answers
4k
views
How can I encourage players to play optimally against bosses?
I am making a shoot em up game with an aerial view. It’s main gimmick is that, instead of working like a machine-gun, your character throws a boomerang that hit the enemies both on the way there and ...
0
votes
2
answers
119
views
When should an object with a collider have a rigidbody?
I had some questions about Physics / Rigidbody in Unity.
I have a 2D sprite with a collider. The 2D sprite is simply a card that I place on a table with the mouse. I use the collider for raycasting (...
0
votes
0
answers
69
views
Applying greyscale shading to objects in a Python 3D renderer
I need help with how to apply greyscale shading to objects in a 3D renderer I made in Python. The code is pasted below:
...
0
votes
1
answer
46
views
Godot Multiplayer Player Doesn't Spawn
Godot Version
4.5 Stable
I'm trying to create a multiplayer game. Since this is my first multiplayer game I started with a simple LAN setup.
How it is supposed to work:
When ...
0
votes
0
answers
115
views
How do I render points in 3d space given spherical coordinates?
I have a 3d renderer I'm working on, and I need to know how the specific details of the human eye so I can project that to a coordinate, what is the math that does this given spherical coordinates and ...
0
votes
2
answers
128
views
Why is my rigidbody not moving when I press the buttons? I can't see any reason it shouldn't
The "Car" in question is a plane. The question is pretty self explanatory.
Here's the Car in the Hierarchy:
Here's the car in the inspector:
And here's the PlayerMovement script:
...
0
votes
1
answer
86
views
Can PNG format be used for alpha channel-packing for URP shader in Unity engine?
Note: I intend to use only the Inspector window to use all textures, not Shader Graph or Nodes or any custom scripts. Also I might use some technical terms incorrectly by mistake, as I'm not much ...
0
votes
1
answer
146
views
Rotation and unique identification
My question relates to content rotation and data management of the emerging objects in a database.
I assume a networked game, with a server-client model. Unspecified objects in the game world are ...
0
votes
0
answers
60
views
How to implement a bilateral filter in a shader?
I want to implement a bilateral filter because I have read the it preserves the edges. The equation is given as:
$$ BF\left[I\right]_p =
\frac{1}{W_p}\sum_{q\in S}
G_{\sigma_s}\left( \left\Vert p-q \...
0
votes
1
answer
126
views
Weird artifacts after baking in Unity
I am trying to bake a scene with these settings:
and getting artifacts like squares and noise on walls:
I did try to solve it for quite a while, checked this whole documentation, tried higher number ...
1
vote
1
answer
59
views
D3D11 type conversion rules
My understanding is that, in general, we can supply data to the GPU in some format (in D3D, as defined by DXGI_FORMAT_xxx) and it will be implicitly converted to ...