Home About Contact

GalleryView: a jQuery Image Gallery

Posted by phorner On May 13, 20094 COMMENTS

I was looking for a jQuery based gallery that could show images as a slideshow. I tested several possibilities but wasn’t really satisified as there was always something that wasn’t quite what I wanted. That’s when I stumbled across GalleryView.

Overlays

GalleryView is a jQuery plugin that allows you to create image galleries (and also insert HTML to be displayed as content). It takes an unordered list of images and turns it into a gallery. You can create several types of galleries, such as horizontal or vertical scrolling thumbnails, galleries with panel overlays and content panels. You can also customise the thumbnails width and height, the fade opacity, whether the images cross fade or just appear, and so on.

Here is some example Javascript showing some of the configuration features:

$(document).ready(function(){
$('#photos').galleryView({
panel_width: 800,
panel_height: 600,
frame_width: 150,
frame_height: 80,
start_frame: 5,
overlay_position: 'top',
filmstrip_position: 'left',
transition_speed: 1500,
transition_interval: 6500,
overlay_opacity: 0.55,
frame_opacity: 1.0,
nav_theme: 'light',
easing: 'easeInOutQuad',
show_captions: true,
fade_panels: false,
panel_scale: 'crop',
frame_scale: 'nocrop',
pointer_size: 12,
frame_gap: 10,
pause_on_hover: true
});
});

If you use the jQuery Easing plugin in addition, this will help to create a smoother filmstrip animation. You can also create your own theme for the styling of GalleryView. It comes with two themes, “light” and “dark”.

GalleryView is incredibly simple to setup. You’ll have a gallery up and running within about 10 minutes.

For more information: GalleryView

  • Share/Bookmark

EXTExt JS 3.0 RC1.1 comes hot on the heels of the release of Ext JS Core 3.0. Ext JS 3.0 is built to sit on top of Ext JS Core 3.0. Ext 3.0 provides increased performance, consistency, flexibility and UI enhancements all without a significant size increase.

The new features of Ext JS 3.0 are:

  • New UI components
  • Row Editor
  • List View
  • Charting
  • Button Groups
  • Grouped Tabs
  • Enhanced components
  • Buttons refactored to be a valid BoxComponent
  • Toolbar Overflow
  • Menu Overflow
  • Tooltips now support an anchor configuration
  • Buffered Gridview
  • Revamped Debug Console

Row EditorOther improvements include Ext.data package enhancements, Accessibility improvements, Ext.Direct and the refining of memory management within Ext.

For more information: Ext JS 3.0

  • Share/Bookmark

Duke Nukem ForeverCharlie Wiederhold, who was a developer working for 3D Realms between 1998 and 2006, has written on his personal site about an absolutely incredible conspiracy created by leading members of the industry. Their goal: to keep Duke Nukem Forever’s development ongoing for decades.

Here is an excerpt of what he wrote.

“The DNF 2001 trailer was out as everyone knows, and it was doing insanely well. The entire team was jazzed, people seemed to really love it and all anyone kept asking was “When the hell do we get to play this oh god!?!?!”

Before heading out to E3, George and Scott Miller had arranged a meeting between Epic, 3DR, and the people who had worked on Duke 3D but weren’t working on DNF. The intent of this meeting was… you guessed it… how best to handle the future of the Duke franchise. Epic was invited because having Duke around on the Unreal Engine was a constant PR boon for them. So they are almost just as invested in how well Duke does as 3DR (as you will see later). It was a secret meeting (there were actually two meetings, but I’ll get to that later), not even the publisher knew about it (except Mike Wilson… he was operating outside of the Gathering of Developer’s authority). The people there were Scott Miller, George Broussard, Cliffy B, Mark Rein, Tim Sweeney, Levelord, Allen Blum, Keith Schuler, myself, Brandon Reinhart, Mike Wilson, and even Todd Replogle and Ken Silverman made the trip out there.”

“Most of us didn’t really know what the meeting was for going into it… and for the guys at 3DR at the time, we thought it was just going to be current 3DR people. Imagine our surprise to walk in and see that group of people sitting there! I’m such a huge Duke 3D fanboy, that I have to admit was a little intimidating being in the same room as pretty much all the core guys that made the game that got me started down the path of a game developer in the first place.

Anyways (for real this time)…

Scott quickly got to the point. Max Payne was going to do gangbusters… and 3DR had some other stuff up their sleeves that would be generating so much revenue for 3DR that they could continue on indefinitely… or at least another 5-10 years… without making a dime on internal development. Scott being the marketing buff he is (and Mark Rein being pretty much the same for Epic), they got this idea for how to generate the biggest story in the history of gaming. DNF being a monster hit is fine, but it wouldn’t make “forever” history. As you can tell from the name and what I’m about to describe, Scott and George apparently had this idea from the very start but weren’t sure they were going to act on it, but there wasn’t any harm in using a name that would play into it. So in order to make “Forever” history there was only one way to do that, and that is to turn it into something completely unprecedented in the industry. Turn it into the sort of thing that will be talked about 100 years from now.

