Data Structure – Effective recording of game stages and repetition (player, NPC, etc.)

Try to find the most efficient way (space) to record each move in a game (regardless of engine or language) without going through any type of replay plug-in.
Rather than simply recording a recovery, it would be more of a time travel affair.

You wonder how you would structure the data, when there is the following information to keep in mind:

  • Player movement and camera angles
  • Player Actions and Interactions
  • NPC default pathways (rather deterministic IA paths) and player interaction / interference deviations
  • Other information about world-related entities that can be changed by the player

I think I should probably divide this into at least 3 sets:
– The initial paths of NPCs and global entities
– Deviations from NPCs, related to the data of the initial path
– Paths and actions of players, related to deviation data

This would probably be complicated quite quickly, but most importantly, a lot of data.

Say I want to record an hour and keep the data as small as possible, what should I count and what is the best way to structure my data?

I found a similar question with some useful tips, but I do not answer in a very detailed way about the tables or types of data that I should use:
Effective algorithm for recording the positions of game objects

Q1: Should I store everything with a large number of columns, and each step should be a new "time stamp" (assuming 1 second per tick of recording, though for some things I might wish a more fluid recording like a camera movement)

Q2: When NPCs move by AI, this should be predictable, but how to synchronize the behavior of the AI ​​with a predetermined path? (which should save space)

Q3: How to save space, while having a smooth movement during replay (you would see yourself playing when you go back in time). I would probably use motion vectors and replay with a smooth path? Mostly worried about whether the player moves around the camera a lot and very quickly that the rehearsal will be strange. Maybe a dynamic tick time system? What recording ticks depend on the amount of changes right now?

Q4: Example, would I record a complete line when the player will only do a specific "action", as in the table below, or should I have separate tables for each "action" (click, camera_move, player_pos )

check | player_pos | click | camera_mov |

1 | 0,0,0 | null | 0,0,0,0 |

4 | nochange | open | 0,1,1,0 |

8 | 1,0,0 | null | nochange |

(Thinking about it, this table should probably be the one I work with when I "replay" the game, after several tables are stored, but do not store it like that with many empty / useless fields)

Pathfinder – asking a player not to do something violates his agency?

In general, if my DM asked me to rethink a plan of action that I had planned in play, I would feel a little fooled, "spoiled" and, yes, a bit like the DM was doing me lose my player agency. Unless the DM forces me to do something is more of the first rather than the last.

In the end, it depends on your group / players, whether or not they like to appreciate or dislike you telling them something like this OOC.


That being said, I recommend avoid telling your players no matter what out of the character that is relevant at stake. However, if your players make Always listen to the advice of the first type to whom they ask for something. You can tell them or teach them how to play well.

We have two types of situations here:

  1. the guy who gives them advice is actually a bad guy and they should not listen to him.
  2. the guy who gives them advice is really a good guy and it's finally a good idea to listen to him.

The first situation is much easier to solve. Show them that the advice given is not trustworthy, either by refuting it or by discrediting the villain who advised them.

For example, if a supposedly trustworthy, but in reality, tells them to go kill the X person, you can, on the one hand, show X while performing heroic deeds, such as defending a village against an attack orc or play happily with the village. children (not pedophile, obviously).

On the other hand, you can also let the players notice the counselor in dark places or interact with dark people, maybe even perform evil / morally bad acts.

Anyway, showing players how other people interact with the guy in question can give them an indication as to whether they should trust him or not.


The second situation is a little more delicate, although it is linked to the first one. More specifically, your the players seem to be a little naive when it comes to trusting strangers, so if you voluntarily presenting them with a situation such as (1), they could begin to act with more caution.

If this is not how you want to teach them, you can instead present them with an NPC who has a different opinion. For example, maybe he surprised them talking to the guy who gave them advice, he does not agree and recommends that you do Z instead.

In addition, this may be the point where you can, and perhaps should, talk to your players outside the character. More specifically, it seems that they expect to be transported by rail (that is, everything you present to them is organized in such a way that the most obvious choice is the one you expect, so that your plot works).
Clearly, that's not what you have in mind, so you should participate in a "zero session" (retrospective) where you work, for example, the same page tool.


  1. present them actively alternatives
  2. show them the consequences of not seeking for themselves potential alternatives
  3. Align your expectations, as is usually done in a 0 session.

