Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
Join us in building a kind, collaborative learning community via our updated Code of Conduct.

The tag has no usage guidance.

2
votes
1answer
24 views

How to create a grid of 3d objects without making them actual GameObjects

Very simple question: If I'm going to be generating and placing a lot of 3d objects (in this case cubes), that are not going to be interactive, like no collision, no raycasting intersections etc. ...
0
votes
1answer
68 views

What is more efficient in Unity recorded animation or Slerp/Lerp?

What is more efficient in Unity recorded animation or Slerp/Lerp? What will be faster? It is obvious that the animation will take a lot more space.
-1
votes
1answer
43 views

Battle of the Vectors

When building a Unity2d game, is it better to use Vector3's for waypoints, etc... or to use Vector2's ? The advantage I can see of using a Vector2 is that it is smaller (2 floats vs. 3) and therefore ...
0
votes
1answer
67 views

Most efficient way to detect and act upon collision (Specific for my 2d game)

Currently, mainly just for fun, I'm working on a 2d game where I have all collide-able blocks (background) assorted into an array when its loading, along with the player put into a different part of ...
1
vote
0answers
77 views

Voxel Game - Lag when camera is inside of the terrain

I am making a voxel game in OpenGL and I currently render 8 x 8 chunks to the screen. The first thing I do is generate the map using Simplex Noise and this is done once when the chunk is created. I ...
0
votes
1answer
165 views

Flip x when direction of the movement changed in Unity

What is the easiest and the most efficient way to flip x of the SpriteRenderer when direction of the movement changed in Unity? I use ...
2
votes
1answer
231 views

How can I build a data structure that will persist across saves/loads in GameMaker version 8.1 and earlier?

I wish to build data structures such as trees, linked lists, graphs, stacks, queues, etc. in Game Maker. However, the concept of object in Game Maker Version 8.1 and older does not have a reliable ...
1
vote
2answers
125 views

I have a game based on combining 2 ingredients to create a product. What is the best way to code this? (Unity)

So to go a bit more in depth, in my game, you can combine a variety of ingredients to make a product. For example, you could combine water and dirt to make mud. What I am currently doing to achieve ...
0
votes
2answers
119 views

Efficient Storage of Objects in a 2D Grid

When trying to store data related to objects in my 2d top-down tile based game (specifically, blocks), I realized that I don't have an efficient solution to storing them. I could have, for example, a ...
0
votes
2answers
777 views

Monogames Most efficient way of checking intersections between multiple objects

I've created a top-down shooter with multiple objects such as enemy AI (tanks), walls, power-ups etc. At first I was able to create about 300 AI units which aims to move the player character, checks ...
1
vote
3answers
210 views

What would be an efficient way to check if there is a collision in a 2d game?

As part of my final project of Algorithms and Data Structures, we have to develop an open world game in C++. I already got developed most of the game, but I haven't coded the collisions with the ...
0
votes
0answers
183 views

What's the best way to store tiles' infos in a 2D table?

I need to know what's the less time / memory consuming way to store the infos about each tile in a 2D table. The first thing that came to my mind was creating a table holding the infos, and then ...
0
votes
2answers
57 views

Collider Effeciency Question

I'm creating a game where hundreds of rockets with colliders attached are shooting at a player. Should I write my script where: 1: The player script reads the collision from hundreds of rocket ...
4
votes
1answer
122 views

Should particles check if they are in a region, or regions if particles are in them?

I have around 100 to 200 particles in my game. Then I have 5 to 20 regions (circle-shape) which should count the particles which enter them and add some force to them, so they change their direction. ...
0
votes
2answers
92 views

Efficiently calculating best nearest sphere from a point in 3D space

I have a point in 3D space and a number of spheres (anywhere from 0 to thousands) at random locations in said space. Each sphere has a property that falls off in a smooth gradient from the centre to ...
0
votes
3answers
672 views

LibGDX efficient colored rectangle rendering

I'm creating a game in which I renderer around 1000 to 2000 solid colored squares per frame, 90% of which are the same size: ~4 px depending on the dpi. I am looking for the most efficient way to ...
0
votes
0answers
388 views

