Follow me: @D_mitar

Most read posts recently



Aug 3rd 2009 × Enough of the jQuery already…

This is not much of a post but a bit of a rant. “It’s my party and I’ll cry if I want to”, right?

I have a problem with jQuery–not with the framework as such, but with some of its users. And who in their right mind wouldn’t be getting the amp when just about any webdev site, forum and topic is now full of clever know-it-alls that come and declare how ‘such and such jQuery plugin will do what you want’. There’s always a jQuery plugin for everything, didn’t you know…

Does not matter if the question at hand is on vanilla javascript or mootools, just add jQuery and whistle… Already use another framework? Get jQuery anyway, it’s so good you can run in compatibility mode!

The sad part is in how a large portion of these jquerysts have absolutely no understanding of vanilla javascript. It feels as if some of them inadvertently consider ‘javascript’ and ‘jQuery’ to be synonymous…

Aren”t people just getting carried away slightly? I’ll be the first to admit how jQuery is full of awesome features, documentation and support. Why, it’s so great and so far removed from standard javascript syntax that some go to extreme lengths to mimic its shorthand in other frameworks as well. Just the other, having downvoted a jQuery solution for a mootools question on stackoverflow, I was told how $(“someid”).click(); was a perfectly reasonable and valid mootools syntax (as shown by David Walsh)

Paradoxically, in lowering the standards and requirements (in the sense of, by being too accessible and too easy to use), jQuery has spawned an army of coders that don’t even have to learn javascript. A lot of badly formed code gets released, complete with a disregard for best practices, memory, bandwith use, usability and god knows what else…

Still, perhaps there will come a day when mootools sports a high-spirited in-your-face following. For we have a lot to be tooting about, after all…


Jun 8th 2009 × jquery vs mootools: a look at what each framework represents and how to choose wisely

Aaron Newton has written up what appears to be one of the most comprehensive and unbiased answers to the eternal question: jquery or mootools. I cannot recommend it enough to anyone that’s just starting with javascript or is looking at both frameworks from the “which is better for me and my project’s needs” angle. It’s worth mentioning before you begin, this is a comparison of the core functionality, provided by each framework – not what is possible should you decide to build on it.

The short summary: both frameworks are great but serve a different purpose, with jquery is more user and beginner-friendly, focused / optimised around DOM access and mootools, building and extending the javascript native prototypes and methods (not at the expense of the things that jquery can do).

Another way to look at it: mootools takes things further than jquery and makes javascript fun, introduces features that are coming in javascript 1.8 and provides a great layer for object orientated programming whereas jquery is staying where it’s at its best: shortcuts, chaining and styling, leaving anything else you may need to plugins and vanilla javascript.

http://jqueryvsmootools.com/

The comments are also well worth the read, some good points on the pro’s and con’s of each framework and a bit on why mootools does not try to be unobtrusive / conflict free with other frameworks.


Nov 14th 2008 × quakelive closed beta test impressions as a developer: jquery, embedded objects and 3d

I got my hands on a login for the quakelive beta by id software and setup shop… Here is an account of my first thoughts. Please note that what I write is from the point of view of somebody that has spent many years of playing quakeworld and quake 3 arena / osp, so I will also be looking at how the game has changed.

First of all–the most noticeable thing about quakelive is that it runs within a browser. Although this was not a secret beforehand, I had some trouble imaging it – as an activex / component that sits within the browser and interfaces between the game folder (on the hard drive) and the server. Not so! Yes, there was a tiny download of a plugin, negligible at a mere 3.8mb (a typical Q3A folder with all mods weighs well over a few GB):

quakelive installer

However, there is no clientside data on your computer other than some minimal models, your local config files and things like screenshots or recorded demos. The “interface” turned out to be (to my surprise) what looks like flash! That’s right, quakelive actually runs within an embedded object in the browser and is controlled externally via javascript. The core of the site and UI is powered by jQuery (oh well, can’t all be about mootools).

<script type='text/javascript' src='/js/jquery/jquery.js?3'></script>
<script type='text/javascript' src='/js/jquery/jquery.form.js?3'></script>
...

Server browsing is all done through the “home” section of the site and AJAX. It tries to produce some results based on it’s understanding of the player’s skill level and mods of preference. It also tries to keep tag of your games played, time wasted and weapon statistics so you can follow your “progress”. However, this is the ONLY way I found that enables you to do so–there longer are any in-game means to get stats (topshots, stats wstats are not yet implemented).

From the development point of view, server browsing is via tooltip style server selections that are not the smartest but this is just a test skin… What is more worrying for the quakelive beta setup is that ID use JSON data to create the user pages to and pass variables between them and the game object. The JSON objects are generated by the main page body (presumably via PHP or whatever) and as a result, everything relating to the player’s personal account details is available in plain text within the source:

