I’m sure there’s going to be one or more people coming in wondering if I’m going to go deeper into explaining what I did. I’m not. Quad trees are fairly simple. My math level is algebra and I more than understood how to make quad trees. Theoretically, if you have a moderate amount of programming experience, you should have no issue coming up with your own implementation of a quad tree. I just put this up because I spent a couple of hours working on it so I felt like showing off.
On January 18th, as many of you have heard, there will be an internet blackout to show America’s displeasure with the SOPA and PIPA bills. At the same time there will be a game jam to make anti-SOPA games on that date. I will be joining in both. Join in and be apart of the magic! If you’re not American and hate America, blah, blah, blah, good for you. We don’t like it either, that’s why we’re standing against our own government…in the pussiest way possible. I digress, it’s war!
My form of internet blackout will be a black page with some anti-SOPA text and link to the game. Since I don’t think there’ll be any other way to distribute the game, right?
I had a thought while I was working on the game Alone In the Office (my LudumDare 22 entry). I wonder if I can make this code look more beautiful. So I went through and refactored the code. Okay, so I cleaned it up. There was cleaning to be done. But, I wondered if I could find any useful tid-bits of information about what other people do to keep code nice. I found this article and I noticed B. B is to return the immediate value of a boolean test instead of testing if the boolean test returned true or false. Mind you, in certain cases you DO need to check. In the cases of some of my code, I did not. B is the one thing I apparently overlooked in programming over the years. It’s interesting how I never noticed it to say the least. Anyways, upon reading to the end I find this article.
Called, “abolish the switch statement”, this article goes on to explain how to inaccurately use a switch statement and why it looks ugly. Then suggesting the use of maps. As an ex-web programmer and game programmer, I can tell you something that’s right and wrong about this. What’s right, switches are used improperly by inexperienced programmers. That’s especially true since I’ve taught and am still teaching programming to people. What’s wrong, everything else, including the solution itself. This article takes into no account values that go into the objects when declared nor the fact that switches are faster, especially on mobile devices.
In a game, each object has methods it calls based on the action it’s performing. *Unless you’ve got some super-abstract game model that allows you to handle actions outside the object, you aren’t going to make a new class for an action. Therefore, making their solution fail immediately. Take a look at this abstract example showing the proper use of switch i.e. not using magic numbers and why this looks as nice as the code could ever be. Continue reading “Nice code and switches”
This is the first prototype…uh, well it’s not really a game. It was to test drawing functionality and to correct gaps in-between mouse movement. That’s about it.
Total Number of lines: 209
While it does work, it still doesn’t work on some magically optimized level. Here’s it when the screen gets covered in lines. The framerate dropped to 11. I would like to keep in mind that this was a debug build.
Was looking at this site called VTC.com randomly waiting for my sleeping pill to really kick in. I came across a video section for x86 assembly. I then got interested to see how this guy explains binary / hex and the such. So I watched the Hexadecimal/Octal/Binary video; then the one on boolean operations. Even with my pills putting me to sleep, in this boolean operations video, I immediately recognized that the guy explaining it doesn’t know binary as well as he thinks he does.
The GUI looks horrible. I’m not sure what Microsoft’s aim is with this new GUI. But just like Ubuntu 11.04, I’m not switching to it because it looks like a shitty work environment. Maybe it’s just me, but the more simplistic looking they make these operating machines, the more it makes me think that we’re trying to dumb down our society. I’ll admit, the GUI was a terrific invention over the a text based UI. However, a GUI that is designed like, well, that, is just ridiculous. It looks like some Apple bullshit. And yes, I said, “Apple bullshit.” I do not favor Apple and think most of their “inventions,” are little less than toys you’d distract yourself with for a few seconds like a 5-year-old. That said, Microsoft and the community behind Ubuntu have just done the same thing. Turning what favoritism I had towards them to that on par with Apple.
After a dry lightning and thunder-less town for quite some time, a sudden and unexpectedly powerful lightning and thunderstorm erupted from the city. The dad, of a friend of mine, took some awesome pictures of the storm. I’m only gonna share one cause these are private to them. But, it was just such a nice picture I had to share it so that you could see what this storm was like.
I’d like to note that I cropped the bottom which was of houses and buildings. As well as blacking out a street lamp which was bright yellow at the bottom. Other than that this picture is 100% genuine lightning.
I’d like to make a small little tutorial. I have used and still do use linux. Ubuntu 10.10 in particular. Regardless, I touch the shell, but not as often as one who uses linux would think. So, I’m not always sure about what does what and how files on the system act.
Anyways, I wanted to put up a Minecraft server for a buddy of mine and I. (Not for you). I put the files in, ran the command that Notch said to run to get the server to run in no GUI mode. Unfortunately, I ran into some error with “Ljava” in it. Anyways, so I went on a little journey.
First off, does the host have java? The answer is actually yes. It’s just a really old version. It can be found in /usr/bin/java . If you dare think that you can override it, you’re sadly mistaken. As this is a shared host, you aren’t allowed to do that. On the other hand, you have a bin folder that you could unpack java into. Continue reading “Bluehost and Installing Java”