Importing Mixamo Animations into Raylib

In the video tutorial below, I show the process of exporting a 3D animation from Mixamo and then importing it into Raylib, with an intermediate step involving Blender.

Firstly, I demonstrate how to choose a suitable 3D animation in Mixamo and prepare it for export.

Next, we switch to Blender, a powerful 3D creation suite, where we import the animation from Mixamo. Here, I outline the necessary settings adjustments to enable successful exportation in the GLTF format, a file format known for its wide compatibility and efficiency in 3D applications.

The final part of the tutorial is dedicated to Raylib, a simple and easy-to-use library for multimedia programming. Using C++, I show how to import our GLTF model into a Raylib project. I further show how to manipulate the model’s size and orientation, demonstrating how to scale and rotate it within the application.

A Decentralised E-Learning System for Micro-Credentials

A decentralised system that allows educational institutions to issue micro-credentials signed by students and later verified by potential employers. The system is designed with the core principle of operating in a decentralised environment without the need for a central authority. The system can be accessed by institutions, students, and employers globally, without registration or reliance on third-party servers, leading to reduced costs and an uptime guarantee. The system makes use of the Polygon Blockchain.

Github: https://github.com/roderickvella/txtAwards

ChatGPT – Extension for Moodle

The world is advancing at an unprecedented pace, and technology is leading the way. Software development is one of the fields that are at the forefront of this progress. Therefore, there is no point in resisting this change or banning tools that facilitate learning in this area, such as ChatGPT.

In fact, I developed a new chrome extension that enhances the learning experience when using ChatGPT in the classroom. This extension allows educators to download their ChatGPT conversations as an HTML file, which can be quickly shared with students. This file can also be uploaded to Moodle, which is a popular learning management system.

One of the main benefits of this extension is that it overcomes the limitations of the free version of ChatGPT. The free version can be slow, which can be frustrating when used in a classroom setting. Additionally, it can produce different outputs for the same input, which can make it more challenging to use in class. With the HTML file generated by this extension, these issues are resolved, and educators can focus on teaching without worrying about technical difficulties.

Download extension from here: https://github.com/roderickvella/chatgpt_html

Ethereum Auth – Express + React

I’ve always been fascinated by Ethereum and what it can bring to the table. This article discusses how we can use MetaMask for user registration or sign-in on web portals.

One of the current problems with online systems is that users have to register on almost every website they use. This means that the user has to generate a new password for every registration. Usually, users keep the same password for every website they register with. This is a very dangerous strategy because the same password can be leaked or hacked, especially if the system they’re registering on is not secure. Example: passwords stored as plain text in the database.

Nowadays, web browsers like Google Chrome are generating secure passwords for you, and these passwords are saved on Google’s Cloud. In my opinion, this is more secure than the previously mentioned strategy, but still, one is saving passwords on a third party. Why should we trust Google with our passwords?

Another popular trend is the ‘Login with Google/Facebook/Outlook/Twitter etc.’ This is also a valid approach and again it is safer than using weak passwords but still one is depending on third parties. If for example, Facebook is down, then the users can’t use your system.

With Web3, we have the possibility for the user to sign up/login using a non-custodial wallet. For example, MetaMask. This means that the user/server does not have to connect to a third party to authenticate a particular user. Everything can be done in ‘offline’ mode. This is possible with the use of private keys.

Continue reading

Decentralised Games

There’s been a lot of hype around NFTs and Web3. Today, I’ll discuss the issues and myths surrounding NFTs in games, as well as how to create a truly decentralised game.

Let’s get started.

In 2007, a friend of mine used SA-MP to create a mod for GTA San Andreas. He designed an online RPG in which you must work to own property, guns, or cars. You might apply for various jobs, including taxi driver, rubbish collector, policeman, vehicle dealer, and driving instructor. The fact that it was geared in a multiplayer context was particularly appealing. This game had approximately ten active gamers, and we used to spend a lot of time playing this mod. Another nice feature was that purchased assets were saved on the server and password-protected for future use. Virtual money was obviously involved, which was also stored per account. Unfortunately, when the server stopped working, all of these assets were lost. All this hard work was lost.

One can argue that this can solved by using smart contracts on public blockchains. Example storing persistent data on Ethereum/Polygon. But could it really be solved that easilly?

Ok. Let’s imagine some cool scenarios. In the future Rockstar implements NFTs for GTA online and the majority of the stuff is saved on the blockchain. Example: Ownership of Cars/Planes/Helicopters etc. Or Activision creates NFTs for Call of Duty online. Example: Weapon skins, Trophies etc.. Or EA Sports will turn all the football players into NFTs. With these scenarios, there will be an opportunity for open trade between all these virtual assets. People can buy directly from each other, swap with other tokens, convert NFTs to Bitcoin and then to Euros, etc. Well, this sounds all exciting but what happens when the online servers shut down? All these NFTs are rendered useless. All that hard work is lost. The only advantage during this process was that people could trade freely on the blockchain, and one could monitor the number of NTFs in circulation. But is this really decentralised?

It is possible to argue that this problem can be remedied by making the code open-source and allowing others to host their own servers. Now I have serious doubts about this. Do you think Rockstar/Activision/EA Sports will open-source their code? Most likely not. Even if they do, hosting such games will require a lot of resources, and there’s a good chance they’ll rely on third-party services, such as Oracles. Another issue with open-source code is that it is not always free to use, even if it is publicly available. For example, the game Sunflower-land (which runs on Polygon) contains open-source code, but it is clearly noted on GitHub that the assets/code cannot be reused. Is this really a decentralised system?

Now there is another problem with NFTs. Wait what? Another problem? Sadly Yes.

