aagrawal05 / AiBallPitSwimmer

An exploration into 2D swimming with AI, using the matter.js physics engine.
0 stars 0 forks source link

Working game loop, centered on agent (ragdoll), #3

Closed aagrawal05 closed 3 years ago

aagrawal05 commented 3 years ago

Remove walls and make a short platform for agent to "dive off of". Make ball pit "flow" (loop around to the front, see examples, implement with camera to center agent while balls flow from right and teleport to the left).

aagrawal05 commented 3 years ago

1/2 done, added "flowing" ball pit. Still needs optimisation and needs camera to be centred on agent with moving walls. as well as some sort of calculation to determine how far to the left or to the right we are, and through that determine whether the diving platform needs to be seen

aagrawal05 commented 3 years ago

Much more fixes, chunk based rendering prototype to fix bugs initiated, needs lots of bug fixes. Also needs "Diving platform". Needs some better variables --> chunk amount to organise it Needs some thinking about edge cases when dealing with moving the balls in the chunk that needs to be moved Do some research and find out best organisation of chunks and sizes using variables. Current set up: 2 buffer chunks, 3 rendered chunks, 2 buffer chunks. --> make sure padding fits with 3 rendered chunks (1.5*chunksize-agent.bounds.width/2), same with width

aagrawal05 commented 3 years ago

Chunk rendering working, needs some fine tuning, current setup: 2 smaller buffer chunks, 3 2xsize chunkSizes, 2 smaller bufferChunks Add variables to better change this settings. Added in diving platform, at a fixed position - x:0 Make diving board one of the optional settings at the beginning, for different scenarios when training

aagrawal05 commented 3 years ago

Accidentally closed :P

aagrawal05 commented 3 years ago

Everything necessary implemented in latest patch, improvements to diving board and others to be finished in new issue