$(document).ready( function() {
    quakelive.session = "0e087cb0c37cb92568d585f1591d7df3";
    quakelive.username = "coda"; // that's me.
    quakelive.password = "dummypasshere"; // changed
    quakelive.userstatus = "ACTIVE";
    quakelive.userid = "1072nnn"; // changed
    quakelive.userinfo = {"0":"1072nnnn","PLAYER_ID":"1072nnn","1":"coda","PLAYER_NICK":"coda","2":"ACTIVE","PLAYER_STATUS":"ACTIVE","3":"coda@dci.uk.net","PLAYER_EMAIL":"coda@dci.uk.net","4":"dummypasshere","PASSWORD":"dummypasshere","5":null,"TIME_ZONE":null,"6":"04-NOV-08","EULA_DATE":"04-NOV-08","7":"04-NOV-08","JOIN_DATE":"04-NOV-08","8":"Dimitar","FIRSTNAME":"Dimitar","9":"2","INVITE_COUNT":"2","10":"0","EULA_OUTDATED":"0","11":"2","TIER_CTF":"2","12":"2","TIER_DM":"2","13":"2","TIER_DUEL":"2","14":"2","TIER_TDM":"2","15":"3","TIER_CA":"3","16":"0","ECODE":"0","17":null,"MSG":null};
    quakelive.cvars.Import( {"color1":1,"m_pitch":0.0174,"cg_forceModel":1,"console":1,"web_configVersion":4,"cg_enemyModel":"keel/bright","team_model":"biker/slammer","team_headmodel":"biker/slammer","headmodel":"biker/slammer","cg_drawgun":2,"r_vertexlight":1,"color2":2,"cg_drawCrosshair":9,"cg_drawFPS":1,"r_picmip":5,"cg_forceTeamModel":"sarge/red","name":"coda","cg_autoswitch":0,"cl_timeNudge":0,"com_allowConsole":1,"cg_forceEnemyModel":"keel/bright","cg_enemyColors":222222,"cg_fov":115,"cg_marks":0,"snaps":40,"cg_trueLightning":1,"r_inBrowserMode":5,"web_botskill":"medium","clan":"drink","model":"biker/slammer"} );

// etc etc.

Obviously — as this is a browser, the data will be retained in the cache and available to anyone that gains access to the computer — which kind of defeats the purpose of making a customized, portable and standalone game in order to provide exactly the same gameplay experience on any system. Have some quakelive in an internet café or LAN gaming centre and you leave your profile data and password to the next person that sits on your chair and cares to look…

I have yet to test trying to modify any of the JSON object data in order to achieve things like aliasing or trying somebody else’s account, but it hopefully serves display purposes for the UI side of things only.

As for the game itself… It have yet to make a lasting impression on me. It is totally remarkable that it runs everything on the fly – all the maps data, the game models, mods and so forth is being sent to you at map load time… All 3D is rendered based upon server-to-client data and so forth. It also looks a bit like Q3A at a glance but it is anything BUT…

Gameplay changes:
The rail gun is now reduced to a mere shadow of its former self and is only useful as a way to annoy / snipe opponents from afar (80 damage points). The game has become more about +forward and +attack with rocket spam which can — for a short while — give the impression that it plays faster than regular Q3A.

The lightning gun seems to have deteriorated as well – things like cg_truelightning are no longer functioning as they used to. The shaft itself now causes damage in proportion to the distance of the target object–further away they are, the less health it takes.

FPS is lower than it used to be – and considerably so. Tested from my laptop where I get 333 FPS on Q3A, quakelive can nail 125 but only just–there are certain maps with clipping issues that cause a drastic FPS drop and gameplay becomes very laggy.

There is also a whole new netcode as well — something of a hit and miss (pun intended) as it has rendered things like cg_smoothclients and cl_timenudge redundant. Which is great – if you are just starting to learn the ropes with quakelive. But for those that may have spent years getting used to Q3A’s physics and netcode, you will find it difficult to adjust aim and accuracy will suffer. On the upside, the hitboxes seem larger so some really hopeless rail shots tend to hit when they would not have done before… so expect some lucky frags. Of course, it also means you will get hit a lot more.

The maps have been revamped but it is essentially the same old .bsp with some changes and a couple of new DUEL and CLAN ARENA maps. Speaking of CLAN ARENA, it is now built-in but in an odd, american style – with self damage on rocket jumping. Capture the flag (CTF) has also taken a hit by the Re-introduction of “runes” , “techs” or “power ups” (whatever you want to call them) and the nail gun (not quite like the QuakeWorld nail gun but it must have come from somewhere).

Verdict:
As a whole, it is a technological marvel and will probably set a landmark in game development for years to come. Once again, ID have broken the binds of our preconceptions and created a ground-breaking event… And they have only just gotten started on Rage…

Would I play it? All things being equal, I’d much rather use Q3A with OSP than quakelive. Sorry — too old to start from scratch. Then again, who has time for games these days…


Sep 15th 2008 × Mootools 1.2 is slowly finishing off the community

There is simply nothing remotely as good as the mootools javascript framework out there. And version 1.2 did nothing but make it even more fun to code for. That aside, the mootools team decided to ditch the forums and move over to google groups.

I have been subscribed to the new mailing list since the start and I can see it slowly subsiding in interest and usefulness already: what precious little sense of community building i felt before is now slowly diminishing… A terrible way to alienate a loyal userbase who LOVED the old forums – People (well, I did anyway) used to browse them for the sheer fun, to get or offer help, to showcase work, to find out more about new mootools sites or plugins…

There is now a half-hearted attempt at making an unofficial forum but it is just another wrong decision that takes away even more people from the mootools google group…

Shame, really.

*update* some bloke I had not heard of (does not mean much really, I live in a box) called Tom Occhino of the mootools team posted this thread on the mootools “forum”/mail list. I am sorry to say, Tom: claiming that frameworks like jQuery don’t have forums and their users don’t bitch about it are unsubstantiated. For starters, they never had a forum to begin with so they wouldn’t feel as if something precious has been taken away from them. I believe a number of people will have chosen mootools due to the community that it had. Not the best commercial / career decision, all you have to do is look at any job site / agency: jQuery is sought after far more often than mootools (wrong as that might be). Even recruiters have heard of jQuery despite not being able to tell you what a framework is… So why disband the community and try to be another jQuery? This seat is already taken…