Saturday 31 October 2020

Happy Halloween: How to create a battle royale fighting ring

Happy Halloween everyone! For anyone interested in Minecraft, or playing Minecraft, know that this is a special day for Minecraft. Some of the mobs will wear pumpkins on their heads just today. Thankfully, I had some free time to play with the little one today, so I decided to build a fighting ring for laughs.



If there is something fun to share, why not? Decided to write instructions here to help others build something similar to play with. It is not a comprehensive guide, but it should offer just enough information for someone else to build. Have a look at the YouTube video, to see if this is something fun for you.



First, you will need 64 white concrete blocks. For the lazy ones like me, who can't be bothered to Mine and Craft too much, just switch on the cheats in the settings, and type the following command (@p means nearest player):

/give @p minecraft:white_concrete 64

Build an 8 by 8 square using the white concrete. Now, build the 4 posts at the 4 corners using sea lanterns. Use the following command to get them.

/give @p minecraft:sea_lantern 8

Go to the 4 corners and place 2 sea lanterns at each corner, forming posts that are 2 blocks high.

Subsequently, you will need 48 chains to build the "ropes" of the fighting ring. These chains allow you to shoot through the gaps between them, and can also be used on defence towers for shooting mobs from a height, while not falling off the towers. Type the following command:

/give @p minecraft:chain 48

Place the chains horizontally to make the "ropes".

Now, you will need command blocks to do the next part. Use the following command:

/give @p minecraft:command_block

In order to place command blocks and embed commands in them, you need to set to creative mode first. Type the following command:

/gamemode creative

Now, break the 4 corner white concrete blocks within the ring, and place a command block in each of the holes.

Right click a command block to enter commands. For the 4 command blocks, enter one command in each of them, based on the following 4 commands:

/summon minecraft:iron_golem ~ ~1 ~

/summon minecraft:zombie_villager ~ ~1 ~

/summon minecraft:skeleton ~ ~1 ~

/summon minecraft:villager ~ ~1 ~

Notice the symbol "~". It means the x, y, z coordinates of the command block. "~1" means 1 block above the command block in the y direction (vertical). That prevents the spawned mob from getting stuck.

Now, you will need pressure plates on each of these command blocks, so that they will summon something everytime someone steps on them. Use the command:

/give @p minecraft:oak_pressure_plate 4

Place one pressure plate on top of each command block. That can be done in survival mode. Use the command:

/gamemode survival

Now, to get out of the ring to continue building, give yourself ender pearls, and right click to throw them and teleport to the spot where these ender pearls land.

/give @p minecraft:ender_pearl 5

Use one ender pearl to get out of the ring. Now, you will need to create buttons to summon mobs from outside the ring. Give yourself 4 stone buttons.

/give @p minecraft:stone_button 4

Place the stone buttons at the wall of the white concrete where it faces the command blocks. See video for details.

Now, you will need to create kill switches to "reset" the fighting ring, in case it gets too messy. Switch back to creative mode, and put 4 command blocks in the ground next to the ring.

/gamemode creative

Now, place the 4 command blocks in the ground. Right click each of them, and insert the following 4 commands, one in each block:

/kill @e[type=minecraft:iron_golem]

/kill @e[type=minecraft:skeleton]

/kill @e[type=minecraft:zombie_villager]

/kill @e[type=minecraft:villager]

Now, switch back to survival mode, and give yourself 4 stone_buttons:

/gamemode survival

/give @p minecraft:stone_buttons 4

Place one stone button on top of each of the command blocks. When you press the buttons on them, they will kill the specific type of mob nearby.

Now that you have finished building the fighting ring, press the buttons on the side of the ring to summon mobs, and let them start a fight. You can choose to shoot from outside the ring, which is safer, or dive in using an ender pearl. Have a look at the YouTube video to see if this is fun for you.





Sunday 27 September 2020

Another Milestone Reached


Friday 14 August 2020

Another LifeHack: How to revive a 10 year old laptop (Asus G51J)

I promise that this will be a long and detailed post. For those who just want to learn how to repair old laptops, scroll down to the first image.

People who know me know that I like to repair stuff at home, to save costs and make full use of every resource. An example is a low spec netbook running Windows XP that I configured to control and synchronise hardware to do cutting edge research work.

Today, I will show you how an old gaming laptop (Asus G51J) can be revived, when one of the hard disks died. The problem happened when I was installing something on that laptop. Somehow it stopped responding. Windows restore did not work. I suspected that it was a hard drive issue. So it was kept in a bag inside a cabinet for many months to collect dust. Fortunately, I did my "homework" whenever I changed any system configuration. Somewhere in 2014, I wanted to try GPU programming using CUDA on this machine. So I downloaded and installed OpenSuse on this laptop. As this laptop came with 2 hard drives inside, it was "clean" to install Linux (OpenSuse) components on the second drive (500GB), while leaving around half the space for Windows backup (around 250GB in this case). This installation method made it really easy to remove the Linux installation, as putting Windows and Linux on the same physical drive may pose issues later with bootloader removal, if you don't wish to keep the Linux system.

Here is the original configuration after I installed OpenSuse:

After installing OpenSuse, I made a backup of the Windows 7 installation on Disk 2. This was the part that saved this laptop.

The laptop looks like this on the outside:


The machine refused to boot no matter what I did. Since I had 2 operating systems, I decided to go into the BIOS settings at startup, to use the second drive to boot. As expected, I got into OpenSuse successfully. However, I wanted to keep the OEM Windows 7 in this case, and disk 1 made scratching sounds while I tried to boot from that drive.

