All Questions

Filter by
Sorted by
Tagged with
0
votes
0answers
6 views

A question about optimizing allocator for cache [closed]

(Hopefully this is the right place to ask my question) I have recently started learning about cache and writing a custom allocator for my game, and I have a question about what memory is actually ...
0
votes
0answers
10 views

Q: 2D cone and rectangle collision detection

I'm working on a 2D RPG game and now I need to detect if players ability collides with enemy rectangle hitbox. Currently I have this code that detects if a point is in cone, but I need to modify it to ...
0
votes
1answer
36 views

What's wrong with my line segment plane intersection code?

I'm following the algorithm on on this website for my line segment intersection test code. But when looking at my line segment and plane intersect it doesn't produce the correct point of intersection. ...
0
votes
1answer
30 views

Rotate Sprite towards mouse cursor SDL

I have trouble to make my sprite(Arrow) to point at the position of my mouse cursor but i don't get the Right results. I've tried this: ...
0
votes
0answers
26 views

How can I match the delta rotations of two objects?

Here is the code I'm starting from: ...
0
votes
0answers
15 views

Why isn't this script that removes duplicate faces from voxel generated mesh not working?

Hey this is my first post here. I'm trying to make a voxel world generation project for personal experience like minecraft like games. But I cannot find out why my script is not working as intended ...
0
votes
1answer
51 views

VAO not showing

My VAO is simply not showing up and i'm not sure if my matrices are wrong or if the shader is wrong… Please have a look a see what is wrong… My code is big so i'll post the essential. ...
0
votes
0answers
27 views

How to sync entities in an ECS game?

I'm wondering how to engineer a client server sync of entities in a multiplayer game which is using an ECS. When the server changes some values of the components of an entity, I thought the best ...
1
vote
0answers
30 views

OpenGL Two-point perspective view

Summary: I want vertical lines to be drawn as vertical lines regardless of their position relative to the camera (distance/offset). I want the projection to be perspective so the furthest objects ...
12
votes
1answer
4k views

Why reflection became a must in game engines?

I'm currently doing some research on programming languages(compile time reflection area, if you ask) and I found that on the game engine area the reflection feature becomes a must, an engine either ...
0
votes
1answer
17 views

Null reference on gameObject that has been successfully referenced

It's exactly as the title says. I am getting a null reference error even though I have properly referenced the object. I have debugged my code to show that the result is always exactly what I need ...
0
votes
0answers
19 views

Collisons with rock and player(spaceship)

I'm trying to make when the rock hits the spaceship or player it should decrease the health from the health bar but when I run it, it doesn't work. The rock decreases the health randomly. How can I ...
0
votes
1answer
26 views

One DeviceContext per Material?

In D3D11, we have a DeviceContext, which represents the Renderpipeline. In Metal, we have a RenderPipelineState. In Metal, I cache the RenderPipelineState, it is the abstraction of a "material". Is ...
0
votes
0answers
12 views

GA Measurement Protocol without Firebase

I was successfully using Measurement Protocol for my websites and web apps to gather analytics data. Now I'm trying to implement it in my game, but nothing happens. Debug url gives a valid response: ...
0
votes
0answers
24 views

why does Physics.Raycast always return my player game object instead of the object I clicked?

I have 3D world. I want to detect when the player clicks on a game object in the world. In this image, I have 2 objects I want to detect mouse click on. The white sphere does have collider on it. The ...
0
votes
1answer
18 views

The children of a Transform are in reverse order

I am making a simple 4-player turn-based card game. At one point, a player can "open" his hand on the table. As the player does this, I want cards to be aligned in a way such that left side of each ...
0
votes
1answer
61 views

Programming Test for a job in Game Dev - expected levels of documentation etc

If this is the wrong place to be asking this - please let me know and I'll happily ask it somewhere else! I am completing a C++ Proficiency test for a "Junior Engine Programmer" role at a game studio ...
0
votes
0answers
8 views