dnd 5th – Can a player make a persuasion roll on another player?

We have recently encountered a problem in my group where one of the PCs tried to persuade another. The character who was persuaded mentioned something about the fact that it is forbidden to persuade another PC. Since the decision is unclear, I asked them to wait for the verdict until my answer was clear because none of them could find proof that it was allowed or not.
Is it allowed?
If so, how can I prevent climbing? Knowing the player, he'll get angry at being persuaded, and will probably do some sort of stunt in the sense of "I'm going to do a persuasion test for you to give me X" over and over again to prove he should not not be allowed. Is there a way to avoid this?

dnd 5th – Player using charm spells on group players

If you do not like the game, stop playing.

On the surface, this seems to be a form of intimidation allowed by the SM. This may not be the case, and the DM and the players just like a bit of player-versus-player intrigue. They may even agree with the idea that barbarians attack and kill their characters. Or, if they are inexperienced, they will not be sure what they are doing, contenting themselves with looking for what "seems like fun" in a chaotic manner and without much wondering if everyone else is going to be happy. really amuses. In this case, they will probably take the barbarian killing their characters.

Having seen similar scenarios being played when I played in school and in younger groups, I would advise against your character attempting to kill others. This could turn out to be even more complicated, and it 's a bit like if someone was being verbally bullied, unable to react in this way and turning to violence.

Instead, mature responses could be:

  • Before the next session, or between sessions, in the presence of the whole group (and not just to complain to the DM), just ask an open question. Something like: "What's up with the attacks on my character?" I do not know how to answer the game, and I do not appreciate it. What do you want me to do? " Let them explain how the game is supposed to be nice this way.

  • Ask for a retroactive "zero session," where the style of play and allowed interactions between the player's characters can be discussed openly, and you can justify that the characters do not use the magic that affects their minds. not fun for you to play a character without access to such magic.

  • Stop playing. Find another group if you can.

dnd 5th – When do player characters leave the turn-based action (ie, an order of initiative) if they are in a hostile zone?

The answer from Nitsua60 is about changing the time scale, so I will try to answer the other aspect of your question: the progressive initiative.

You should start the initiative again if all enemies have been defeated, escaped or surrendered, and players encounter a new enemy. Why? Because it should be possible to surprise them again. Take your own example, where players were fighting near a door in another room. Maybe they walk to the door and fall on a still gelatinous cube just ahead. Or they reach the door and that turns out to be an imitator. Or the door opens, only to find someone who is already pointing a loaded crossbow towards them. Or maybe they find it empty and start looking for secret doors, when an invisible poltergeist throws them a table.

All kinds of threats could be hidden between short sections of dungeon. New enemies should have the opportunity to surprise players unless they literally arrive in the middle of the fight. Similarly, players should not be denied the opportunity to surprise unsuspecting enemies.

Finally, remember that whenever players move a significant distance, you should use the movement rate rules. If your dungeons do not consist entirely of small pieces, you will need to ask for their movement rate and running order to determine not only how long it takes to get from point A to point B, but also if they notice enemies (and vice versa). As mentioned in Chapter 8 (Adventure) of the Player's Manual, individual character speeds should not be used for traveling:

Each character and monster has a speed that corresponds to the distance in feet that the character or monster can travel in 1 round. This number implies short, energetic movements in a situation where life is in danger.

The following rules determine the distance traveled by a character or monster in a minute, hour, or day.

This always applies to dungeons, no matter how dangerous they are.

c ++ – Get the position of a player in a grid

So I play a pacman game. the game has tiles / grid. I keep the data of the node in a structure:

struct Node

{
std :: pair  node; // node position 
    float f = 0,
h = 0,
g = 0;
std :: pair  previous;
bool iswall = false;
sf :: Vector2f rectCenter = sf :: Vector2f (0, 0);
sf :: Vector2f position;

};