I’m sure you can guess where this is ultimately going.

See in 2001 the jokes about DNF being late and vaporware were already widespread. It had already won the damn Wired vaporware award twice. Here was the funny thing… the attention on the game was actually only getting stronger, not weaker. It was the release of the video and how it was received that put the nail in the coffin. The game just had something that nothing else in the industry had and there wasn’t any way in hell such an opportunity could be missed. The attention had peaks and valleys, but it was looking sustainable.

When Scott and George put this out there, those of us on the DNF team were furious. I felt like I had been told my childhood was just an implanted memory, my parents were really actors, and that my penis was about 50% smaller than I thought it was. What the fuck had we been doing the past 3 years? Everyone else actually seemed to already see this coming though, and took it in stride. Mark and Scott were a force to behold when they would get going on the possibilities. George seemed torn, because he loved the game and wanted to see people enjoying the stuff we had put together for the video, but he also knew this was just not something that anyone else in the industry would have a chance to try again for a very long time, if ever.

Todd and Ken didn’t say much, I think they were wondering why they were there. Levelord thought it would be fun to watch, but other than that had his own stuff going on with Ritual that was really his main focus. Mike Wilson kept cracking jokes, but he was clearly on board.

After they put it all out there, those of us on the team started to come around to what they were aiming for, and by the end of it we were bought in. It would be a lot of fun, we’d be paid well, and it would be a part of history that nothing else we would do would live up to. We didn’t quite know what we were getting into, but that’s why all the other guys were the experienced biz guys and we were young naive developers.”

Now this is where it gets really bizarre.

“The first meeting was really just getting everyone up to speed. We all needed time to absorb it… and what was being proposed. They needed everyone involved to buy off on it because we’d all be working through the years to maintain the plan.

The plan was actually pretty simple… create the longest developed game in history that eventually is one of the greatest games ever made. You have the time to work on it properly (no shit), so given the intelligence and talent of all the people involved, it was a pretty good bet. All 3DR had to do was make money on other stuff. All Epic had to do was open up a wide channel between the two companies. 3DR would serve as a research house for future Epic engine updates, but also give 3DR everything they did as well. The boots on the ground just had to keep the drum beating and keep the image of business as usual going. The truly hard to swallow part of this was some of us had to eventually leave, but we were guaranteed we’d be ok. All we had to do was let go of the idea of just making DNF in the traditional way… which I’m ashamed to admit was easier to let go of than I thought it would be.

In fact, with my role in this, I wouldn’t ever really work on the “real” DNF. That was a tough pill to swallow, but again the big picture looked good.

The beauty of the plan is that even though I’m telling you about it now, it is too late for it to have any negative impact on the long term goal. That’s something that took me a long term to come to grips with. It just *works* and I’ll be damned if I understand fully why or how. That’s biz and marketing brilliance for you… I just know how to put maps together or script up some gameplay. *sigh*

What Epic got out of this whole deal was basically this mystery project that is a constant “customer” of their engine, with people always speculating on whether it was updated to the newest one or not, etc. You would be surprised at how many licenses this has helped sell through the years. Who said business made any sense? Not to mention a team to just do research into engine upgrades without any pressure of actually releasing anything. Huge advantage. Notice that Epic really pulled ahead in the engine licensing business after 2001? That’s *not* an accident.”

“We didn’t end the first chat on a particularly *good* note, but I think we were mostly exhausted… but there was an undercurrent of “can we really trust each other on this?”. That’s typical of any big business deal, but this was a case where we would be agreeing to hold this story steady for decades. Yes, decades. You don’t go into this lightly.

We all came back the next day (Cliffy in white thankfully, not red). We went around and gave our thoughts on things after having a night to sleep on it. Scott and George wanted to get paperwork signed that day if we were going to attempt it at all. This seemed *way* too soon and I didn’t have a lawyer around to read the contract or anything. I was young, but I had had enough experience by that point to know you don’t sign a contract of any significance without having a lawyer read it. Unfortunately it was made clear that this offer was active only so long as we were all in the room. Once any one of us left it was void and Scott, George, and Mark Rein (the three that put it together) would deny all knowledge. They had never done any discussions of this in written form except the contracts which Scott Miller was holding.

That was pressure… here was this deal where I would be set for life, and if I backed out of it, it would blow the whole thing for both companies and everyone involved. Not only would I be backing out of the opportunity of a lifetime, but I would also be ruined in the industry because those guys have way more power than I do. I wanted to do it, but how do you commit on such short notice and without really knowing what you are signing?

