User Tools

Site Tools


grid:targeting

This is an old revision of the document!


Grid Targetting

This section explains how targeting works in this grid system.

Terms

Before proceeding further, there're several terms (and function) you need to familiarize with to help you understand the whole docs. Here is the list.

  • User position

The user position represents the position of the user of the skill. User position usually matters to determine the attack range of the skill.

  • Targetable grid

The targetable grid is the possible grid to be targeted. These grids are meant for the player to select which grid they want to select to launch the skill. Or for the enemy to look for the target available in their range. This type of grid only happens in the selection layer, i.e, it does NOT have an effect on the actual area of effect which needs to be customized further.

  • Center grid

The center grid is the selected grid when the player (or enemies) done selecting which grid they want to launch the attack. The center grid is a single integer value that represents which index that grid is selected. Center grid matters to determine the area of effect handled by the target grid.

  • Target grid

The target grid represents an array of area effect that is configured manually using a combination of positioning and direction. By default, the target grid is only an array that has a single value which is the center grid value. (see below for clarification)

Illustration

To make it even clear, let's take a look at illustration below:

User position and targetable grid

i.imgur.com_ld1a5n6.jpg

0 1 2 3 4 5 6 7
8 9 10 11 12 13 14 15
16 17 18 19 20 21 22 23

The user has index position in 14, while the targetable grid is [8, 9, 10]. The targetable grid relative position may be changed when the user also change their position. For example, like this

i.imgur.com_nsc1bxm.jpg

0 1 2 3 4 5 6 7
8 9 10 11 12 13 14 15
16 17 18 19 20 21 22 23

Center grid

i.imgur.com_0mesvwe.jpg

0 1 2 3 4 5 6 7
8 9 10 11 12 13 14 15
16 17 18 19 20 21 22 23

The center grid is set when the choice is made. This is the epicenter of your skill. The target grid (area of effect or not) is usually determined by the center grid. i,e, when you select the index 10 before unleashing the skill, the center grid is set to 10. However, the center grid does not have a role to determine where the skill falls into. It is the job of the target grid, which is very possible that the target grid may be different than the center grid.

Target grid

i.imgur.com_bu6zln7.jpg

0 1 2 3 4 5 6 7
8 9 10 11 12 13 14 15
16 17 18 19 20 21 22 23

The target grid is the actual variable that determines the target. By default, it follows the value of the center grid. For example, if you select the index 10 so that the center grid is set to that value, the initial value of the target grid is [10] (in an array). However, you can expand it further based on either center grid, user position, or both. In this particular example, it spreads around based on the center grid.

grid/targeting.1577564901.txt.gz · Last modified: 2019/12/29 03:28 (external edit)