Due to storage constraints, 2D sprites and 3D assets cannot be stored on the blockchain. You can save the hash of these assets instead. So, the main question is: where will these assets be kept? One argument is that they can be stored on centralised infrastructures, such as Google Cloud Storage. But shouldn’t our game be decentralised? One could argue that these assets should be backed up using IPFS or FileCoin, which unfortunately would further complicate the process. Also, IPFS does not guarantee that the file stored is indefinite. Is this truly a decentralised system?

Continue reading

Watch the screen of all students in one webpage during online class

So, the problem is that during live online lessons, some students are not paying attention and probably they are doing something else on their PC. I am currently using MS Teams to deliver lectures and sometimes I ask students to share their screen with me during the session so that I can monitor what they are doing. The problem occurs when you have many students in one session. Asking every student one by one to share his/her screen is going to take some time and you are not constantly monitoring their work. So, we need to come with a better plan.

The idea is that every student must stream his/her screen to YouTube Live as unlisted (for privacy issues) and share the link with the teacher. Then, the teacher during the lesson can easily monitor the students’ screens in one webpage. We are going to build a web app using Google Forms for this.

Note: It is suggested that the students stream to YouTube as unlisted. This means that the YouTube link is changed for every session (privacy issues). Therefore, the student must share the updated link with the teacher before every session. Once again, we are going to mitigate this problem using Google Forms.

Continue reading

Philips Hue – Turn On/Off Lights Based On PC Power State

I bought the Philips Hue Bridge with Light Bars to make a cool lighting effect behind my PC monitors. You could easily control them via the Android App, and they look really cool.

The problem is that when I am on my PC, I must manually turn them on/off via the App. I wanted an automated system that handles these requests automatically. This means that whenever I turn on/wake my PC, they light up automatically. And, whenever I put my computer to sleep/shutdown, they turn off automatically.

Yes, I am a bit lazy….

Fortunately, the Hue system comes with an API which can be controlled easily through web requests. Tutorial can be found here: https://developers.meethue.com/develop/get-started-2/

With this API you can easily turn on/off the lights using code. So first, I created 2 PowerShell scripts (TurnOn/TurnOff). One script was responsible to turn on the lights and the other one to turn off the lights.

Continue reading

Lightning Snacks – Bitcoin

A Vending Machine using the Bitcoin Lightning Network on a Full Node Raspberry Pi

Problem Definition

Most vending snack machines are coin-operated. This leads to many drawbacks such as incorrect/no change, some coins are not recognized, management of coins by owner and no coins in your wallet.

Sometimes my colleagues ask me for some coins, and in return they give banknotes or pay me via Revolut. Why should we all go through this hassle if when can do online transactions? We can use Visa/Mastercard scanners attached with vending machines and people can buy snacks easily. Well, the problem is that for every authorized transaction, the bank takes a commission. Is it worth for the merchant to pay a commission for a cheap snack item? I don’t think so. Apart from that, this technique is not recommended because there might be hackers that can attach card sniffers to the vending machine intending to hijack your card. So, what’s the solution?

The Solution

Nowadays everyone owns a smartphone. With Bitcoin, you can have your own non-custodial wallet on your phone. You can do global transactions on decentralized platforms without making use of third-party APIs (banks) to verify transactions. Can we apply this technology to our vending machine? We can but it won’t be ideal. The problem lies in the transaction confirmation time and the transaction fees.

One confirmation (1 block) takes about 10 minutes and we usually assume that a transaction is fully confirmed when it is 6 blocks deep. This means that a full confirmation takes about 1 hour (10 minutes * 6 blocks). This is very fast when compared to traditional systems, but it won’t be ideal for our vending machine system. Imagine our client waiting 1 hour to buy some candy. Since snacks are not expensive, we can assume that one confirmation (1 block deep) is enough, but our client must still wait 10 minutes for the transaction to be processed.

The other problem relies in the transaction fees. Transaction fees are included with every Bitcoin transaction in order to have transactions processed by a miner and confirmed by the Bitcoin network. The space available for transactions in a block is currently limited to 1 MB. This means that to get your transaction processed quickly you must outbid other users. Therefore, it can get expensive to buy some snacks.

Bitcoin Cash (another cryptocurrency – fork of Bitcoin) simply solves these problems by increasing the block size and disabling the ‘replace by higher fee’ feature. Therefore, a transaction can be created with a lower transaction fee and once created, we can safely assume that the transaction is going to be placed in the next block. This might lead to other problems, but I don’t want to debate Bitcoin Cash vs Bitcoin in this article.

The Bitcoin Lightning Network (Layer 2 Protocol on Bitcoin) is the ideal solution for our vending snack machine. It is a decentralized network powered by smart contracts that enables instant payments with very low-cost transaction fees across participants. Lightning enables one to send very small funds in Bitcoin without custodial risk. Everyone can be part of the network by hosting and opening a channel with a node. When opening a channel, participants must commit an amount which is stored on the blockchain. Transactions then can be passed through multiple channels in a mesh network of payment channels. These transactions are not stored on the public blockchain and therefore the base layer fees are avoided. I must admit that it is a bit complicated to work with but once you understand what is happening, you will appreciate the principles behind this system.

1024px-17_node_mesh_network.svg_

Building the Prototype

For this project one used the Raspberry Pi 3 B+ with an external hard disk storing the entire Bitcoin testnet blockchain. The Bitcoin Lightning Network was installed using the Raspibolt tutorial and Python was used to develop the whole system. That is creating the GUI using a game engine called PyGame, interfacing with the LND network, connecting with the Coinbase API for price conversion, making invoices into QRCodes, recursively checking for payments and eventually turning the motors using GPIO commands for successful payments. The Eclair Mobile Testnet app was installed on my phone to test for the client perspective.

LightningSnacks.JPG
Continue reading