Archive

Archive for the ‘Tech’ Category

Quick Update

February 16th, 2010

Well it’s been a while since I’ve been able to update this blog. Things have been a little busy for me but, I will be updating this with some posts shortly. I’m currently enrolled at the Game Institute to learn more game engine programming. Also, I’m working on a side project in Unity with a few friends from reddit. Expect updates about all of this soon.

  • Share/Bookmark

aaltemus Blogroll, Tech

F.E.A.R.2 - How to Destroy a Gaming Community in Under 2 Months

April 4th, 2009

I remember loading up F.E.A.R Combat a few days after it was released and jumping on a server. Instantly some cat is flying at me duel pistols blasting. In my haste I launched a grenade at him and it him directly in the chest. In his place was a blood mist and the server echoes out “HOLY SHIIIIT”…At that moment I was hooked and ran out and bought F.E.A.R. Two fantastic plays through the single player and I was highly impressed. Great single player, faster good death matching multi player, and superb maps and sound packs coming to the multi-player from the community. A CAN’T MISS. I was a F.E.A.R. fan for life, or so I thought.

Fast forward to pre-release of our new F.E.A.R. fix: F.E.A.R. 2 - Project Origin. The community had been following this game closely, anxiously anticipating another great FPS experience. First came the October 2008 delay - no big deal if the game is as good as the first because it is worth the wait. Then comes the demo - which comes off on all platforms as a clear Xbox 360 game. Controls are not very good on PS3, and the PC is shock with un-modifiable film grain and letter boxing. Things about the first game that rocked - lean, grenades exploding on contact - removed. AI is dead simple to beat on the hardest difficulty and we haven’t heard anything yet about multi-player, minus a video claiming to look on the popular game forums such as CoD4 and copying what they have done. Complaints are filling up the forums. It’s OK, we are told, wait for the release because Monolith is a good company (a very valid argument). So we wait…

Release date: Single player is good, really good but, really short. Playing through it on the hardest difficulty and collecting every item occupies all of 7 hours. Not what they told us (it is longer than the original) but, it is good and the original was only 10 hours at a maximum. So we have the great F.E.A.R. multi-player to play to get our full moneys worth. PC gamers get the same single player as the demo with a multi-player that includes no server files, no SDK, and no anti-cheat. Within a week people are filing back to other games. Just wait, it will be patched we are told. Complaints are calling the game a blatant console port -which it is regardless of what they say - that is tailored to the 360. On console multi-player is littered with waiting because of stupid ranked rules tied to GameSpy (on average players spend over half of their time waiting on ranked if they want to have statistics kept). Crap is flying everywhere on the forums at http://www.projectorigincommunity.com Just wait we are told - we cannot say what we will or not fix because of design decisions…and stuff. Just wait.

Patch one - film grain is removed, a few issues fixed and the multi-player still stinks. Just wait we are told. During this time there is a console patch but, no one really knows what it did because everything is the same in multi-player so it looks to be some single player bug fixes.

(Not sure on the order of these next two but, it is meaningless)
Patch two - the same, still no server files, AC, or SDK. At this point I’m saying they are not coming, as are others, and we are told to shut it and wait.
Then last month DLC hits XBL only to be pulled and told it is coming the next day. Whoops, we meant next month they tell us.

Upcoming is patch three. Console multi-player still sucks and now no one plays it. PC is dead, hackers do not even care about it with no AC software. Most of the community has quit on this game, awaiting what it needs to be worth their time to play it. Wait, we are told…we will have our answer. Almost two months after release we finally get the answer…nothing can be done. The game is as it is and now there will be no SDK as well (which were told we would get). You will get that kick ass DLC we promised last month…sometime soon. Everyone is up in arms. Those who are seriously mad are being banned, told to can it, etc. We cannot even get the SDK to mod out what we need in the game. I assume it’s because no one would play the original release…oh wait, it’s already at that point.

At this point I quit. I played the original F.E.A.R. for almost 2 years and it was one of my favorite games, as it was for many others. We have almost all quit. Most of us will not come back for F.E.A.R. 3 because we feel ripped off. The community is almost dead. Good job Monolith and WB, you’ve killed what was one of my, and many others, favorite FPS games with one crappy release. I hope other developers and publishers take note and take a little more time and actually beta test and play test a game and fix what people do not like about it before pushing it on their community and saying….we’re sorry you do not like it but, this is what it is and nothing will change.

  • Share/Bookmark

