goglcoupons.blogg.se

Psychopy height corresponds to pt font
Psychopy height corresponds to pt font







psychopy height corresponds to pt font

psychopy height corresponds to pt font

Test that it works correctly by doubling (or halving) the size of the grid or of the square size.Īs I already wrote, our game will be made of squares.

PSYCHOPY HEIGHT CORRESPONDS TO PT FONT CODE

As for the square size, 20 pixels should be enough (but decide based on your screen resolution).Īdd the code for loading the file into settings variable and then use the settings to compute the window’s size. I would suggest to start with a 30 × 20 grid as it should give us enough space to try things out but you can always increase the resolution of the game later. Good news is that the formula above automatically ensures the correct aspect ratio (think why this is the case).īefore we start coding the window size computation, create a settings file using the format of your choice that contains grid size (with a list of two values or you could define it as grid width plus grid height ) and square size 73. What is your decision? My suggestion would be "norm" units as they make sizing squares easy, as long as we use a suitable aspect ratio for the window itself. So, which units should we pick to make it easier to draw squares? Reread section on units and think which units you would pick before continuing. Recall that PsychoPy has five different units for size and position. Now, let us think about the units that we will use in our game. Note that the latter parameter determines how the game looks, double the size of the square in pixels and that will double both width and height of the window. This way we can figure out window’s height as Thus, it would be much easier to define our window size based on the size of the grid (in squares) and that of individual squares (in pixels). In the game, our snake will be composed of square segments and move on a grid made out of squares.









Psychopy height corresponds to pt font