Product: Tetris2P AI
Sprint Summary

Daily Objectives

Notes

So I’m gonna start with a brand new spriteScene. The goal of this scene is to first:

  1. Make a rectangleObject for the ground
  2. Make a playerObject
    • Affected by gravity
    • Moves with wasd
    • Can jump
    • Sits on the groundObject
  3. Give the playerObject a sprite
  4. Make a floatingGround object

Right now I’m assuming it’s colliding with the floor, but I need a more sure fire way to handle the collisions.

The object keeps disappearing for some reason. OH I need to set yvel back to 0.
I need to make a function that detects the type of collision.

checkCollisions(aabbList) {}
needs to return a list of objects with collisions within aabbList
need to determine from which direction the collisions occurred
so how do I format the return value?
What’s the most convenient way to check for collisions?
We can make a dictionary list of all the collisions like:

{
	'all': [aabb1, aabb2],
	'left': [aabb1],
	'top': [aabb2],
}

BUT, what about corner collisions? How would I want to resolve this issue for this game? Depending on whether xDisp is greater than yDisp? How many different collision orientations are there?

Is there ever a difference with resolving seperate top → right, or right → top, collisions instead of a ‘top right’ collision? It’s better to pre-label all the collisions, so the developer can just choose what order to resolve them. chainlinks omega

An overlap on both x and y axis needs to exist between AABB’s for a collision to exist. Everyoverlap is a combination of an x and y overlap. WIthin each axis, you can overlap from both directions as long it over laps in one of the directions.

Objectives Completed