C++ timer for game loop(consistency across machines)

sorry I have been searching for ages and can't seem to get a good answer that I can understand, I am trying to make a game in my universities TL engine, and I can create a timer class fine, but I'm ...
0
votes
1answer
168 views

Generating Formulas for glDrawElements with Tile Grids

glDrawElements can be used to save you from uploading a lot of vertices to the GPU. Many 2D games use tiles, which are rendered in grids. I have done some ...
5
votes
1answer
914 views

Is this the typical approach to modern OpenGL UI & Text rendering, for mobile?

I'm implementing GUI in OpenGL ES 2.0 to fit with my application framework's existing structure. I'd like to have the UI rendering eat as little mobile processing capacity as possible. So to confirm......
3
votes
2answers
779 views

Implementing a 4x4 Game Board

I struggle with efficiency in code, and I want to start my game off on the right foot. I have a game that I'm making a 4 x 4 map of 'tiles' that a user can build their 'town' on. To keep track of ...
12
votes
2answers
1k views

Combining Many Small Colliders into Larger Ones

I am creating a game using a tile-map made of many thousands of grid squares. At the moment, each square has a square collider on it for checking collisions. However, with many thousands of tiny ...
7
votes
2answers
1k views

What is the most appropriate path-finding solution for a very large proceduraly generated environment?

I have been reading quite a bit in order to make the following choice: which path-finding solution should one implement in a game where the world proceduraly generated, of really large dimensions? ...
0
votes
1answer
666 views

