Interface Type

Interface names conventions By convention, one-method interfaces are named by the method name plus an -er suffix. Define an interface type It start with the keyword “type” follow by the interface name (ended with -er). Begin of a block of code symbol “{“, the function name (eg. Greeting() function and return a string ). One… Continue reading Interface Type

Categorized as Interface

Structure of Love2d

love.load()  love.load to do one-time setup of your game love.update(dt)  love.update which is used to manage your game’s state frame-to-frame. Much like a game loop love.draw()  love.draw() which is used to render the game state onto the screen. Example Draw a rectangle and it continues to expand in height and width — Load some default values for… Continue reading Structure of Love2d

Running a Love2D game from Visual Studio Code.

From a folder that contains a main.lua file. On the VSC’s project folder has the main.lua file, and the Pixelbyte’s Love2D extension support installed. To run the main.lua file just press ALT + L (default keybinding) to run the Love2D game.

Setup Pixelbyte’s Love2D Extension for Visual Code (Windows) Keybindings (Default – ALT + L) Run Love2D on the current project folder: NOTE: YOU CAN CHANGE THESE KEYS IN File->Preferences->Settings Path of the love.exe program (Default) Set the path to the Love2D executable: Change these in File->Preferences->Settings

Go (1.15.6 or later) Installation and Setup in Windows 10 (Fresh Install)

Official Go download page, this link gives you more option to choose from OS platform and OS architecture x86-64 build. And you can use the go build command parameter to building a binary for an application that can run for CPU of x86 (386) and x86-64. Install Open the MSI file you downloaded and… Continue reading Go (1.15.6 or later) Installation and Setup in Windows 10 (Fresh Install)

Range Over Slice and Map  go build ./main1 -> shan kuo2 -> Hoi Leng3 -> Choi Yan4 -> Evelyn Chan

Setup SDL2 and C++ on MacOS Catalina

Download the SDL2 binary version (pre-build) This packages contains the SDL framework for OS X.Conforming with Apple guidelines, this frameworkcontains both the SDL runtime component and development header files. To Install:Copy the SDL2.framework to /Library/Frameworks You may alternatively install SDL2.framework in your home directory by creating a subfolder /Library/Frameworks. if your access privileges are not… Continue reading Setup SDL2 and C++ on MacOS Catalina

Categorized as C++