How to Enable canvas with Event during a animation clip

I want to enable a canvas while an animation clip is playing, I used animation Event and call the following script to enable the canvas, but the editor does not recognize any game object. How a ...
0
votes
1answer
25 views

Render a sphere when the user clicks on the screen with libgdx

I’m really new to Libgdx, and decided to try out some codes to familiarise myself with it. I’m trying to write a program such that a sphere is rendered at the position of the user’s click. Here’s my ...
0
votes
0answers
14 views

Isometric Z-as-Y Sort Order issue in Unity

I'm struggling with isometric Z-as-Y tilemap sort order in Unity. I'm attempting to paint two layers of tiles into my tilemap. When I add tiles that I would expect to show "below" / "behind" my upper ...
0
votes
0answers
15 views

Set background color in Phaser

I want to set a background color for my game. I found this solution: function create() { this.cameras.main.setBackgroundColor("#d5d5d5"); } but I want to be ...
4
votes
4answers
373 views

Explicit difficulty selection without breaking the game flow

According to the flow theory, in short, if the challenge is too hard, from flow state the player will go into an anxiety state, and if the challenge is too easy, he will go into a boredom state. This ...
1
vote
0answers
27 views

Resolving contradictions in WFC more efficiently than naive backtracking

I just recently got started with the Wave-function-collapse Algorithm (WFC) in 3-dimensional space. I got the fundamentals working and wanted to now move on to let the algorithm automatically resolve ...
0
votes
1answer
54 views

Moving my character/camera makes environnement jerky

I'm learning to make a Tilebased game with Unity and for that I use the Zelda alttp assets. I just have Tiles, a Camera and a moving Character with a rigidbody2D and a CircleCollider. When the Camera ...
0
votes
0answers
26 views

Procedural dungeon generation

Im making a rouge like game, and I need a better way of generating a dungeon. My requirements for a dungeon must be: Have multiple rooms and corridors All rooms and corridors must be accessible My ...
0
votes
0answers
13 views

How do I get HDRP render enabled so that the shader graph will work

I'm using Unity 2019.2.17 personal, and I imported the shader graph package and created a pbr shader graph. I get a warning: the render pipeline is not compatible with the master node. I assume it ...
0
votes
0answers
13 views

3D terrain editor brush using compute shader

i am working on 3D terrain editor, and i have simple brush for adding or subtracting height. Right now I am calculating new Heights on CPU dependent on brush radius. ...
0
votes
0answers
14 views

My platform disappears

Hello, I am having a problem right now. I can't seem to understand what this code does because I just copied this from someone, but my problem is my platform is disappearing when every time it almost ...
0
votes
1answer
48 views

Multiplatform game, save game state and resume it on other platform

This is for a personal and knowledge acquiring project. I want to create a little TIC-TAC-TOE multiplatform game, app & web. The choosen technology for the app will be Android or Flutter and for ...
0
votes
1answer
23 views

Vertical push doesn't let the object fall down instantly [UNITY]

An object (Wall) is continuously moving forward on the X axis with a simple script: ...
0
votes
0answers
15 views

SetTextureOffset in meter per seconds speed

I have this code snippet that faking the tiling offset speed. Now i want to set the speed in terms of meter per seoconds. how to divide or multiply that i get a number which is meter per seconds: <...
0
votes
1answer
19 views

How to reset an incremental achievement in Googles Android API?

For example the achievement is "Pass 5 levels in a row without failing" It's incremental and has five steps. If a user hits an obstacle, this achievements score should obviously be resetted to 0. ...
-1
votes
2answers
22 views

Unity: RigidBody2D, Trying to Set rb;

So for Unity I've been trying to to do the code line public RigidBody2D rb; I've followed the gmetrix unity programming course and they do that just fine with the ...
0
votes
0answers
7 views

Any way to set drag events on a phaser 3 group?

