10
votes
5answers
1k views

How to manage different speed of actions in RogueLike games?

How to manage different speed of actions in RogueLike games? What I mean is that turn based games may have actors acting at different "speed", depending on the action and some other characteristics. ...
0
votes
2answers
162 views

Slick2D: Animation not being parsed from spritesheet correctly

I have a 960x960 spritesheet with each tile being 192x192. I initialized my spritesheet and animation like so: spritesheet = new SpriteSheet("resources/spritesheets/player.png", 192, 192); ...
0
votes
2answers
319 views

DirectX map/unmap

In my 2d game i want to use dynamic buffers to render sprites. My question is, when should i map unmap buffer? The 2 possibilities are: #1 //game logic map() fill buffer unmap() render() #2 ...
0
votes
0answers
7 views

What is the purpose of taunts, compliments, emotes etc in games? [on hold]

Since answers to this question could get very broad, I am going to look at 4 specific use cases here, but if there are others that significantly differ please feel free to explain those in your ...
1
vote
0answers
9 views

How to store sprite data in a VBO?

I'm planning on rendering many sprites in my games, but I am not sure which method of storing their data to use. I haven't tried all of them yet, but I want to see if I also have anything important ...
0
votes
0answers
12 views

Why is this comparison not working? [on hold]

I am running a coroutine and experiencing the strangest behavior that I cannot make sense of. I've tried writing the code several different ways but still get the same results. It is really bizarre. ...
1
vote
1answer
828 views

Multiple enemy array in LibGDX

I am trying to make a multiple enemy array, where every 30 secods a new bullet comes from a random point. And if the bullet is clicked it should disapear and a pop like an explosion should appear. And ...
2
votes
2answers
147 views

Unity Ragdoll Colliders don't collide

I have a humanoid character with Ragdoll setup in Unity. However the box/capsule colliders on the various parts of the body don't collide with other static geometry. They do collide with the ground ...
4
votes
2answers
362 views

Finding a moving target in a maze

I'm making a game that is a bit of a mix of snake and pacman. Basically, two players go through the maze and each time they pick up a piece of candy, a cube is added to their tail. If one player ...
0
votes
0answers
23 views

Code for inventory functions not working

I'm working on an inventory, and I've ran into some problems. Some functions in my CollisionDetection class don't work properly. My CollisionDetection class contains functions that involve mouse and ...
0
votes
1answer
74 views

Transforming normals along with vertex? (GLSL)

So, I got a model matrix (Via uniform variable) in the shader, is there any way to use the model matrix to transform the normal of a vertex that has been transformed with glm::transform/rotate? If ...
0
votes
0answers
11 views

intersection coordination algorithm

I'm trying to create a 2D game where i have an a traffic intersection. My game object need to pass by the intersection without colliding with each other and without stoping them My question is ...
1
vote
1answer
9 views

SDL2 SDL_PollEvent endless polling on key hold

What is wrong with SDL2 SDL_PollEvent() function? When I press-and-hold a key it enters "while (SDL_PollEvent())" block each frame. If in previous frame event queue was emptied and in new frame I ...
1
vote
3answers
292 views

Confused about using libGDX dispose()

Can anyone please help me to understand the proper use of the dispose(). Does dispose() get called automatically or do I have to make a call to it? In a game I'm writing, I use a texture atlas and ...
0
votes
0answers
23 views

NodeJS timed update approach

My game has users building buildings, recruiting units, trading resources and sending attacks. All of this functionality takes a certain amount of time to happen and I'd like help with deciding on the ...
2
votes
1answer
54 views

Rendering a distant star field in Unity using a separate camera for near stars

I'm currently working on a hobby project which is a universe simulator (exclusive to stars) built in unity3D. In order to deal with the raw scale of the universe I'm trying to implement two ...
0
votes
0answers
12 views

Mesh Smoothing using Manifold Harmonics

