Questions tagged [selection]

Selection methods, eg. in RTS games

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

How to select only inventory slots, and not deselect them when clicking somewhere else?

I'm trying to make a selection system in my inventory to do things to the selected item in a UI window using this selection system. The problem is that whenever I click on anything other than the ...
Ohne Dich's user avatar
3 votes
1 answer
424 views

Handling complex selection mechanics in RTS-style game

When we look at complex RTSs where a simple left button mouse click can mean twenty or more different things, depending on the game and UI state, the code handling this interaction and assigning the ...
Ahmed Tawfik's user avatar
0 votes
1 answer
600 views

Unity3D multiple objects user rectangle selection

I wish to allow the user to select multiple units by click and drag as most RTS do. The issue I have is that the tutorials are either in 2D or only use the ...
Matthieu Raynaud de Fitte's user avatar
0 votes
1 answer
198 views

Unity RTS Single Selection Problem

I am trying to build an RTS game and I have managed to form a way to select a unit using Raycast and the tag system. I made it so that if the object the ray falls onto is of tag "TankUnit" Make so and ...
Kiyo's user avatar
  • 27
2 votes
1 answer
740 views

Making 2 Player UI

For practice, I'm trying to remake the character select screen from Street Fighter II. I managed get it working with a Grid Layout Group, ScriptableObjects, and some scripts to have the 1P cursor ...
JSparks's user avatar
  • 199
-1 votes
1 answer
223 views

Having trouble making more than 1 clickable object