I'm trying to set a drag event on a phaser 3 group, but I wasn't able to achieve what I want. I was reading some phaser 2 blogs, and they said that it isn't possible to set a group a drag event. Can ...
0
votes
1answer
81 views

How can I gradually increase the speed of my game?

I recently made a replica of (Dino run) game in Unity2d. But I'm stuck on how can I speed up my game gradually. Should the game speed be increased or should I increase the speed of the camera. ...
0
votes
2answers
21 views

Unity 2D Tiles disappearing when i zoom in

All my tiles/sprites have 0 as their position on the Z axis, except my main cam which has -10. For some reason i suddenly couldn't zoom in without everything disappearing, I switched to 3D view to ...
0
votes
0answers
22 views

Implementing counter-steering for a drifting car in 2D

I could make a sliding car. but i want the counter steer functionality. My current model of the car has 4 wheels, all of them have a script handling the slip. am currently multiplying the side ways ...
0
votes
1answer
27 views

setTint() on half image

I'm developing a game where I need to paint half of a image when the user is either wrong or right. To paint the image, I'm using setTint() to paint the image the ...
0
votes
0answers
49 views

Enemy pick a player?

I'm trying to make my enemy pick a player from array that no enemy around him. "Around_player" it tells me how many enemies around player.Also, bool "PlayerSurrounded" tell me if enemies around player ...
0
votes
1answer
31 views

How to add force on an object when it landed on the ground?

when i add the force it jumps up and disappear after pressing the up key.I want it should addForce only when it is on the ground position.
-1
votes
0answers
35 views

How to slowly rotate a graphic over time as it moves toward target?

This is the code I am working with. I feel like I am close, but I can't stop the graphic from turning. How do I stop the graphic from spinning continually? ...
0
votes
1answer
63 views
+50

Way to prevent jumping pieces

I have a chess game and I have all the movement for the pieces coded but all of the pieces, not just the knight, can move over the top of the other pieces. What would be the least intrusive way to ...
0
votes
0answers
26 views

Using a Bluno beetle instead of Arduino Uno

So I am making an interactive game using Unity and an Arduino Uno. However, I now want to migrate my Arduino project onto a Bluno Beetle board. I am using the following code on Unity: ...
2
votes
2answers
29 views

Same noise generator for C# and Javascript

I'm writing a 2D web racing game with procedural generated maps using perlin noise(as a university project). The server is written using C# and the client using Javascript. I've developed procedural ...
0
votes
0answers
13 views

Godot 3.1: procedurally generating TileMap with AutoTiles

I'm making a start on a 2d top-down game in Godot, using a TileMap and OpenSimplex Noise to generate the terrain. It works pretty well, creating decent contiguous regions of different types of ...
0
votes
1answer
54 views

Struggling to get AI to repeat infinatley

I am following this as a guideline to help me figure out a simple AI for an enemy as I am new to java. https://www.javacodegeeks.com/2014/08/game-ai-an-introduction-to-behaviour-trees.html https://...
0
votes
1answer
24 views

How to Bring the Scene View Camera Controls into Game View

I've got a scene with a big sphere in the centre (the Earth) and a lot of smaller spheres around (the stars). Above is a screengrab in Scene View with the camera in the Front View position. I really ...
0
votes
0answers
24 views

Can I rely on a Navmesh for X/Z movement and manually place my agent on the Y axis?

I'm generating my terrain mesh around the player (along with collision mesh and Navmesh). It's tile based, when the player moved enough I generate necessary tiles render meshes, then collision meshes ...
1
vote
2answers
96 views

What does it mean to “release” a game in a country?

I would like to understand what is the meaning of releasing (or not) a game in a particular country. See for instance the case of Halo 2. According to this source the game was released in a set of ...
0
votes
0answers
29 views

Why isn't OnCollisionEnter being called?

I have a hammer and an object to be hit in my scene. I put this line Debug.Log("Collided with" + collision.gameObject.name); to debug whether the function ...

15 30 50 per page