All Questions

0
votes
1answer
39 views

Make a variable go down as another goes up?

I am making a JavaScript game called "Spoop: The Clicker", and I have a variable shown by text: ...
-3
votes
1answer
90 views

How would you implement a soft magic system in a games? [closed]

Most, if not all, magic systems in games are necessarily hard magic systems, often with mana limits (or cooldowns) and a limited set of spells to prevent spamming god-tier spells in early game. Other ...
0
votes
1answer
25 views

Why is the Position Handle placed at certain distance away from vector3 unit in Unity?

I have a vector3 value that I am setting in inspector and I am drawing a ray using OnDrawGizoms to draw that vector line. However, the position handle I made using ...
1
vote
0answers
37 views

Applying multiple forces on a particle

If I have a particle, say in a polar coordinate grid, and I want to apply multiple vectors to it, how can I calculate where it's final position will be given those vectors? Ex. Imagine there's a ...
0
votes
0answers
20 views

How to set ortho projection / model view matrix without a camera?

I'm trying to create the correct projection and model view matrix for rendering without a camera. _orthoCamera is a camera I set up in the scene view. Using the <...
0
votes
2answers
93 views

Which is the fastest: shaders vs animations / animated images / pixel manipulation?

I'm quite newbie to shader programming. I use Godot engine and after I see what can be done with shaders (eg. http://glslsandbox.com/e#53172.0) I realized that I MUST learn it no matter how hard it ...
5
votes
1answer
65 views

How to write a custom WaitUntil that is reusable?

In my turn based game, I like to have a function similar to Unity's WaitForSeconds, WaitUntil that can be called within a IEnumerator that suspends the coroutine execution for the given amount of ...
3
votes
1answer
25 views

Randomizing material across meshes - UE4

I have multiple instances of the same mesh which is using the same material. While looking for randomizing textures, I came across texture bombing and so the material in 1 wall looks fairly random. ...
66
votes
12answers
8k views

Having the player face themselves after the mid-game

I am writing a game, in the vein of a jRPG, in which you begin playing as the main villain. You don't know it. You think you are playing the hero and the more successful you are and the stronger you ...
0
votes
0answers
32 views

HLSL setting data on ONE Geometry instance - For chunk Terrain gen. SharpDX 4.2

I am just trying to send the size of an array from my c# script to my HLSL shader in order to initiliaze a vertex array inside the shader. It just ain't working. As I have read everywhere, we can't ...
0
votes
0answers
25 views

Chess AI Finding Checkmate Using MinMax

I have implemented a chess AI using a Mini-Max(With a partially working AB pruning) implementation. At the moment, it can search a depth of 5 and it is capable of playing a good middle-game. It pretty ...
1
vote
1answer
32 views

how are semantics used when declaring a struct?

I don't understand how semantics are used in shaders. While reading Unity's shader tutorials, I come across this ...
1
vote
1answer
43 views

Bitmap drawn with Graphics.DrawImage flickers

I am working on a space invaders clone using bugs as aliens. Everything works ok but the bug bitmap flickers on the screen. ...
0
votes
1answer
22 views

How do I test for intersection of a ray and part of a capped cone / cone frustum?