Most efficient way for nested loop to not repeat a value of parent loop in pair-wise structure (C# or Javascript) [closed]

It's hard to choose the correct title for this question, so let's see if I am able to better convey here what I am in search for. If the title is too far away, suggestions are welcome and I can edit ...
0
votes
1answer
44 views

Trying to make a box move around the screen with the arrow keys [closed]

I have a box and it moves around the screen when the user presses the arrow keys. It seems a bit bulky and awkward though. Any thoughts on how to make it more efficient/less resource intensive? ...
6
votes
1answer
10k views

Efficient billboarding sprites in Unity 5

What's the most efficient way to do billboarding sprites in Unity 5? I want to make a forest of sprite trees in 3d space. Those sprites need to face the camera at all times. I am working on VERY ...
0
votes
1answer
164 views

Is there a significant amount of overhead when using STL containers instead of plain arrays?

I have read discouraging statements about using plain arrays in c++. Where videogame development is involved we are aiming, as far as I know, at max speed execution. STL containers (such as std::...
0
votes
1answer
37 views

Maximizing efficiency on space distribution

Imagine you have a room X metres long. You have different parts P of diverse lenghts L and importances I. However, the quantity Q of each part is limited and different. You want to fit in as many of ...
4
votes
4answers
12k views

When would a mesh collider be better than primitive colliders

I have been reading through the Unity Manual and have come across some interesting information about mesh colliders and primitive colliders. It got me wondering if using many primitive colliders would ...
2
votes
1answer
253 views

More vertices vs more textures

I'm currently working on a dynamic 'door' creator, and I'm trying to decide which is more efficient. Not much experience with 3D render speeds, so I'm asking before I choose which direction to go ...
-1
votes
3answers
600 views

Most efficient way to do 2d tiles (VBO vs Instancing)

Ok so I am looking at building a game that uses 16*16 tiles, and renders anywhere from 400,000 to 1,000,000 tiles onto the screen at any given time. The tiles will be destroyable . What is the most ...
3
votes
1answer
2k views

Reduce render time for a tiled map in ThreeJS

I'm working on a WebGL game using Three.js, its been a few days and I found my first issue, render time on big maps. The game runs great, there are even some AI mobs that run around randomly like ...
4
votes
1answer
4k views

Advance efficient water physics simulation [closed]

Summary: I am looking at creating a large(ish) ocean which multiple ships will be present in doing their own thing. I want the ocean to be a life like as possible but without compromising too much on ...
5
votes
3answers
572 views

When should I load my resources?

I'm making a game, and right now I'm working on the user interface. I'm just wondering when I should be loading my resources. Should I do it in small pieces at a time? Load resources for part 1 of ...
4
votes
2answers
4k views

2D Rectangle/Circle Continuous Collision Detection

I'm looking for a fast 2D continuous collision detection algorithm for circles and rotated rects. It needs to determine the time of collision. Both shapes may be moving at high speed, so the ...
1
vote
0answers
3k views

Drawing and rotating bitmaps (with transparency) efficiently in Android

I just started making a game for Android and I'm already having some issues regarding performance. You can imagine the game as being some kind of Tower Defense game with a top-view, and the enemies ...
0
votes
1answer
454 views

Collision Detection: Simulation Inexplicably Slowing Down/How To Efficiently Calculate Extremes In Each Dimension

BACKGROUND: As discussed here: Fast 2D collision detection in an unbounded space I am working on a collision detection algorithm for a simulation. The catch that makes this case unique is that the ...
1
vote
1answer
693 views

Is it more efficient to store my tile grid as a dictionary or an array?

I've just started making a video game in AS3, and I'm trying to keep the graphics, sound, and actual game state in three completely different spots and sets of classes. That being the case, the ...
1
vote
1answer
2k views

Efficient Way to Draw Grids in XNA

So I am working on a game right now, using Monogame as my framework, and it has come time to render my world. My world is made up of a grid (think Terraria but top-down instead of from the side), and ...
6
votes
1answer
1k views

Android game loop's effect on cpu/battery usage - unexpected results

I will try to keep this question as concise and as readable as I can. I recently came across an odd problem with my Android game that I'm developing. It's an openGL ES 2.0 game and initially I was ...
7
votes
4answers
369 views

Need efficient way to keep enemy from getting hit multiple times by same source

My game's a simple 2D one, but this probably applies to many types of scenarios. Suppose my player has a sword, or a gun that shoots a projectile that can pass through and hit multiple enemies. ...
3
votes
1answer
541 views

High CPU usage on Pong clone

I just made my first game, a clone of Pong, using OpenGL and C++. But its using ~50% of the CPU, which I guess is very high for a game like this. How can I improve that? Can you please look up my code ...
1
vote
2answers
5k views

Efficient way to render tile-based map in Java

Some time ago I posted here because I was having some memory issues with a game I'm working on. That has been pretty much solved thanks to some suggestions here, so I decided to come back with another ...
1
vote
2answers
1k views

Checking collision in an array - is there a better way?

MSDN suggested this, but I'm worried about it slowing down the game when there are a lot of objects to check: ...
5
votes
4answers
11k views

Effecient tilemap rendering

I have done mostly tile based games, but never really bothered with optimization. I always just rendered all the tiles that convered the viewport. I am currently working on platformer for a mobile ...
7
votes
3answers
6k views

How do I sync multiplayer game state more efficiently than full-state updates?

I've done a little game network coding before, but primarily with TCP for games without real-time needs. I am working on a 2D Java game with networked multiplayer. For learning, I want to do this ...
1
vote
1answer
509 views

How can I render player movement on a 2d plane efficiently?

I'm prototyping a 2d HTML5 game with similar interaction to Diablo II. (See an older post of mine describing the interaction here: How can I imitate interaction and movement in Diablo II?) I just got ...
1
vote
2answers
308 views

How to track and find entities within radius in realtime game?

What is best approach to implement tracking in real time for, say, 1000 npcs? Every frame update simple a square grid (remove or insert into linked list) and every time check in square radius? I tried ...
8
votes
4answers
3k views

Is there a way to increase the collision check efficiency of a system of n objects?

I'm making a game that consists of many onscreen objects, one of which is the player. I need to know which objects are colliding every iteration. I made something like this: ...
1
vote
1answer
620 views

Effective SpriteBatching in XNA?

What is an example of efficient sprite batching in XNA? I don't know when (if ever) I would do something like this: ...
14
votes
4answers
5k views

How to continuously find all entities within a radius efficiently?

I have a very large number of entities (units). On each step, each unit needs to know the positions of all units near it (distance is less then given constant R). All units move continuously. This is ...