aaltemus Gaming, Tech , , , , ,

Using JavaScript to Create Dynamic Lists

January 27th, 2009

I would like to talk about two of the many methods for creating dynamic list elements using HTML and JavaScript. We will also take advantage of the ability to set the innerHTML of an element.  The two methods I will discuss are:

  1. Displaying content that is already loaded but hidden.
  2. Using AJAX and the innerHTML to display dynamic content

Let’s start with the simpler of the two, displaying hidden content.  For this, it is assumed there is a page with a list and the content of the list is currently hidden.  For this example the content of the list is a sub-list.   Something along the lines of the following code:

<ul>
  <li>
    <a href="javascript:showList()">List Header</a>
    <ul id="hiddenList" style="display:none">
      <li>Element 1</li>
      <li>Element 2</li>
     </ul>
   </li>
</ul>

The header of this list is wrapped in an HREF which will make a call to the JavaScript function showList() which will toggle the display property of the sub-list, creating a list with a sub-list that alters its display on each click of the header. The JavaScript function can be similar to the one below:

function showList()
{
    var list = document.getElementById("hiddenList");
    var displayString = "block";
    if (list.style.display == "block")
    {
        displayString = "none";
    }
    list.style.display = displayString;
}

A working example can be seen here.

And now…

Next I will talk about using the XMLHttpRequest object to create a dynamic list using a server side call.  It is important to note that a lot of JavaScript frameworks will do this for you very easily but, I feel too many times people know what a framework is doing without actually knowing what it is doing so I’m going into a little more detail on some of the “behind the scenes” stuff.

First the list code is modified from the original HTML page to be similar to the following.  You will notice how none of the sub-list data is currently loaded.

<ul>
  <li>
    <a href="javascript:showList()">List Header</a>
    <div id="hiddenList" style="display:none">
    </div>
  </li>
</ul>

The call to showList() now will set up the XMLHttpRequest object and make the call to the server, using a GET, to get the content of the list, which is stored in another HTML file.  The algorithm for making a call is:

  1. Create a new XMLHttpRequest object if the browser is not IE, if it is IE create a new ActiveXObject
  2. Set the callback function using the onreadystatechange of the object.
  3. Use the open method of the object to make the call.
  4. Pass any data if the call is a post

The pieces of the showList() function relevant to the call can be seen below:

// For Mozilla
if (window.XMLHttpRequest)
{
    request = new XMLHttpRequest();
}
else if (window.ActiveXObject)
{
    // For IE
    try
   {
        request = new ActiveXObject("Microsoft.XMLHTTP");
    }
    catch (e) { }
}
if (request)
{
    // The callback method.
    request.onreadystatechange = updateList;
    // A GET call to the server.
    request.open("GET", url, true);
    // Not posting any data.
    request.send(null);
}
else
{
    alert("Could not create XMLHttpRequest");
}

In the callback function, updateList, the innerHTML of the DIV that contains the sub-list is updated to be the responseText of the request object. You could also use the responseXML of the request object and traverse nodes but, for this application I find it much simpler to use the responseText, which contains the HTML of the page we have requested. Using this method you may run into caching problems but, that can be easily solved by making sure the URL called is unique each time.  Following you will see the updateList method.

function updateList()
{
    // Check to make sure the request is ready.
    if (request.readyState == 4)
    {
        list.innerHTML = request.responseText;
        list.style.display = "block";
        displayed = true;
    }
}

You can see a full example of this list implementation here. For fun’s sake I have added the toggle in on this page as well.

There you have it…

That was just two of the many ways of using JavaScript and HTML to create dynamic lists. You can also use the XMLHttpRequest object and the innerHTML of elements for creating many, many dynamic effects (AJAX, Web 2.0, etc, etc, etc). As I have already said a lot of frameworks such as JQuery or DOJO will handle a lot of this for you but, I feel it is important to know what they are actually doing. And, to be honest, when I started doing this they were not around…Honestly I am not that old…

  • Share/Bookmark

aaltemus Software Engineering, Tech , , , , , , ,