Browsed by
Month: February 2010

Creating is Hard 2

Creating is Hard 2

In a previous post I talked about a failed board game idea and I implied I might try it as a web-based game. Well after a lot of work on that I decided to take a break and try a game on Steam. Turns out I bought a game a while ago by the name of Mayhem Intergalactic but never played it.

Upon reading the text on the Help screen is when I realised this is basically the same game. Liking the basic concept– obviously– I started up a quick single player game versus the AI. Turns out it is nearly identical to my vision. Sure, I previously figured out my ideas were not all that original, but how many clones of the same game can the public tolerate? If someone likes my game over the competitions I would like to think it has to do with the features. Not because they simply did not already have alliance to another, similar game.

I still feel my version brings something to the table that the others lack (at least as far as I have seen). However, I need to ask myself if I still want to continue; Time is not something I have a lot of and I might rather work on something a bit more unique. After all, the sub-systems I have already built (login, chat, security mechanisms, ect) could be moved to another project virtually unmodified so it is not like scraping this project would mean I wasted most of my time…

Missing JavaScript Functionality

Missing JavaScript Functionality

JavaScript does not offer a lot of things one would imagine would be included in such a seasoned scripting language. Below are a few functions I wrote to fill some gaps.

Dump variable contents

function var_dump(arr, level) {
if ( !level )
level = 0;

var dumped_text = “”;
var level_padding = “”;
for ( var j = 0; j < = level; j++ ) level_padding += "\t"; if ( typeof(arr) == "object" ) { for ( var item in arr ) { var value = arr[item]; if ( typeof(value) == "object" ) { dumped_text += level_padding + "\"" + item + "\" =>\n”;
dumped_text += var_dump(value, level + 1);
}
else
dumped_text += level_padding + “\”” + item + “\” => \”” + value + “\”\n”;
}
}
else
dumped_text = “===>” + arr + “< ===(" + typeof(arr) + ")"; return dumped_text; };

Trimming the whitespace off both sides of a string

function trim(str) {
return str.replace(/^\s\s*/, "").replace(/\s\s*$/, "");
};

Padding the start of a string

function pad(str, len, padding) {
str += "";

if ( str.length <= len ) {
var str_new = "";
for ( i = 0; i < len – str.length; i++ )
str_new += padding;

return str_new + str;
}

return str;
};

Getting the mouse position

function mouse_position() {
if ( document.all && !window.opera )
return [event.clientX + document.documentElement.scrollLeft, event.clientY + document.documentElement.scrollTop];

return [e.pageX, e.pageY];
};

Getting an elements absolute position

function element_position(element) {
var x = y = 0;

if ( element.offsetParent ) {
x = element.offsetLeft;
y = element.offsetTop;
while ( element = element.offsetParent ) {
x += element.offsetLeft;
y += element.offsetTop;
}
}

return [x, y];
};

All of these were tested in Microsoft Internet Explorer 8, Mozilla FireFox 3.5.8, Google Chrome 5.0.307.9 beta, and Apple Safari 4.0.4.

Please note I have not touched JavaScript in years and I am a bit rusty.

Creating is Hard

Creating is Hard

I was working on a combat-based board game for a number of months. I started off with some ideas I thought were unique and built from there. After a lot of work and begging threatening bribing asking people to help me play test I was slowly forced to either modify or remove my unique ideas (it turns out that it is difficult to be objective in these situations). It became clear that no matter how cool my ideas were they may simply not work. It seems, in retrospect, that these ideas were never all that unique in the first place but were absent from the market place because of the same problems I ran into.

I grew up playing video games a lot more than playing board games. As such while designing board games I brought to the table a lot of odd things; Some were good, some were bad. One of my biggest problem to this day is the limitation of the human brain for computation vs a computer. When I think of the gears of gameplay I think in numbers. Numbers, however useful, are not fun. I need a way to mix these two worlds.

One idea that comes to mind is the web as a gaming platform. I am not necessarily talking about Web 2.0 or AJAX. I am talking about a technology that even mobile phones have access to. The World Wide Web is so ubiquitous and easy to script for that I would be dumb not to at least consider it. A lot of my ideas transfer very well to this platform and I think I may give an old, failed idea a shot in this medium.

New Hope for Psychosis Patients

New Hope for Psychosis Patients

An article [original, free registration required] over at Medscape mentions some finding that may be a step forward in the fight against psychosis for some patients. Researchers found that a 12-month regiment of omega-3 fatty acids reduced or eliminated full-blown psychosis compared to placebo by 22.6%. They also found that these benefits continued for up to one year.

For now the standard treatment is pharmaceuticals which, like many other classifications of drugs, can have negative side effects. Since it has been said that patients families can suffer more than the patient it would make sense that the patient would opt off said stigmatised pharmaceuticals. If, in the next ~10 years, this turns into a viable treatment it could help to eliminate otherwise avoidable situations due to a refusal to take medications.

Apple iPad vs MSI Tablet

Apple iPad vs MSI Tablet

Although I have never been a fan of The Apple Way tm I was super unimpressed by their new iPad showing. After all, these are the guys who really did a lot to bring the mobile data device away from BlackBerry and business users into the main stream so much more so than it already was. For Apple to create an iPod Touch that does not fit in your pocket seems like an idea that skipped the blind taste test of consumer electronics.

Enter semi-speculation: The MSI tablet. Details are still emerging and polishing still needs some doing but what I have seen so far has me optimistic. Due out in ~five months and running Android this could be my new netbook replacement. It has inherent multi-tasking (a feature the iPad does not) and runs on similar hardware. It supports 1080p, HDMI out, and a screen that reportedly works very well in direct sunlight. It also sports WiFi and 3G connectivity. Bluetooth would be a nice touch (unless that was already announced and I missed that part). The price point is looking to be the same as Apples cheapest iPad.

[youtube]DWatuAz_b6k[/youtube]
MSI Android Table at CES 2010

Perhaps the HP Slate might be worth a look?

Update 2010.02.04
Lenovo has unveiled a tablet with a nifty feature I have never seen before; You can rip its frak’n head off! The screen detaches from the rest of the device and can be used independently. My guess is the keyboard and company are akin to a USB device. My only question is can you charge just the screen component since that is obviously where the battery is? Between the price tag on this thing and the fact that I have fallen in love with the Android OS I am not sure this peeks my interest beyond the “wow” factor.

Not Enough Time in the Day

Not Enough Time in the Day

I have a serious problem; That problem is there is not enough time in the day.

There are too many things I want to get done. Mass Effect 2, Batman: Arkham Asylum, F.E.A.R. 2, and Fallout 3 have already been released. BioShock 2, Aliens vs Predator, Sins of a Solar Empire: Diplomacy, and Assassin’s Creed 2 (PC version) are all on their way very soon and that is between learning Spanish and working on my various projects. I have a stack of books taller than myself to get through. This does not include the fact I spend ~9.5 hours a day either in transit or at work. I am working on automating some things in my apartment which is eating up more time than I figured it would. Plus there are the ventures I am working on in cooperation with other people which depend on their schedules as well as mine. Also on Wednesdays I head to The Game Table for some much needed time off (yes, I need to schedule The Funtm).

Sure some of these problems are video games but, much like a good book, a good video game is at least as worth-while. Perhaps my LEGOs will have some solutions for me when I get home tonight…