Canvas examples on animation basics and beyond

Time to take a new project with my canvas examples series of posts and focus on making quick hyper casual style games. So this post will be on an simple idea for a project that I am just going to call into the black. The basic idea is to just have a display object that is moving threw space and the game is just about seeing how far one can get until they get board and move on to something else.

It seems like it is a good idea to do something to find out how long it will take for a player to play threw one of my idle games. I say this because when I play one of my own games, or write some code to automate that process it seems that I sometimes end up playing threw the game way to fast. I would want to have games designed in a way in which people would keep coming back rather than just play threw the game and then stop playing. So an idea for this project came to mind where I just divide a distance by a distance per second rate to get the amount of time it will take to go that distance. I can then do things to increase the speed and wherefore reduce the amount of time it will take to move that distance.

Read More

Git size of repository

I have some repositories that keep growing in size, so far this has not presented a problem for me, but I can not help but thing that at some point in the future it will sooner or later. So for now I thought I would take a moment tot just fool around with a test git folder, and do a little research on how to know how big a git repository is to begin with at least.

In late versions of git there is the git count-objects command that can be used to know how many objects there are and there disk consumption. So this might be the best way to know how much space a git folder is taking up assuming that I will always be using a late version of git that will support this.

Read More

linux grep command for finding text in files and directories

In a Linux environment there is the Linux grep command that is useful for finding text in a file, or a bunch of files in a directory when it comes to using it recursively. The grep command should not be confused with the find command, which is somewhat similar actually only the find command is used to look for patterns in file names, while the grep command is used to look for patterns in the content of files, or some piped in standard input.

I have been starting to write a few posts on various commands that often are part of Linux, or can be easily added to Linux, and grep is certainly one such command that I should write a quick post on because I am sure it will come in handy now and then with what I often work on when it comes to lengthly collections of text files.

Read More

Turn off screen blanking in Raspberry PI OS

One of the little things that I like to have control over after setting up a clean raspberry PI OS image is to turn off, or at least have control over screen blanking. When first starting out with a clean image of raspberry PI os, after a few minutes of leaving the raspberry pi alone the screen will go blank rather than continuing to display whats going on.

There are many use case examples of using a Raspberry pi to run some kind of application where I would like the output to continue to be displayed on a monitor without me having to move the mouse or touch the keyboard every so often. For example having the raspberry pi display a web app in kiosk mode where I want the interface, and any info that it might be displaying to continue to be well displayed.

The reason why the screen blanking happens is because screen saver settings cause the screen to go blank after a few minutes by default, but there is not software installed to easily control these settings by default. So in this post I will be going over some options for having control over this including th use of the linux xset command that should be there to begin with, and also a package called xscreensaver.

Read More