#WHW - Weekend Hobby Works #4
My eternal frittering away time has always been building computer games, though I myself never like to play computer game. Absurd? Yes it is. I like to write codes to make games (in the past it was C++) using any language that I know (JavaScript, Python, Java, C++). About a year ago, I discovered this package in Python called pygame (you can pip install pygame). It has phenomenal capabilities for mouse control, pixel control and graphics control. People who are keen, can try their hand at pygame's docs (https://lnkd.in/dvPwDAr7).
Meanwhile, this time, there was issue with my electronics component availability and hence I deep dived to make this below mouse control event, which essentially can be a milestone for developing some type of game. I have an habit of doodling on paper and my son, curious as he is at his age of 5, asked me what if what I doodle, breaks in between and doodle never gets completed and I replied, that can happen only if it is done on a computer and voila! I sat for writing this weekend coding on pygame. Do check the video. It will look as stupid as it could be, but a techie would understand, it indeed is a code that shows magic on screen.
This is dummy's work for breaking the doodles one can do on screen.
It reflects a python's pygame's ability to show case control of mouse as well as on screen event. What can follow this, is left to our own imagination.