pha Flashcards

1
Q

The equation for FPS is

A

framesPassed / (endTime - startTime)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

To detect mouse down

A

if (this.input.activePointer.isDown) {

}

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

The most popular atlas packer for Phaser3 is

A

TexturePacker

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

To create an animation

A

this.load.atlas(‘key’, ‘spritesheet.png’, ‘spritesheet.json’);

this.anims.create({
key: ‘attack’, // This is its name that you’ll call
frames: [ // List of objects in order, each one is a frame name from the json
{key: ‘keyFromAtlasImport’, frame: ‘nameFromJsonFile’},
{key: ‘keyFromAtlasImport’, frame: ‘nameFromJsonFile’},
],
frameRate: 60,
repeat: -1
});

sprite. play(‘attack’);
https: //www.youtube.com/watch?v=ffemDAdJySU

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Orthographic projection is

A

representing 3D objects in 2D

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Transactions sheet

A

The benefit of a transaction for a write operation is
you can revert the entire transaction if any of the operations fail. Useful when some data in the transaction relies on other data in the transaction to be accurate.

The benefit of a transaction for a read operation is
It locks the database so if one of the fields changes during a read you don’t get data that is old.

You want to minimize
transactions. One transaction is 1000 row updates is better than 1000 single row updates.

What autocommit=false guarantees is
you’ll be executing your queries (inserts, deletes, updates), in a transaction, which means that they’ll either all succeed (with a commit at the end), or fail, and be rolled back.

autocommit=false and two users need to update the same rows at the same time, then one will be locked waiting for the first one to complete, with either a commit or a rollback.

https://stackoverflow.com/questions/521887/how-much-does-wrapping-inserts-in-a-transaction-help-performance-on-sql-server

How well did you know this?
1
Not at all
2
3
4
5
Perfectly