So I opened up the back, carefully, in order not to mess up the screws or lose them. There are many to remove. This is how it looks like under the hood. Remove the 4 screws, place them safely in a container somewhere, then slide gently to remove the hard disk mount. This means disk 1 has been removed. Bye Windows 7. I weep for you. Stupid Seagate hard disk, the only brand of hard disk where the reader scratches the physical disk like a DJ.


There are 4 screws on the sides of this mount. Remove the 4 screws on the mount, then install a new hard disk on the mount. Now, install the new disk 1 back into the machine, slide into place and put the screws back where they were.

You can skip method 1 and go to method 2 if you have a system image on disk 2

METHOD 1: DVD backup

Now, I'm a bit more careful not to lose the lifeline (OpenSuse) here, so I removed disk 2 as you can see in the photo below:


Okay. If you were as conscientious as I was, you would have created a repair disc using the DVD/Bluray drive when you first bought the laptop. This is how it looks like (made in 2010):


Pop this into the DVD/Bluray drive, with ONLY an empty disk 1 installed, of course. The default boot sequence will load the repair disc, and attempt to restore the OEM Windows 7. If you see the following screen, good for you, there is a chance you can get Windows 7 back.


Choose keyboard:


In this case, there wasn't any system, as seen below, since I have only a new hard disk inside (see below).


After you press "Next", the repair disc will attempt to find a system image that you can use. In my case, an error message popped up since there wasn't any. So I chose to use system image (the backup I created used 4 DVDs). Follow the instructions to insert the final disc (DVD 4 in my case), then click "Retry". It will try to restore the operating system using the DVDs.


Then the following showed up and I clicked "Next"


And "Next" for the following window as well

Click "Finish" for the following


And "Yes" for the following


Now, be a good boy and follow the instructions below, switch to disc 1


Now we wait as we stare at the progress bar below:


The DVD drive made a lot of funny noises after I inserted disc 1. Of course it failed. So I put hard disk 2 back where it was, and hope that there exists a working system image. It would have worked if my DVDs weren't damaged.

METHOD 2: System image on hard disk 2

Okay. If you were as conscientious as I was, you would have created a repair disc using the DVD/Bluray drive when you first bought the laptop. This is how it looks like (made in 2010):


Pop this into the DVD/Bluray drive, with both the new disk (1) and the old disk 2 containing a system image installed in the laptop. The default boot sequence will load the repair disc, and attempt to restore the OEM Windows 7. If you see the following screen, good for you, there is a chance you can get Windows 7 back.


Choose keyboard:


In this case, there wasn't any system, as seen below, since I have only a new hard disk inside (see below).


After you press "Next", the repair disc will attempt to find a system image that you can use. In my case, it found a system image on hard disk 2, on E drive (fortunately!). Click "Next"


When you see the following screen, click "Finish"


Next, wait patiently for a few hours while that progress bar moves really slowly (see below)


Around a few hours later...zzz...


And finally, after a grand total of around 4 to 5 hours,


Tada! I got my 10 year old laptop working again! Only cost me 100 dollars for the new hard drive (2TB). If you like this article, and want to find out how you can fix hardware at home, leave me a question, so I can help you where possible.

Of course, after restoring the system on this super old gaming laptop that is still pretty fast now, I created a system image, stored one copy on the new disk 1 inside, and made a copy of both the old and new system images on an external hard drive, just in case. If you keep copies of original systems somewhere safe, there is a chance you can do the same and restore old laptops the way I did.

Thanks for reading. Keep a lookout on this blog if you are interested in random life hacks, games and other random topics of interest.


Tuesday 28 April 2020

My window to the outside world

In the literal sense, I found a window to the outside world. Am truly grateful to have a chance to be out there. Been in my cave for so long that it is difficult to tell which day of the week it is. Realised that I had not rode my motorcycle for so long, that I had almost forgotten how to. Not many cars on the roads these days. Clear skies, light traffic and much less stress.

Please let this Circuit Breaker period end soon. I hope many others who are locked in have not gone all Short Circuit. At least I can power up my circuit and go out. Some may be in Open Circuit mode and never have the current to power their lives, and it is sad to see more of my fellow Singaporeans suffer.

Another short blog post. Haven't got much to share since life in the cave is pretty monotonous.

Saturday 25 April 2020

Some community service for the Circuit Breaker period in Singapore

I guess many Singaporeans are stuck at home, worried about their jobs, the economy etc. While I can't find the extra cash to donate for the greater good, the time at home hasn't been squandered (at least not 100%). Last year, I started picking up Scratch, and came up with a whole series of lessons for kids to learn about programming. Found many ways to create interesting game interfaces, that can be incorporated into an additional course. It wouldn't be difficult to teach using a Zoom session or via other web meeting platforms, but I do not have the students at the moment. Hence, the decision, as a form of community service, to create a YouTube video for everyone to learn the basics. Embedded video is shown below. It took about 8 to 10 hours to get this done, as I had to run through the screen recording at least a few times. The voice was narrated subsequently, and final video created by synchronising the different video and audio tracks created in the process.



As this is a time consuming process, it is quite difficult to find the motivation to do this. If there are at least 200 subscribers on the YouTube channel, I will spend the time to create the next video lesson for free, as I will know that there are enough viewers for these classes to be useful. Please subscribe if you think the lesson is useful for you. I do hope that learning will take the boredom and worries away for as many as possible.

Have a look, and decide if this is good.