Cross-platform Desktop JavaScript 3D Game Engine with NodeJS, Electron and BabylonJS

Recently, I have been experimenting with writing 3D games – mainly for mobile Virtual Reality. Today I though I might want to have a go at writing a desktop 3D game, and played with Electron, NodeJS and BabylonJS so I can write my code in JavaScript and use HTML5 to develop my own cross-platform 3D game engine.
Continue reading Cross-platform Desktop JavaScript 3D Game Engine with NodeJS, Electron and BabylonJS

PHP 7 Object Properties Type Safety with Setters and Getters

PHP 7 introduces scalar type definitions: your function parameters can be of a given type, and function return type declarations ensuring your function will return results of a given data type. This can increase your code quality by enforcing a specific behaviour of your code, almost similar to how a strongly typed language does. However, PHP does not yet support variable or property data types – leaving the possibility of variables and properties to be unpredictably converted from one type to another within type safe functions. Below is a technique that enables you to guarantee object properties will always be of a given type.
Continue reading PHP 7 Object Properties Type Safety with Setters and Getters