Sprint #2.5 - Daily Scrum #10
Product: Tetris2P AI
Sprint Summary
Daily Objectives
- Do Sprite Rendering
- Create Demo Platformer
- Start Tetris
Notes
So I’m gonna start with a brand new spriteScene. The goal of this scene is to first:
- Make a rectangleObject for the ground
- Make a playerObject
- Affected by gravity
- Moves with wasd
- Can jump
- Sits on the groundObject
- Give the playerObject a sprite
- 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:
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?
- top
- left
- right
- bottom
-
top right -
bottom right -
bottom left -
top left -
inside
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
- discussed how to detect direction of collisions and how to resolve them accordingly