The formulas to calculate the intersection between a ray and a capped cone / cone frustum are already widely known (see http://lousodrome.net/blog/light/2017/01/03/intersection-of-a-ray-and-a-cone/ or ...
0
votes
0answers
12 views

How to use btCompoundShape with btRaycastVehicle?

I use btBoxShape for creating a chassis btRigidBody. Then I define an initial position for the chassis rigid body, for example btVector3(0, 10, 0) and when ...
0
votes
0answers
7 views

MelonJS - How can I change position of collided object (push or pull with player Entity)?

I'm getting started on game development with MelonJS and I don't get how can make a Pushable/Pullable Entity. I'm pretty sure that the approach I'm taking is not right since It cannot detect the ...
0
votes
1answer
16 views

Rotate an object smoothly by using Accelerometer Input in Unity

There is a simple script where the object orientation is equal to the mobile devices orientation. it works but the object doesn't rotate smoothly. ...
2
votes
1answer
106 views

Dr.Strange's door in Unity3D, how to put a projected void on a plane?

My question is about a visual trick I would like to perform in Unity3D. I want the player to walk outside a door and see no walls of the room behind them, just the door. They should still be able to ...
0
votes
3answers
113 views

Unity: Is type casting every frame too expensive?

I have a state machine that controls my enemy AI. Each AI has a target which may be a Player, an obstacle, a shell, or even a Vector2 position. I'm trying to abstract my "target" member, and my ...
1
vote
1answer
28 views

How to decelerate Ship using Vector Objects in Java

I am developing an Asteroids type game in Java, using a custom Vector2D class for the Ship. I have a vector object for its position, direction and velocity. I am having an issue with the ship ...
0
votes
0answers
20 views

Unlit Node Shadow Shader Graph

How to make unlit node cast shadows? Is is possible with the current state of Shader Graph in LWRP? In this great article Toon Shader OP grabs pass from VertexLit shader. Is something similar ...
0
votes
1answer
43 views

How to properly create a handle for setting moving platform's target position in Unity?

As the title suggests, I am trying to set up a handle for setting target position of a moving platform. I have an empty GameObject(targetPos) and this is what I want to use for setting target ...
0
votes
1answer
38 views

How to setup input for local multiplayer without split-screen in Unreal Engine 4

To bind actions and axes in the character blueprint class, I may have multiple such character instances for each new APlayerController. Merely 1 Action Name (e.g. avoiding ...
0
votes
0answers
17 views

Unity3D Authentication with JWT token

Just a quick question about authentication wit unity. Currently I have Unity sending off a request from a login age sing sockets. What I am trying to do is generate a JWT Token from that login request ...
0
votes
2answers
53 views

How can I solve niche collision cases between circles and insides/outsides of AABBs or arcs?

I am trying to create a game with some interesting geometry. Literally all the geometry that is involved are the circles that move large distances per frame, and the edge of an iPhone X display, which ...
0
votes
0answers
6 views

How to control kinematics articulations via GDScript?

I have seen that Godot only plays an "animation", that is, it only executes the sequence that was pre-defined in the file (for example, a DAE made in Blender). For example, a rigging of a hand with ...
6
votes
3answers
913 views

Lock enemy's y-axis when using Vector3.MoveTowards to follow the player

I am using the following code to make a zombie move towards me, but when playing the scene the zombie seems to be moving towards me, but also off the ground and not fixed on the y-axis ...
2
votes
1answer
38 views

Ball always showing in Unity

Some weird "ball" is showing when I select an element in Unity, preventing me to see the object itself: I've tried to hide some layers, but even with all layers hidden it's still here: Do you know ...
1
vote
0answers
56 views

Conversion from single-plane to multi-plane texture formats in Vulkan

How can we copy a texture in VK_FORMAT_R8G8B8A8_UNORM to VK_FORMAT_G8_B8R8_2PLANE_420_UNORM under the assumption that no color ...
2
votes
1answer
42 views

Mixing between two colours in fragment shader causes normal mapping to be ignored

I'm making a game in which the world is black and white except from the immediate area around the player. It all works, except the normal mapping breaks when I turn it on. If I set the output at just ...
-1
votes
0answers
19 views

Should I use GridLayoutGroup for Match 3 game in Unity?

I have some stupid questions about Match-3 game (CandyCrash, GardenScapes etc.). How to organise the structure of the game? Should I use MVC pattern or apply more dynamical approach? There can be a ...
0
votes
0answers
11 views

Rename Sketchup Component meshes for Unity

When i create a component in Sketchup and i export it to Unity, the component structure is always: Component_Name MeshX How can i avoid having the component name as an empty parent and just set it ...
0
votes
0answers
36 views

How can I put the physical equations to make the hair movement realistic in OpenGL?

I'm new to computer graphics and OpenGL in general. I have to work on a project which simulates the movement of hair according to the physical circumstances like gravity, wind etc. But I don't have ...
0
votes
0answers
15 views

Using assimp to parse animation data

I am trying to do skeletal animation and want to use assimp to parse collada file. I am able to load mesh data and bone weights to render but when It comes to extract bone hierarchy for skeletal ...
1
vote
1answer
78 views

Passing a value to a stuct

So I've been making a 2D grid and pathfinder using SFML. Now I ran into a problem. I've been making a vector for the path nodes. ...
0
votes
0answers
32 views

Unity Mesh collider not working with capsule collider

I have in my Unity3d Project a capsule that represents a character and has a Rigidbody and capsule collider as components, and in my project I also have a mesh that is my terrain imported as fbx from ...
0
votes
0answers
12 views

Applying material to group of meshes - Unreal engine 4

I'm trying to apply some materials to a group of static meshes (free internet content), but the problem is the material seems to be disconnected at the joint of the meshes. In the image you can see ...
0
votes
2answers
34 views

How can I evaluate varying conditions in a Scriptable Object?

I'm new to using Scriptable Objects, so this might just be a bit of confusion. Let's say we have a Scriptable Object that defines the abilities a character might have in the game, and a character ...
0
votes
1answer
95 views

Unity using 40% GPU for just a UI interface on ultra but 90 on low?

So I made some software using unity for my FRC team. All this application is, is just a User Interface with labels, input fields, buttons, etc... When I choose the quality to be on Ultra, I will get ...
0
votes
0answers
9 views

Photon-Unity Instantiation not working

I use Unity and Photon for the multiplayer. I Instantiate my gameObjects using this method : ...
1
vote
0answers
41 views

Calculate velocity to hit the target on flat 2d surface

I am creating a game using Python and Pygame. I have used this function before (with JS with p5.js and Java with libwjgl, but for some reason it does not work with pygame (I am not sure if it matters ...
2
votes
2answers
110 views

To use or not use ScriptableObjects?

I have a Level Prefabs that contain enemies Prefabs inside them. Those Enemy Prefabs contain behavior script components that contain certain values controlling the behavior of this specific enemy. The ...
0
votes
0answers
23 views

client state interpolation with authoritative game server

I am making a simple 2d real-time browser online game with an authoritative server (like any other .io game). I receive game state snapshots roughly every 50 (40 - ...
2
votes
1answer
33 views

How to find position of the edge of an object?

I have two planes and I want to put both planes one after another so that I can form a road. I set them from the editor and that was very easy but I wanted to do this from code. So in the code: ...
0
votes
0answers
44 views

DirectX 11 generate normals for tessellated triangles

I've spent a couple days looking for an answer to this - How can I access the newly created triangles of tessellation and generate normals for them? I've followed much of the shader code from the ...
-3
votes
0answers
37 views

Gravity for Draw Line in Unity 2D

I can not get gravity to work on my line, this is my code: ...
-2
votes
1answer
32 views

Moving a 2D object up & down y axis within certain limits

This was originally written to move a 2D object along the negative x axis. Now I also want to move the same 2D object along the y axis (up and down within certain limit and at different speed than ...
3
votes
1answer
51 views

Unity3d UnityWebRequest EscapeURL standard does not match Swift url encoding. How to decode it?

How should I decode escaped URL by unity in Swift? I am developing a game with Unity3d. Something MMORPG. With server implemented by me in Swift under ...
6
votes
3answers
121 views

MUD programming: socket handling

I'd like to build a multi user dungeon in Java/C# (also open to other suggestions). Below I have listed two ways of handling connections, and would like to know which would be the recommended way? I ...
5
votes
1answer
112 views

Concept of “scene” in Godot, misunderstanding

Could anyone clarify a beginner's question in Godot? As in this 3D video tutorial (https://www.youtube.com/watch?v=-D-IcbsdT04), the guy creates one scene for the floor, another scene for the wall, ...

15 30 50 per page