I have learned Matrix in the first year of university Sem 1, the structure, features and it's calculation, but I have no clue how can it be used in programming :(
Yesterday I was thinking how to make a 2D platformer map in Pygame, and all of a sudden I remembered that matrix is good for computer graphics and I tried to use it to make a simple platformer map, and it works!!!
So I wander if I can make a map editor using Pygame and matrix
Here's the video about how I turn the matrix data into a grid, which I think is an important part to make the map editor
Code:
Inc
Music:
• [No Copyright Music] | Aesthetic Music | C...
Timeline:
00:00 The final result
00:12 Pygame basic setup
02:21 Matrix data
03:26 Sprite file for Grid Block
04:25 Place Grid Block using for loop
05:28 Function for detect the mouse click on Grid Block
07:28 Finish
#python #pygame #gamedevelopment