I am implementing Spectral Geometry Processing with Manifold Harmonics by Vallet et al. both in C++ and Matlab except the eigenvalue calculation part. I am implementing only smoothing (without ...
0
votes
1answer
12 views

design / data structures

I'm working on a game which I'm writing in Javascript and then porting to iOS/Android via phonegap/cordova. For the most part, I understand how to code and how to get what I want to happen, BUT I ...
0
votes
1answer
25 views

Why do games have different ports for different maps? [on hold]

A little old example for that would be Metin2, this is the only game I know which have that, but there may be more. In Metin2 there are maps which are accessable through other ports. I'm not a ...
1
vote
0answers
10 views

Webgl: pixel perfect tilemap rendering?

The problem described below is a follow-up of Seamless tilemap rendering (borderless adjacent images). I'm not sure to fully understand the rendering issue I have, so I'll try to describe as much as ...
0
votes
1answer
54 views

Intersecting rectangles in space

I need to intersect 1 million spatial polygons (specified using their Minimum Bounding Rectangles) with 4 completely disjoint MBR's (MBR1,MBR2,MBR3,MBR4) in space. MBR1, MBR2, MBR3 and MBR4 divide the ...
1
vote
1answer
33 views

Unity3D: Making heavy calculation on separate thread

So, I've created a program with Kinect as its input. As you know, Kinect will send the data 30 frame per second. I have a model that will mimic Kinect's input motion, so on Update() I read the ...
32
votes
5answers
23k views

Workaround to losing the OpenGL context when Android pauses?

The Android documentation says: There are situations where the EGL rendering context will be lost. This typically happens when device wakes up after going to sleep. When the EGL context is ...
0
votes
2answers
704 views

Move Box2D body towards mouse click

In a top down game using Box2D, I would like the player's Box2D body to rotate towards the mouse click, and then move to a point on mouse click (move, not teleport). I have worked out the rotation ...
1
vote
1answer
16 views

How to know when Android OpenGL Context has been preserved?

I am implementing a pause menu for my game in Android. If the activity pauses and then resume, It lose the OpenGl context. However if you use setPreserveEGLContextOnPause(true) it MAY preserve the ...
1
vote
1answer
52 views

Problems managing collision filtering

I have my character fixture and body(is a tank), so when I press the screen it throws a rocket(which also has a body and a fixture) that the player can controlll touching the screen. My game also has ...
3
votes
3answers
680 views

Unreal Engine 4 - Blank Material

When I'm adding a material to a box in UE4, the material loses its textures. I want to add this material To this After I'm trying to drag & drop the material into the scene above (like in ...
1
vote
0answers
23 views

How can I draw multiple lines connected via “nodes” in libgdx Scene2D?

I have two Vectors which indicate the ending points of each line. I am trying to draw similar lines to football formation lines like these. My main problem using ShapeRenderer is: ShapeRenderer ...
0
votes
1answer
20 views

Unity 5 - Mouse Disappears during runtime

My mouse cursor disappears during runtime. When I click esc, it appears and the moment I click on something, it disappears again. This is what I have done so far to fix this. I have added this to a ...
0
votes
0answers
21 views

Link components to entity and put the logic in the components of an Entity-Component-System? [on hold]

We're a team of students developing a First Person Shooter. We decided to use the Entity-Component-System design pattern. The problem is, we disagree on how we should implement it. Half the team ...
0
votes
1answer
318 views

LibGDX: Colllisions between bullets and enemies in arrays

I am writing a "Gauntlet" style game. So far I have managed to successfully detect collisions between my player object and my ghost enemy objects, and when they collide they drain the player's energy. ...
0
votes
0answers
29 views

Linear gradient shader ( Photoshop-like)

I'm searching a way to implement a linear gradient shader that behaves as the linear gradient in Photoshop (only the vertical case is necessary). It will be applied to 2D sprites. Currently I'm ...
4
votes
7answers
1k views

In Unity, how do I correctly implement the singleton pattern?

I have seen several videos and tutorials for creating singleton objects in Unity, mainly for a GameManager, that appear to use different approaches to instantiating and validating a singleton. Is ...
-3
votes
1answer
43 views

Create a game from scratch [on hold]

I'm thinking in creating a simple 2D game to start learning something, but I don't know the best language to start. I know this can be a bad question, but I just know the basics of C# and a little ...
0
votes
1answer
72 views

Moving a character to a point without any floating point operations

So I'm writing an adventure game for MSDOS, just a fun challenge for me. I'm trying to get the character to walk along a straight line to his destination (either the next navMesh node or where you ...
1
vote
1answer
18 views

My displayed Tiled map is rendered with different tile indexes than in the editor in Slick2D. Why?

The first picture is what I have in the editor and the second one is what I got when I rendered my map. @Override public void init(GameContainer container) throws SlickException { ...
0
votes
2answers
77 views

Positioning 2D (non-UI system) game objects

As an old Flash dev I'm slightly confused about how you position game objects on the screen in Unity since game objects have no width or height (only a scale). Let's say I have a container gameobject ...
1
vote
1answer
26 views

Bilinear filtering by sampling corners of a texel

I'm trying to do bilinear filtering in texels to get the convoluted value of a 3x3 block. Implemented as below: offsetx = 1/width offsety = 1/height Fragment shader: "varying vec2 ...
0
votes
1answer
66 views

Zoom at a specific point using Orthographic camera

Currently I can perform Zoom which seems to be working fine but essentially what I'm really trying to do is zoom on a position offset from center as currently when I zoom then zoom is performed at the ...
0
votes
1answer
29 views

Having trouble with EOF in Xcode [on hold]

I'm getting an error that says "control may reach end of function" and I have gone through my code several times now and am not spotting the error. It may be something simple too. // loop ...
7
votes
1answer
549 views

How to not freeze the main thread in Unity?

I have a level generation algorithm that is computationally heavy. As such, calling it always results in the game screen freezing. How can I place the function on a second thread while the game still ...
3
votes
1answer
88 views

Custom Coloring of Tileset Characters

Games like Dwarft Fortress and Dungeon Crawl Stone Soup are drawing their boards using tiles from a tileset image (I think?). I know you can do color keying and replace the background color with ...
0
votes
2answers
63 views

Prevent player IP addresses being exposed

There's a common issue in multiplayer PC games like the older versions of Call of Duty where any connected player in a match can easily sniff the game packets and read the IP addresses of all the ...
-2
votes
0answers
29 views

Motion related databasing with SVG and SQL [on hold]

In my game I have two elements moving towards each other, meeting in the middle of the screen. Something like this: (the image will be two slowly converging mouth-like objects, but it's not finished ...
0
votes
0answers
6 views

Using Corona Labs SDK [on hold]

Has anyone tried out the corona sdk? Thinking of using their sdk to make something similar to Fun Run
2
votes
1answer
51 views

How to create a looping or spherical world?

I wish to create a 3D first person world, in which the player, once they reach one end of the map are unknowingly transported back to the opposite end, or a spherical world with a surface where the ...
0
votes
2answers
4k views

Play animation when click on each player with in maincamera unity3d

I have 3 gameobjects (player1, player2, player3). I attached a script "playerscript" to these game objects. In the main camera, I have added another script called "testscript". Clicking on a player ...
1
vote
4answers
2k views

Collision between AABB and Circle

I'm programming collision systems for a 2D game engine. The idea is that different systems can interact with each other. So one of the cases would be check collisions between axis aligned bounding box ...
1
vote
1answer
115 views

LibGDX: How to detect remote button press for Android TV?

On Android TV, I need to be able to detect the remote control centre button to start the game. I tried: if (Gdx.input.justTouched() || Gdx.input.isKeyJustPressed(Input.Keys.SPACE) || ...
1
vote
1answer
29 views

Adding quaternions is useful?

I'm working with quaternions and matrices 4x4 and 3x3, and I have a doubt. I think that adding and multiplying quaternions is the same that converting the quaternion to a matrix, do the operation and ...

15 30 50 per page