Category Archives: open source

Whoops.

(This blog post is a few weeks old and never was posted), I’ve been pecking away at the app, though.  Jon built a great foundation for our app and it’s time to get cracking and finish this bad boy.  Right now I’m playing catchup on all the documentation for Android (big thanks to Jon for meeting and walking me through).  TheNewBoston started to get too slow and I started using google development docs, big difference and ultimately better.

Finals are coming up for my summer class and then I can focus on this app.

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

The Liberated Pixel Cup! – Dev Blog 2

It’s been a slow start, but hopefully things will start to move a bit faster. I am on vacation for the week and I have managed to get some work done.

I spent several days trying to figure out the best way to represent Actors on the world maps where the player can walk around. The Actors walk one tile at a time, fitting to the grid, rather than having “free” movement where Actors can move by any increment. It is much easier to implement free movement (which is what I’ve done in the past) than tile movement. I re-wrote the code that handles all of this several times before I found an implementation that was clean and functional enough.

In this screenshot there are several randomly spawned Actors that have walked to random places on the map. They do this by using the A* pathfinding algorithm I talked about in the previous post. There is an Action class that actually performs the walking animation. This Action is smart enough to re-route upon collision with another Actor.

The player can touch/click on a map tile to walk a path to it. For desktop users or certain Android devices, the D-pad can also be used to move the player around on a tile-by-tile basis.

I have also started work on an interaction and dialog system. In the screenshot, the text box shown is a result of the player interacting with the sign on the building. Right now the text box only displays one string of text, multiple strings and maybe even branching dialog paths still need to be done. Item chests are on the to-do list as well. Hopefully I can get them done soon.

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

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 Thoughts about CS401/Eucalyptus

I had a lot of fun working in this class it was definitely a difference experience than almost all my CS courses before hand.   I liked working on a big project my only request for the future is to see more code but, something that was really unavoidable for a beta-test style class that we had.  I know it wasn’t anyone’s fault just too many problems with the cluster to really get into it.  Just because we didn’t get coding done doesn’t mean I didn’t learn quite a bit about how exactly working on a big project was like.  Learning to use git, irc, and being on a list server were pretty new experiences for me, aside from gaming I had never used irc, git seems to be invaluable to know since every employer I’ve talked to seemed excited that I already know it.

 

Main thing I’ll take away from the course is exactly what cloud computing is, all the nomenclature we’ve learned, how to work on large scale projects, how to communicate with a large group of people from different time zones and different backgrounds in programming/computer science.

 

Final presentations today were great, seemed like every group found a lot of different topics to talk about and cover and they all seemed to master their specific topic.

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

Final Wiki Adjustments

I never got around to putting up this blog post last week but I figure it’s worth posting.

 

After siting down with Chris while he worked his way through our wiki was great, really gave me a chance to see how a wiki flows through another set of eyes.  Luckily we’ve all been doing a great job of working with the wiki adding the needed information and adding it coherently.  Only issues really were fixing formatting adding things like, “don’t forget to use sudo” to the top of commands rather than after.  Only “big” changes I made to the wiki was adding a bit on git and how to install python user a package manager.

 

I enjoyed working with Chris getting his input, I think it was smart to do it on my own first, since I knew a bit on how to get everything running from doing it a few times, then having him go through.  Since I never posted this Karl mentioned that there is a whole field of engineering in something like that, actually testing your code/wiki/idea on an audience and jotting down notes.

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

Test Run of the Wiki

This week I am going to start from scratch and try to install Eutester+euca2ools from our wiki only, keeping notes along the way to see if we need to update anything to make it more clear.  I imagine from what I’ve been reading that we’ve made quite a large amount of progress over this course and when I had to restart last month it took me maybe an hour? (would be been less if I realized >>> meant that you type python ) but that’s besides the point.  This blog post will serve as a note pad for anything our wiki should make clearer.

 

 

Updated this:

I decided that I would find someone I could use that doesn’t really know much about Eucalyptus and at least knows how to work Linux.  It turned out pretty well, I have some notes jotted down that I can finalize the wiki with to make it as fast as possible.  Everything was pretty well laid out, aside form small things like the note “don’t forget to use sudo” after they entered all the commands.  One thing I need to add is that we never directly say to install boto.

 

Overall this test went pretty well.

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

CS401 – We Have Liftoff! (and other news)

Took long enough, but we now have a working cloud!!! It’s been a real struggle to learn the proper way to configure and install things to get the whole system to work properly. Applying what I learned from Andy Grimm and taking his advice to install Eucalyptus 3 via packages rather than building from source, I was able to start fresh and have a functioning cloud in a little over an hour. I was filled with joy when a classmate succesfully launched a VM instance and logged into it via SSH.

