yst 12:00
1
Q: Translating Meta's .haptics file frequency and amplitude to Unity's left and right motor strength

Programmer9000Meta has an application called Meta Haptics Studio that allows you to create detailed haptic timeseries data. It outputs this data in the following format as amplitude and frequency information: "signals": { "continuous": { "envelopes": { "amplitude": [ { "...

Feb 5 04:11
1
Q: PGS solver leads to boxes spinning out of control or sliding out of stacks

Zoler1337I'm trying to implement a PGS solver for collision response, but I'm currently stuck. How the problem manifests is, for the example of a box resting on the ground, if the box is given a small rotation then it might spin out of control after a while. Also, boxes in a stack are not stable but slide...

Jan 25 15:04
1
Q: How to drag existing body to another position?

guest86I have a game object with a Kinematic body and a sprite. The object's "draw" method will always position the sprite to match a position of actual body, so the sprite is completely passive. Now, I have a situation where I want to hold a mouse button (or touch) over that body and draw that body to ...

Jan 24 22:43
1
Q: Is it bad practice to frequently write to `PlayerPrefs` in Unity?

RobinSuppose you were making a game in Unity and one part of the game was to store a high score, just stored as an integer. One could store the high score in Unity's PlayerPrefs. Would it be bad practice to frequently change values in PlayerPrefs? For example, if a player has a previous high score of ...

Jan 23 21:36
2
Q: Second URP Lit material shows pink on FBX model exported from Unreal 5

Jason CrosbyI'm trying to get materials working on a model imported into Unity 6, from Unreal Engine 5, but for some reason one of them isn't showing. I have played around with a few of the settings with no effect. Unreal 5 export settings Import settings Demon material Ax material How it renders in the ...

Jan 9 13:19
3
Q: As a solo developer, how best to avoid underestimating the difficulty of my game due to knowledge/experience of it?

RobinIn designing many different types of games where a player's skill is a factor in progressing through the game, one is able to put challenges ahead of a player of varying difficulties. For example, in a game with multiple levels, level 1 should usually be incredibly easy, but by level 50, say, it ...

Jan 3 20:36
1
Q: How to Assign Collision Layers and Masks for Player, Enemies and Background?

shingo.nakanishiIn the video https://www.youtube.com/watch?v=WVQkOWY3zxQ&list=PLMQtM2GgbPEWKQuyv9sXHwGWDXLY3Zjpw&index=14, both the player and the enemy are ultimately assigned two colliders each (one directly under the root and one under the Area2D node). How are the layers and masks assigned to each collider? ...

Jan 2 22:46
1
Q: How to use Y-sort between the TileMapLayer and the player

shingo.nakanishiWith the following structure, I turned on Y-sort for everything, but it doesn't work as expected (the player can't stand in front of the tree). I'm using Godot v4.3. Node tree Standing front: Not work Standing behind: work Player Node2D(Root) NatureTileMapLayer Collision...

Dec 31, 2024 14:16
1
Q: How can I @export a mapping of enum to Texture2D?

idbriiI have an enum and I want to assign a texture to each enum value. I can create an @export for each item in the enum, but that's clumsy. I can @export an array, but I can't tell which enum each entry represents. It doesn't seem like the enum markup in the docs will help and I don't see how I could...

Dec 24, 2024 09:02
1
Q: The button indexes are different between two controllers. Is there a work around?

AlexI found that when you connect a controller, the buttons have a code. When I run console.log(navigator.getGamepads()[0].buttons), the A button on a Nintendo Switch Pro controller (I can't remember exactly what it was named) is listed as index 0, while a Game Cube controller lists the A button as i...

Dec 20, 2024 11:31
1
Q: How can I instantiate prefabs from a non-MonoBehaviour script?

CheckerTI'm trying to instantiate prefabs in Unity, but I want to do it from a script that doesn't inherit from MonoBehaviour. I understand that a MonoBehaviour is typically required to use methods like Instantiate, but is there any way to perform this action from a non-MonoBehaviour class?

Dec 13, 2024 18:29
1
Q: What factors determine the frame rate in game programming?

shingo.nakanishiI read that frame rate depends on the monitor's refresh rate, as described in the following Japanese article: https://siv3d.github.io/ja-jp/tutorial2/motion/#181-%E7%B5%8C%E9%81%8E%E6%99%82%E9%96%93%E3%82%92%E4%BD%BF%E3%81%A3%E3%81%9F%E3%83%A2%E3%83%BC%E3%82%B7%E3%83%A7%E3%83%B3 Scene::Time() や ...

Dec 13, 2024 05:45
1
Q: UMG Drawing Delay

illmortemIs there any way to delay the re-rendering of a widget when you clear its children? I am trying to clear my inventory widget off all the children widgets, then re-add them (sort of a clear and refresh mechanic) but when I do so, the inventory widget flickers (in the time between clearing and read...

Dec 2, 2024 22:07
1
Q: Icosahedron missing triangles

JaxI'm trying to create an icosahedron (I've been trying to figure this out for about a week). Basically, I followed this article to create an Icosahedron mesh in code, and the positions of the vertices are correct, but there aren't enough triangles in the mesh (there are some weird gaps - I'll atta...

Dec 2, 2024 03:25
1
Q: Issue with CompoundShape Scaling in BulletSharp/Assimp Integration

Wagner AndreasI’m trying to create a CompoundShape using BulletSharp and Assimp for my 3D physics engine. The collider works perfectly when the scaling is uniform across all axes (e.g., 1,1,1 or 2,2,2). However, when I apply non-uniform scaling (e.g., 1,2,1), the collider behaves incorrectly. Here is the relev...

Nov 12, 2024 15:30
2
Q: How to add skill expression to a text based turn based game?

AAustralisI’m working on a text based and turn based roguelite. I want to have some way of requiring more skill than just mastery of the characters abilities. The dilemma I’m facing is that I’m not sure how to add that to a text based game but I also like text based because I don’t know how to add graphics...

Nov 4, 2024 05:11
1
Q: Interpolation over a sequence of quaternions

ChaosHello everyone, I am trying to interpolate over a sequence of rotations represented by quaternions. I am currently employing Squad (Spherical and Quadrangle Interpolation). I successfully applied the function to 4 rotations and the results corresponded to the expected one. I would like to general...

Oct 26, 2024 11:42
1
Q: Best Practice For Making Nodes

NobleAbsintheI'm watching a tutorial on setting up a 3D player character in Godot, and at around 7:45: https://www.youtube.com/watch?v=EP5AYllgHy8&t=252s It shows CharacterBody3D as the root node. I'm wondering if this is considered best practice or if it would be better to use a Node3D as the root, with Char...

Oct 22, 2024 14:49
1
Q: Unity UI toolkit callback buttons dont work if i disable the UI docment and then enable it again

user25832I have a camera setup and I want to display a UI on it. I got a basic UI using UI toolkit shown below: So I have a keyboard button setup so that when the button is pressed a boolean toggles and turns the UI on (and shows the mouse) or turns the UI off (and hides the mouse). The way I achieved tu...

Oct 22, 2024 08:31
1
Q: How to play hundreds of explosion sounds

Gabriel MachadoI am developing an RTS game with boats, the boats can shoot very frequently and I am having a hard time dealing with the explosion sounds. I am using three.js and the audio API it has that uses the web audio API behind the scenes. The thing is I can't simply tell three.js to play each sound indiv...

Oct 9, 2024 13:17
1
Q: How can I rotate a 16-bit signed integer vector?

IanLarsonI am trying to rotate a vector made of two signed 16-bit coordinates (-32768 to 32767). Using a LUT for sin/cos, I can use the standard method for rotating a vector: x = x * cos(theta) - y * sin(theta); y = x * sin(theta) + y * cos(theta); However, since this requires multiplying the coordinates...

Sep 25, 2024 12:11
2
Q: Player sprite becomes smaller during attack animation (Java)

TheLearner14I'm developing a 2D game in Java using Java Swing, and I've run into an issue with my player character's attack animation. The player has both movement and attack animations: Movement sprites: 16x16 pixels Attack sprites: 80x80 pixels The movement animations work perfectly, and the player display...

Sep 17, 2024 15:29
2
Q: Grid-based pathfinding for a lot of agents: how to implement "Tight-Following"?

Xascoria DungNote: the main problem has nothing to do with the TYPE of pathfinding algorithm (A*, flow-field etc), allow me to explain: I have a 2d grid and a lot of agents moving around, I want it so that obviously no two agents occupy the same tile at the same time. Agent can be either standing on a tile or...

Sep 13, 2024 01:43
2
Q: What does it mean: Unity is canceling the Runtime Fee

ZibelasThere was today an announcement from Unity that they are canceling the runtime fee (besides some other changes to the payment model). But the article itself does not mention what the runtime fee is/ was.

Sep 10, 2024 09:59
2
Q: The quest for a Wiki-less Game

AussieNoteI often see that a community will make a wiki for games that have a large amount of elements, I am attempting to create an in-game application of a "wiki" keeping track of what has been found or done to remind you of something you may have forgotten without having a 'terraria problem' where you n...

Aug 27, 2024 10:43
2
Q: How do you determine what order to process chained events/interactions?

John PI'm trying to write a top-down tactics RPG game in python, and run into the first major decision I can't make with my limited knowledge of RPG fundamentals. In our game you create a team of characters with mostly typical stats, but they can also have a quirk like "enrage" (gives a chance for a re...

Aug 26, 2024 13:27
1
Q: D3D11 - IDXGIFactory::CreateSwapChain() vs D3D11CreateDeviceAndSwapChain - When to use which for making a swap chain?

whiteclothI’m following a bunch of tutorial series on how to set up Direct3D 11 for 3D rendering, I’m focusing on the swap chain part for now. The main tutorial series I am following is the one by PardCode on YouTube. PardCode opts to use IDXGIFactory::CreateSwapChain() to create the swap chain from an IDX...

Aug 17, 2024 02:35
1
Q: What exactly is component based architecture and how do I get it to work?

Brigham PetersonMy problems with OOP: For a while now I have been attempting to make full games on godot but I keep running into issues around poor organization and planning with my classes and oop architecture. After days of working on a project I would run into a devistating issue with the way I organized my c...

Jul 20, 2024 06:06
1
Q: I am testing the flyweight pattern on thousands of GameObjects but its not helping save memory. What am I doing wrong here?

mtgI am trying to understand the flyweight pattern better by trying to optimize memory usage by spawning 10000 copies of an enemy GameObject that I have which has an Animator component, SpriteRenderer component, and BoxCollider2D component. I've identified that the intrinsic states would be the spri...

Jul 16, 2024 22:05
3
Q: What is the meaning of green plus icons in component headers?

Zen Of KursatSome components have these green plus icons. Some don't. What does it mean?

Jul 9, 2024 15:39
2
Q: How are GameManagers created in Unity?

MrVI know the basics of C#(Syntax, 4 pillars, SOLID, Designs Patterns, etc...) and Unity. I can do basic stuff like Flappy bird or Fruit Ninja without any help. But problems arises when I want to create more advanced projects, I don't know how to structure projects and I can't find any guides on how...

Jun 18, 2024 20:48
1
Q: 2D Pathfinding with rope constraint

AlikaeI have a character linked by a rope to a fixed point, in an environment with obstacles. I want to do a pathfind that take into account the rope. Here, if the character followed my current pathfind in yellow, he would get stuck. I want to find the blue pathfind instead. To be more specific, I want...

May 26, 2024 01:52
1
Q: How to generate a series of checkpoints randomly along a 2D line

TechwizardI was wondering how I would go about generating a series of checkpoint gates along a 2D line in my game. A bit of background, my game is a 2D reinforcement learning car driving simulator, I have a self designed track and would like to programmatically spawn a series of checkpoint gates along the ...

May 22, 2024 08:00
3
Q: Decouple game entity from its owner when logic depends on it

MarvinIn my real-time multiplayer game, there are multiple entities that are very interrelated and whose logic is very related to the player who owns them. I don't think I can decouple the classes from each other, but I would like to decouple this group of classes from the Player who owns some of these...

May 20, 2024 03:21
1
Q: Anxious about possibly hitting bugs i can't solve and having to cancel my games

buzzbuzz20xxI've been doing game Dev for 5 months now and I've started small at the start with following Pong and Flappy bird tutorials and other simple arcade games, and when i feel like I've reached a ceiling with the complexity level i move on to something more complex (Asteroids clone, simple twin stick ...

May 14, 2024 14:43
3
Q: Simple or Complicated mechanics, what benefits they have and should I be worried about overcomplication?

AussieNoteWhen creating a game, is it better to have complicated but interesting mechanics, or simple and understandable mechanics? From a design point of view, I can understand that simple mechanics can be picked up easier, but complex mechanics allow for more depth and learning. I'm making something with...

May 3, 2024 00:32
3
Q: What is Unity's definition of time?

qwerty keyboardSo I've been messing with both Avelog's Mouse Simulator and GameGuardian. Mostly out of fun, but partially out of finding weird game quarks that might be useful in a speedrun. I'm going to be writing a special GameGuardian LUA script that shows the player's XYZ and velocities on screen, but I don...

Apr 29, 2024 15:50
2
Q: Value of describing game mechanics in a data file instead of hardcoding?

allquixoticI am working on a turn-based, dice roll-based roleplaying game simulation engine. Here are a few relevant bits about it: Background The system is d20 based. The complexity of the system is somewhat less than well-known RPG systems like Pathfinder or D&D, but not so simple as to make it trivial. ...

Apr 27, 2024 20:06
1
Q: What does 'being conservative' mean in occlusion culling?

EnigmatismsI've been learning graphics engine recently and I come across a term - conservative: The CPU-GPU sync point problem Unreal solves like any other engine that uses queries, by deferring reading the query data for a number of frames. This approach works, although it might introduce props popping in...

Apr 21, 2024 16:41
1
Q: Efficient storing of tabular user generated data in Godot

JakubOver the course of the game, the user generates a lot of very simple data. And array of strings (single letters), timestamps (int) and a boolean array, all equal in size. The length of this "save file" could be up to 1M each array. Though median size might be a lot lower, say a tenth of that. Wha...

Apr 19, 2024 12:00
3
Q: Godot: Spawn an object in 3D

AndyD273I've been looking for a tutorial and am hoping that someone can point me in the right direction. I'm working on a FPS game in Godot, and I want to be able to drop a flare on the ground at the players position. I created a scene with a "flare", which right now is basically just a sphere mesh insta...

Apr 18, 2024 22:17
1
Q: Should I fully draw inside the canvas (e.g.: 32x32 aspect ratio) for pixel art games?

NickNameNickWhen I draw art assets for a game, should I fill the whole tile/frame? Would it look good in a game if I use less than the 32 by 32 pixels of the canvas, like the picture below?: When I export this pixel art, it changes the width to 21px and height to 28px, like below. What is the standard prac...

Apr 16, 2024 17:08
2
Q: How do I check if a GameObject is touching another GameObject in Unity?

ok-coder1I am trying to check if a GameObject is clicking another GameObject. I am trying to make a 2D shooter like Duck Hunt so this is important. I have tried IPointerDownHandler but found out that it is no longer supported. Code: using System.Collections; using System.Collections.Generic; using UnityEn...

Mar 25, 2024 17:14
1
Q: Avoiding string literals to reduce memory allocations

Srdjan PazinIn Unity, should we avoid string literals in frequently executed methods (like Update()) to avoid unnecessary memory allocations and instead store string values into fields? class TouchInputManager : MonoBehaviour { // private const string messageVar = "OnFingerMove"; /* ... */ privat...

Mar 25, 2024 08:09
1
Q: What’s the benefit of breaking code down into other classes?

KonjointedSorry if this isn’t the proper spot to ask, but something I struggle to wrap my head around is the benefit of breaking down code into smaller pieces on the surface it seems to make sense I think you get more control and scalability maybe? but then I actually write code and it’s difficult to tell ...

Mar 22, 2024 12:31
2
Q: How do you effectively induce "berserk" player behaviour?

AussieNoteI have recently been wondering, how can you "induce player behaviour" in a video game An example of what I am thinking of is when a player uses an ability like "rage" or "berserk" where their character should lose rationality, by using visuals and sound I want to make the player think less about ...

Mar 21, 2024 12:55
1
Q: How to make an authoritative server assign turn order numbers to players once they join?

SmileyTheMimicI'm having trouble developing and understanding Server code. Currently, I'm trying to have each person that joins the Server be given a single digit ID that can then be used for determining turn order and a number of other things (ex: specify whose card to place where). As it stands, I tried a fe...

Mar 10, 2024 03:34
1
Q: Using DND maps in my indie game (as a reference)

CanovichI've been considering using existing D&D battle maps for a commercial indie game I'm developing(i will use them as reference. I will create same layout with my own assets). I want to ensure that this practice is respectful to the original creators and the community. Could you advise on the ethica...

Mar 7, 2024 17:24
1
Q: How hard to brake to perfectly smoothly reach the destination?

st_phanGoal I want the get the required minimum deceleration to perfectly smoothly reach a target. (The car's AI should know how hard it has to brake to be the perfect valet.) Research "How can I maneuver an AI pirate ship for a sea battle?" sounds like it might have the answer but I honestly don't un...

Mar 5, 2024 12:30
1
Q: Made a new camera in unity 2d, its now the default despite not being set to main camera

JimbojaggiI created a new camera in Unity 2d and for some reason its being set as the main camera despite not being tagged as such. The original main camera is in fact tagged as "main camera" but it will only display if the other one is disabled. Here's the main camera that for some reason isn't the defau...