I am a student trying to figure out how to make multiple clickable objects in pygame. I was able to make 1 working clickable object (dx,dy) work, but when I tried to make another clickable object (qx,...
Kieran Storey - Mayfield SS 24's user avatar
1 vote
1 answer
285 views

Handling mouse input depending on selected unit and clicked tile

I am making a turn-based tactical game (think something like X-Com) and I am currently trying to figure out how to handle mouse input in a clean way without a mess of if-statements. I have a lot of ...
sistergodiva's user avatar
-1 votes
1 answer
40 views

Using Gimp and clone tool. Source selection selects center of four pixels

I am using gimp to make tilesets. When I use the clone tool and hold ctrl to select the source, the selection is in the center of four pixels instead of just one pixel. I don't know if I am doing ...
digitalsoldier0's user avatar
1 vote
1 answer
171 views

In PhaserJS, how do I get a clicked Physics.P2 body's data?

I have a sprite with Phaser.Physics.P2 enabled, using a custom shape loaded with loadPolygon() from a ...
Kendall's user avatar
  • 121
0 votes
1 answer
2k views

How to handle focus on a custom actor in Unreal Engine?

I created a custom actor, placed it on my scene and selected it. When I press "F" to focus on it, the camera zoom back very far from the scene, probably because I didn't implement the method supposed ...
arthur.sw's user avatar
  • 291
4 votes
1 answer
154 views

Selecting the closest point in perspective view mode

I'm trying to improve my algorithm for selecting points in perspective view mode (OpenGL/Qt/C++). The current implementation works as follows. The user clicks on a certain ...
Ailurus's user avatar
  • 301
0 votes
2 answers
159 views

Implementing grid based selection box

What is a good way of implementing a RTS selection box for tiles on a grid? I'm making a game with some similarities to Evil Genius, the building in particular. In that game you click one place, drag ...
larsekje's user avatar
12 votes
3 answers
1k views

How to hide a post-processed mesh outline when/where the mesh is hidden

I'm working on setting up an active outline in my 3d engine, a highlight effect for selected 3d characters or scenery in the screen. After working with the stencil buffer and getting some ...
nils's user avatar
  • 221
2 votes
1 answer
103 views

how to accurately select a sprite on a scene with a click?

I have a scene with some sprite on it (added), the gamer has to select one of them and take the next action. What is the simplest way to select one of the sprites accurately? I am looking for a ...
Iman Nia's user avatar
  • 414
2 votes
2 answers
14k views

How do I trigger OnSelect() via the ISelectHandler in my class?

I'm trying to figure out how I can make a custom UI element identify when it has been selected or deselected. Classes such as Selectable inherit from the ...
Douglas Gaskell's user avatar
0 votes
0 answers
245 views

How to scroll Select objects in the hierarchy tab?

So I am creating breakable objects in unity and I have to select around 200 objects in the hierarchy tab so that I can apply some components to each the pieces. My problem is that once I select more ...
nova nanite's user avatar
1 vote
2 answers
872 views

SDL draw dynamic select box

This might seem obvious to many, but I'm stuck and I cannot find any tutorial which helped me, so it would be great to find the answer here. I tried to make a rectangle like you have in RTS games, so ...
xhallix's user avatar
  • 111
4 votes
2 answers
1k views

How do I efficiently send RTS unit selections over the network?

I have a multiplayer RTS game with every unit assigned an ID. How can I efficiently send across a network the units selected by a player? For example, Starcraft 2 has upwards of 200 units per player ...
JPtheK9's user avatar
  • 2,031
2 votes
1 answer
640 views

Selection with region (when rendering with shaders and VAO)

I am currently render my geometry using "Modern OpenGL" approach (with shaders and buffers). I have already implemented picking of single primitives using ...
frankie's user avatar
  • 131
16 votes
7 answers
3k views

How to make unit selection circles merge?

I would like to know how to make this effect of merged circle selection. Here are images to illustrate: Basically I'm looking for this effect: How the merge effect of the circles can be achieved ? I ...
MaT's user avatar
  • 1,045
1 vote
1 answer
721 views

Understanding implementation of glu.PickMatrix() [closed]

I am working on an OpenGL project which requires object selection feature. I use OpenTK framework to do this; however OpenTK doesn't support glu.PickMatrix() method to define the picking region. I ...
stoney78us's user avatar
0 votes
1 answer
904 views

Implementing a 2d Selection Box

I'm in the process of implementing a selection box for my simulation and am having difficulty with something which appears simple. At the moment, I can draw the selection box and accurately select the ...
aligray's user avatar
  • 103
0 votes
2 answers
161 views

How to avoid character to move when selected

I've got a player Class which can walk to a certain point on the screen when left mouse is pressed: ...
チーズパン's user avatar
3 votes
1 answer
211 views

Which part of MVC should be responsible for selecting a unit

Imagine a turn-based tile game, that generally looks like Heroes' combat view. Except for the fact a player can choose any of his units to command. Our team is implementing the game according to MVC ...
10nikov's user avatar
  • 33
1 vote
1 answer
1k views

Unity3d select empty gameobjects in scene

I have a pathing system that I am creating in Unity. When you add nodes to denote the path, I create a empty GameObject and render it in OnGUI as a square. The problem that I have is clicking on the ...
Hector Llanos's user avatar
1 vote
4 answers
634 views

Selecting and moving vertices

How can I identify the correct vertecis and move them in XNA using VertexBuffer? Let's say I have a simple cuboid in my project and want to move one face of it. How would I loop thru vertices, get ...
user1806687's user avatar
1 vote
2 answers
3k views

How to implement rectangle selection?

I don't know if there is another term for it, but I mean this: You hold down a mouse button. A rectangle forms when you move the mouse around. The units inside the box get selected when you let go of ...
Anonymous Entity's user avatar
25 votes
6 answers
17k views

Cast ray to select block in voxel game

I am developing a game with a Minecraft-like terrain made out of blocks. Since basic rendering and chunk loading is done now, I want to implement block selecting. Therefore I need to find out what ...
danijar's user avatar
  • 5,691
5 votes
3 answers
5k views

What method replaces GL_SELECT for box selection?

Last 2 weeks I started working on a box selection that selects shapes using GL_SELECT and I just got it working finally. When looking up resources online, there is a significant number of posts that ...
Jake's user avatar
  • 547
0 votes
1 answer
62 views

Scrolling though objects then creating a new instace of this object

In my game when pressing the right mouse button you will place an object on the ground. all objects have the same super class (GameObject). I have a field called selected and will be equal to one ...
Amit Assaraf's user avatar
1 vote
1 answer
392 views

Selection of a mesh with arbitrary region

Considering example: I have a mesh(es) on the OpenGL screen and would like to select a part of it (say for delete purpose). There is a clear way to do the ...
Tigran's user avatar
  • 167
6 votes
1 answer
1k views

Unit selection circle

I do not know whether it's called a circle, or whether it's called a halo or whatever. But, I do know that I want to know what is the game development world term for this. So, how do we call it?
tomsseisums's user avatar
  • 3,356
2 votes
2 answers
9k views

How can I do Mouse Selection In OpenGL 3.0?

Hello I'm pretty good programmer I've made my own 2D games in SDL and made a gui in 3D using Old OpenGL and Modern OpenGL but.. I'm having problems with trying to click 3D models with opengl I have no ...
NoobScratcher's user avatar
1 vote
1 answer
475 views

Region selection in OpenGL

If I have a mesh of triangles and going to make a selection on it using a region (and not rectangle using Glu.gluPickMatrix(...);), how can I implement it?
Tigran's user avatar
  • 167
6 votes
1 answer
2k views

What are some good methods of implementing RTS-style Box selection?

I'm scouting around for different methods of implementing a typical RTS box selection. This is for 3D game - so I'm looking for methods for finding units within selection box in 3D world. Here is a ...
Aralox's user avatar
  • 962