I use the structure to calculate a path, check if the cell is an obstacle (or not), and so on.

I'm now using arrays and a for loop to draw the grid:

for (int i = 0; i <col; i ++)
for (int j = 0; j <row; j ++)
{
/ * the default color is black * /
box[i][j].setFillColor (sf :: Color :: Black);
box[i][j].setOutlineColor (sf :: Color :: Yellow);
box[i][j].setOutlineThickness (-1);
box[i][j].setSize (sf :: Vector2f (w, h));
box[i][j].setPosition (sf :: Vector2f (i * w, j * h));
sf :: FloatRect fbox = box[i][j].getGlobalBounds ();
}

[[[[enter the description of the image here1

I also use the strcut to create specific nodes (current position, start node, end node)

and I draw it at the man like this:

                                // display the start node in green
if (i == crntNodex && j == crntNodey)
{
box[i][j].setFillColor (sf :: Color :: Green);
}

now, the problem I'm facing is to create a function to get the player's current node (blue square on the green cell). My attempt was to check if the cell contained the reader.

std :: pair AIEnemy :: getNodePosition (sf :: RectangleShape * grid, int i, int j)
{

if (box.contains (rect.getPosition (). x, rect.getPosition (). y))
{
returns std :: pair(i, j);
}
}

but it's not effective (and does not update as well). is there a way to get coordinated game objects on a grid?

Wolfram CDF Player Pro Trial License

Is there a Wolfram Player Pro trial license (for example, for a limited time)?

tableau – Change of position of the player after the die, c ++

I want each player to change position once the dice rolled current position. For example, if the player's current position is 3 and the rolled die is 2, then the players New position is 5. For the moment, the position of the players is just going from table test[0].

#understand  
#understand  
#understand  
#understand 
#understand    
#understand 
using namespace std;
int main ()
{
int switchP = 0;
int grape = 5;
srand (static_cast (grapes));
vector  arrayTest = {1, 2, 3, 4, 5, 6};
int t = 0;
for (int i = 0; t <= 20; i = (i + rand ()% 3)% arrayTest.size (), t ++)
{

cout << "The result is" << tableTest[i] << endl;

if (switchP% 2 == 0)
{
if (arrayTest[i] == arrayTest[0])
{

cout << "Player 1 is" ​​<< arrayTest[0] << endl;

}

else if (arrayTest[i] == arrayTest[1])
{

cout << "Player 1 is" ​​<< arrayTest[1] << endl;

}

else if (arrayTest[i] == arrayTest[2])
{

cout << "Player 1 is" ​​<< arrayTest[2] << endl;

}

else if (arrayTest[i] == arrayTest[3])
{

cout << "Player 1 is" ​​<< arrayTest[3] << endl;

}

else if (arrayTest[i] == arrayTest[4])
{

cout << "Player 1 is" ​​<< arrayTest[4] << endl;

}

else if (arrayTest[i] == arrayTest[5])
{

cout << "Player 1 is" ​​<< arrayTest[5] << endl;

}
}


other
{
if (arrayTest[i] == arrayTest[0])
{

cout << "Player 2 is" << arrayTest[0] << endl;

}

else if (arrayTest[i] == arrayTest[1])
{

cout << "Player 2 is" << arrayTest[1] << endl;

}

else if (arrayTest[i] == arrayTest[2])
{

cout << "Player 2 is" << arrayTest[2] << endl;

}

else if (arrayTest[i] == arrayTest[3])
{

cout << "Player 2 is" << arrayTest[3] << endl;

}

else if (arrayTest[i] == arrayTest[4])
{

cout << "Player 2 is" << arrayTest[4] << endl;

}

else if (arrayTest[i] == arrayTest[5])
{

cout << "Player 2 is" << arrayTest[5] << endl;

}
}

switchP ++;
}

system ("pause");
}

vlc media player – VLC playlist with random selection in folders

I would like to make a simple playlist in VLC where the first file is loaded randomly from the "A" folder, then the second randomly from the "B" folder, then looped from the beginning and load different files from folders. The problem is that VLC develops the folders and reads all the files they contain. How can I make such a playlist?