Category Archives: #CS

The Liberated Pixel Cup! – Dev Blog 1

Image

The time is finally upon us. The art portion of the Liberated Pixel Cup has reached its deadline, which means that the programming portion of the contest has begun! The competition is a month long in which us code monkeys need to use the art assets that were generated to make the best possible game that we can. Since this pixel cup is “liberated”, all of the source code will be available under the GPLv3.

I am working with someone that I only through IRC (#liberatedpixelcup on Freenode) with the nickname of fr33mind. We will be making a Pokemon inspired game where you control monsters to use in combat. The actual gameplay details will get fleshed out more as the competition goes forward.

We are using libGDX to make the game. LibGDX is a fantastic Java library that allows us to write a game that runs on the desktop (GNU/Linux, Mac, Windows) and on Android devices with very little platform specific code.

Above is a screenshot of my experiments with libGDX. Here you see a path of ghosts that was generated by my implementation of the A* pathfinding algorithm. It took a long time to wrap my head around it but it is a crucial element to the game considering that users will move across the map not only with arrow keys, but by touching/clicking areas on the map (my Android phone has no D-pad). This makes decent pathfinding a must have so I wanted to try to get it out of the way early. The code performs well on the desktop but for some reason takes about 3 seconds to run on my Android phone, which is a serious problem. My choice of data structures or too much memory allocation could be the problem and I need to investigate who the culprit is. I’m using a PriorityQueue and a HashMap to maintain lists, and a Pool (in libGDX) to minimize memory allocation, yet the problem persists.

I’m going to try to keep this development blog going over the course of the month with screenshot updates. Let’s see if I can manage to actually do that.

UPDATE:
Turns out the performance problem was because of how I was drawing the path on screen and NOT the algorithm itself. I have since abstracted away the things that are dependent upon a specific tile map implementation and have a rather generic set of classes to use for pathfinding.

From the blog David Thompson » WSU CS by davexunit and used with permission of the author. All other rights reserved by the author.

Final blog post and all is well it seems

The semester is over and this is basically my last blog post for now, but im actually thinking of keeping this blog and beginning to use it for things that i find interesting.

 

Basically the euca2ools group presentation seemed to have gone pretty well and everything worked while giving it(which is awesome). Considering the amount of problems that we have been running into coming up to this day we were very excited that everything worked.

John in our group was actually able to upload a CentOS image and get it running on our cloud the previous day of the presentations, and then on the day of the presentations we were able to get a third image up and running with no Walrus errors and SSH into that instance. Dhimitri and I were kind of surprised to say the least cause the day before Walrus was giving us the 403 Forbidden error, so it seemed to have fixed itself….

 

Walrus may have just had a hiccup and that restarting it that day may have solved the issue we were having. Dhimitri also managed to get up a new node running which you could see with the euca-describe-availabilityzones command. All in all, it seemed that the Euca2ools wiki worked out for the best and seemed that a lot of people were able to follow a lot of the steps to use for themselves. This was a really fun and interesting project to work on despite a lot of the issues that kept happening on our way but i think it was for the best cause many of us gained a lot of experience and a lot of understanding of the whole Cloud computing and what it is.

From the blog armindoa » WSU CS by mindoftw and used with permission of the author. All other rights reserved by the author.

Couple of weird oddities..

Leading down to the couple of weeks of the semester and beginning to finish up/wrap everything that we have done up to present, we ran into a couple of issues.

Dhimitri and I were in the same Euca2ools group for the presentations so we were working together through the weekend on what we were going to present and go through as a demo during the presentation. As he was working on a script, i was going through and testing our cloud by uploading a different image and kernel and trying to get more instances up and running, and also deleting images from the cloud.

 

The first issue that we ran into was a problem with getting a new instance up and running. At first i thought it was cause i did not bundle the kernel and image together correctly, so i tried it over and over again until i though it was perfect. The image that i used was the same image as the one that was currently running, so when it was not working we knew we had a bit of a problem. From what the NC log told us we were getting some type of 403 forbidden error and seemed to be stopping us from running instances.

A second issue that occurred, was after uploading quite a few images, kernels, and ram-disks the amount of images on the cloud was kind of cluttered so i wanted to delete some of them. When running the command to delete these images however they were not being removed. We would de-register them and delete but they were not being removed. They stayed on the cloud and listed as de-registered so we restarted the services and still nothing the images appeared back on the cloud as normal.

From the blog armindoa » WSU CS by mindoftw and used with permission of the author. All other rights reserved by the author.

Success at running images!

Towards the final weeks of the semester we actually managed to put together a cloud that was basically running. I say basically running because there still seems to be a few bugs here and there that causes some issues every once in a while.

In the week that we managed to finally get an image up and running Dave actually had decided to reinstall eucalyptus on our cloud with the packages that Eucalyptus team had end up putting together halfway through the semester. During class he actually managed to quickly install all of the packages and set everything up, while long and I managed to package and image with a kernel that was working on the ECC cloud, and we actually managed to get it running.

This was a success at running an image and all seemed well but there was still some work to be done, we could run one image but when we tried to run more it was not allowing us to due to not enough resources and seemed not to be assigning IP’s correctly. So there must have been a problem with the network configuration, Mike was tasked with flattening the network and after some tweeks that Dave did to the networking configuration on the cloud all seemed much better.

We were able to get multiple instances up in the long run and the troubleshooting that Dhimitri and I have been doing seemed to help locating where some potential problems were by going through the nclog file.

From the blog armindoa » WSU CS by mindoftw and used with permission of the author. All other rights reserved by the author.

Creating a bootable disk to flash BIOS

One of the issues that we had while setting up our cloud was incompatible BIOS revision on the machines we were using. They were out of date and did not allow the use of virtualization, so we had to update the BIOS a certain way with the DELL Executable that was the only way to update the BIOS was using an EXE.

 

The first step to creating the bootable disk was downloading FreeDOS so that we can boot up into FreeDOS and run the executable.

In order to do this you do: wget http://www.fdos.org/bootdisks/autogen/FDOEM.144.gz

Then, gunzip FDOEM.144.gz to unzip the file.

 

The second step is to copy the BIOS flash utility and the BIOS image that needs to be used to upgrade, and mount it to a floppy disk image. Here is what you do in order to complete this step:

modprobe vfat

modprobe loop

mkdir /tmp/floppy

mount -t vfat -o loop FDOEM.144 /tmp/floppy

After mounting the Floppy you want to copy the EXE. that you downloaded for the BIOS:

cp DELLBIOSVERSION.exe /tmp/floppy (not actual name of the bios)

then unmount the floppy: umount /tmp/floppy

 

Step 3 is to burn the bootable CD which emulates a floppy device.

mkisofs -o bootcd.iso -b FDOEM.144 FDOEM.144
cdrecord -v bootcd.iso

After you have created this bootable disk, all you have to do is boot the CD in the machine and basically type in the EXE. and it will autoflash to the new bios.

From the blog armindoa » WSU CS by mindoftw and used with permission of the author. All other rights reserved by the author.

All about git

Last week’s class was, for reasons that were made quite obvious, all about git. Just from the examples and small bit of experience we got with this tool in class, I can already tell that it will be extremely valuable for the remainder of the course, and my career as a computer scientist. Version control is a new topic to myself and going over the functionality of git made it fairly straight forward. It will take a little bit to get used to the commands to use git efficiently, but that goes without saying.

I actually think it would be a good idea to have CS students learn about git much earlier in their college careers and put it to practice in group coding assignments. This would provide students with a work environment for a project similar to the real world, long before they actually get there.

From the blog clacroix12 by clacroix12 and used with permission of the author. All other rights reserved by the author.