Brandon, Allen, Keith, and I kept hemming and hawing and we could tell we were really causing problems with everyone else in the room. I said that I wanted to do it, but I *had* to have a lawyer review it before I signed it. The fury in the eyes of the guys sitting across from me was literally enough to give me a third degree burn. I have *never* felt that much fear in my life. Well… up to that point at least.

I was told to think about my next words very carefully before giving my final answer. Honestly, I felt this was a test to see how well I would hold up to pressure later when we had to “hold the lie” (the similarity to “hold the line” isn’t on accident), so I held firm and said I really wanted to, but needed to have it reviewed…

oh fuck…

Faster than I can even remember (literally… I don’t remember) I was knocked out of my chair by I *think* of all people Tim Sweeney (it was a wooden kitchen chair) and was pinned on the ground by Mike Wilson and Cliffy B (he’s so much stronger than I ever expected). George walks over to my chair and fucking stomps the shit out of it until the legs are broken off. He casually picks up one of the legs that had split into a shit your pants style point and starts tossing it up and down. Scott and Mark Rein alternate on and off saying that I apparently wasn’t aware how *real* business is done and that if I didn’t want to find out why those two companies had maintained such a strong position in the industry dating back to the shareware days (when it seems people didn’t ask nearly as many questions about why developers appeared, made a game, and then disappeared without a trace)… I had better reconsider my answer.

I do remember the next part very very well though… I will never forget it and I have to admit that I have dreams about it pretty frequently.

Cliffy and Mike pulled me up and shoved my face about 6 inches from the point of the chair leg. I was drenched in sweat (the trailers didn’t have decent AC so it was already hot as hell in there)… and if they had let go of me I would not have been able to stand on my own.

George looked me in the eyes and asked me one more time what I was going to do… so at that point I did what anyone would do…”

So there you have it. If this is even half true, it’s almost unbelievable to think that this is even possible. However, as I think about this more, a game that got delayed and delayed, multiple engine changes, and took more than 12 years to develop, makes you wonder if this really was the case. I don’t know if we will ever really know, but it will be interesting to see how this pans out in the coming days and weeks.

  • Share/Bookmark

Reading HTML tags from XML into Flash

Posted by phorner On May 7, 20093 COMMENTS

FlashOne problem that many people experience when working with XML and Flash is getting HTML tags inside the XML to be read in and rendered in Flash. Reading XML that contains HTML tags is a very common thing to do these days, as Flash gets used more and more to create applications since the release of Adobe AIR. So here is a tutorial showing you the basics of how to do it.

XML

The trick to getting the XML parser in Flash to ignore the HTML tags is to encapsulate the text string containing the HTML tags using CDATA. Below is an example:

<?xml version="1.0" encoding="iso-8859-1"?>
<section>
<content><![CDATA[Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.<br><br>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.<br><br><font color="#0099FF">Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.</font><br><br>Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.<br><br>List:<ul><li>Item 1</li><li>Item 2</li><li>Item 3</li></ul>]]></content>
</section>

By encapsulating the text string inside <![CDATA[]]>, this tells Flash to just treat everything inside the CDATA tag as a pure string, and to ignore any HTML tags that it may contain.

Actionscript

Once this string is read into Flash and assigned to a variable (in my example, the variable name is htmlContent), you will then most likely need to display this text. Create a text field on the stage, and select the “Render text as HTML” button in the text field properties. Give the text field an instance name (e.g. “contents_txt”). Then assign the variable “htmlContent” to the “htmlText” property of the text field.

contentXML.onLoad = function() {
...
contents_txt.htmlText = htmlContent;
}

By assigning the string to “htmlText“, this tells Flash to then render the text inside the text field using the HTML tags. Simple!

I’ve created example files for you to download and look at. AS2 version is here and AS3 version is here.

Hope this helps some of you out there to get those HTML tags rendering in Flash.

  • Share/Bookmark

Duek Nukem ForeverIt’s been confirmed. 3D Realms, the company behind the Duke Nukem franchise has closed it’s doors. Duke Nukem Forever has been under development for 12 years now, undergoing many engine changes and complete scrapping and restarts along the way.

With companies like EA reporting over a billion dollars in losses, it’s no wonder 3D Realms couldn’t find the necessary financial backing to finish off Duke Nukem Forever. 12 years is a huge amount of time and money to pour into a game.

I loved Duke Nukem when it first came out, spending many hours playing multiple games with my friends over 2400 baud modems. Hopefully, someone else will pick up the rights to the game and get it finished off. Hopefully we won’t have to wait another 12 years to see the final product!

You can read more about it here.

  • Share/Bookmark