I still plan to update the site completely sometime in the near future, but for now I’ll apply this theme because this theme is the theme the new site is going to use anyways. I also cleared out the posts I felt were just adding clutter and no real value to the site. This change feels nice.
I will go back talking about programming things and game development like how the site originally was.
Some time ago I had looked into a science known as binaural beats. It’s only now that I’ve come back around to looking into it because of my ADD (aka ADHD-I). Back then I had been learning about it because it had a lot to do with my studies on meditation and hypnosis. I had tested it’s affects before with alpha waves, which are typically associated with a state of REM, and theta waves, which are typically associated with sleeping without dreams or REM. That’s where people’s brain waves are during meditation and self-hypnosis typically. I believe it’s the same for normal hypnosis, though I can’t remember and so won’t say that it’s true. I used to try meditation and at one point had learned how to successfully meditate. Then I had learned how to successfully send myself into hypnosis. At that time I remember that both had sent me into the same sort of feeling, i.e. lower theta to higher alpha brain waves. Though I have to say that self-hypnosis typically sent my eyes into an amazingly fast flutter in comparison to meditation.
It was about this time that I discovered binaural beats, a way of combining two different noise frequency pulses, that when put on with headphones, would become one sound that “speaks” to the brain directly. In more accurate words, it influences the brain waves; you can think of it as your brain wanting to match with the frequency it hears around it. Of course hearing this I was highly skeptical and wondered that, “if this really worked, then why is it not being used?” Looking into binaural beat generators, I found a handful on the web (I’m not linking). I had decided to go into a meditative position and then just listened to the binaural beats on an alpha wave (8-12Hz). It was less than 5-minutes in when my eyes started fluttering and they didn’t just start fluttering, it also seemed like I was in a much deeper state of REM than any other time before. This stunned me. Continue reading “ADD/ADHD and Binaural Beats”
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.