Too bad that the semester is nearly over now. Oh well. I need to finish up my documentation for how a newbie can create a Eucalyptus cloud. I was really hoping to get into some source code before the semester was over but that is just not going to happen. Even though I haven’t written a line of code this semester, the course has been invaluable. I am now far more comfortable interacting with software developers via IRC. I have learned a good deal about Linux system administration through failing over and over again. I still hate writing documentation, but now I have gotten a little practice at least. 😉

Hopefully I can wrap up my documentation project soon and get working on the final assignments for the course: an ethical analysis of Eucalyptus and a slideshow presentation about the work I did over the semester.

In other news, the WSU programming team (of which I am a part of) got 4th place out of 27 at the competition held at Quinnipiac University! We solved 4 (nearly 5) out of the 6 problems. I wasn’t expecting such a high so it came as a pleasant surprise to see that we got 4th. This was my last year on the team so I’m glad we performed well for my final competition.

Oh, before I forget: after this semester is over… I’m done with undergrad! Which means I need to find work, preferably developing FOSS. Just need to finish my resume. So, who wants to offer me a job? 🙂

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

CS 401 – Quality Time with Andy Grimm

On Thursday, the 19th, Eucalyptus developer Andy Grimm paid WSU a visit. Other students and I ate lunch with him and our department chair Karl Wurst. Our lunch bill is being paid by Red Hat, so even if I never work there and get a pay check from them, I can at least say that I had lunch on them one time. 😉

After lunch, Andy and I spent the next 3 hours trying to resolve the various issues that were keeping our cloud from functioning properly. The good news is that I learned a lot about how Eucalyptus works, networking, and some neat command line tricks. The bad news is that our cloud is still not functioning.

As I pointed out in my last post: networking is hard. It is especially hard when working on the university network whose topology is pretty much unknown to me. The first big mistake that I made when I set up the network for the cloud was split the LAN into 2 subnets. The CLC, SC, and CC were on one subnet, while all the NCs were on their own subnet and the CC acted as a router for them. I had misread some networking documentation and mistakenly thought that having the NCs are on their own subnet would make things easier for later on. Andy set me straight about that and I “flattened” the network out so all of the NCs are now on the same subnet as the other Eucalyptus components. Next, we set up ethernet bridges for virtual networks that will be needed for the virtual machines. That was mostly straightforward but through some slight misconfiguration I encountered Red Hat networking hell involving a renamed `eth0` which Andy resolved for me by messing with udev.

I thought that I had a recent enough kernel installed on all of the machines to avoid the kernel bug that breaks Walrus. Turns out I didn’t. So no matter what we did the cloud would never function until that was resolved. A `yum update kernel` and a reboot took care of that. Then, for some strange reason, PostgreSQL processes wouldn’t start. Andy started them manually and things seemed to work just fine for subsequent reboots.

Despite fixing all of these issues and making a ton of progress in such a short time, we were still unable to run a VM instance. Andy and I ran out of time (he had a train to catch and I had to return to work) but he suggested that I essentially start over once again. This time I will be using the Eucalyptus packages that are available from the Eucalyptus repository.

So, another week goes by without a working cloud… but I learned a lot. Many thanks to Andy Grimm for making me a better system administrator.

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

More Wiki Editing and Python Learning

I added a big index at the top of the glossary page, learned how to actually link to certain part of a web page in a PMwiki, was actually a lot easier than what I figured it was here was where I found it, turns out you just make a simple [[#anchor | text ]] at the particular part where you want to reference you #anchor that part then  use [[#anchor | text]] and you’re done.   It was silly tedious to do but, it does give it a quicker and easier way to access the glossary, also props to Dan Adams, the glossary is looking very nice.  Since I learned how to use links without having to just post the ‘ugly’ url same page as the anchor tutorial I have been fixing the entire glossary page so it will read “read more”, “wikipedia entry” or something along those lines.  With those edits I am also fixing the capitalization of each entry.

EuTester has been great for learning Python, I was long over due to learn it anyways.  I started using Zed A. Shaw’s book (great resource for learning a language for free/very cheap) and then after I knew enough to make better sense then I started looking at all the Python that eutester had.  Commenting has been great for learning because it forces me to look at the code, analyze what I am reading, then form coherent ideas from that. Zed’s book along with the multitude of forums while google searching has really been great.

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

Make the Wiki as Easy as Possible

I’ve been spending some time trying to clean the wiki but also to make it very user friendly.  Instead of text telling you where to go I am swapping that for actually linking the person reading to the page.  If you’re confused while trying to set up your cloud, make credentials or anything else the last thing you want is to have to do is to navigate though a wiki you’ve never used before.

Aside from this I’ve also been commenting code, which I will get to in a second blog post, I didn’t know how to push to git, probably should have taken the 30 seconds to read how to do it. But I just kind of left the saved files on my computer and figured I would just submit them when I asked how to submit..unfortunately each one of them have already been commented and pushed.  My loss. There is still a bunch of code left to look at.

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