Showing posts for category: JavaScript
A list of things I really need to get a handle on. Some I'm used commercially and some I haven't.
* React (probably my priority as it focuses on the V bit of MVC)* Vue (I like the idea of this one's simplicity)* Angular (probably a bit more involved as it is a full client-side MVC endeavour)* Laravel (the go-to framework for PHP MVC support)* Python (probably the lowest priority; more intrigue)
I'm very much a vanilla guy. The HTML, CSS, PHP, JavaScript that I write is done without libraries (excluding, j...[more]
I use MySQL a lot. I run it locally using MAMP for a ton of data projects that never find their way online.
My current development project involves a one-off operation to insert 1,000,000 rows of data to a small table. The table has 2 indexes - a Primary Key and a specific index on 2 columns.
The project is driven by JavaScript that then AJAX's out calls to PHP which runs the database operation.
The actual project is a pixel scanner which uses HTML5's Canvas API to examine a pixel, determine its RGBA val...[more]
The whole concept of Promises in JavaScript I have always found useful. The action is handled asynchronously and the result is either a resolution 'resolve' or a rejection 'reject'.
Where it started to mangle with my brain cells is with the async/await functionality introduced in later versions of ECMAScript.
A simple JavaScript Promise can be defined as below:
const myPromise = new Promise((resolve, reject) => {
// Simulate an asynchronous operation (e.g., fetching data from a server)
s...[more]
Dev log - Development started December 2022
Oops. Appears I have a problem with the high score table. Investigating.
May 2023 - modifications
Added touch control - can now be played using a mobile phone / tablet etc.
Removed the high score table for touch control - too much faff for selecting the characters when entering your initials
Touch control uses localStorage for saving the high score
Lightened the playership's colour to avoid clash with environment - better for mobile play
Raised the st...[more]
Player's ship changing direction
I have a few issues with the way the player's ship changes direction.
In the original Defender the ship simply switched to face in the opposite direction and the ground and player ship shifted accordingly until the ship was in the exact opposite x co-ordinate.
The way I have it at the moment isn't quite right and the ship 'swings' far too much. Needs some closer attention as currently it's fairly maddening to 'swing' and ...[more]