Jump to content
  • Advertisement
Sign in to follow this  
  • entries
    94
  • comments
    127
  • views
    83490

About this blog

*looks at clock* it's 05.43 and I'm still awake...

Entries in this blog

 

Growing my e-penis

I've been playing some Xbox 360 where I'm doing my thesis project, since I don't have a console of my own. Some of the games I've been playing are Guitar Hero 2, Burnout: Revenge and Dead Rising. Oh how I love Dead Rising!

I've gone out of my way to take pictures of large zombie groups and even put funny hats on them. You know; the extra stuff you often do in games but no one will ever know, until now. Remember getting Samus in the swimsuit on Metroid for NES? Got any proof? No? Now games actually measure your e-penis and add an inch or two for every nerd thing you do! Auto-upload to your profile, online!

Wish you had proof of this moment, huh?

Since the word "e-penis" doesn't have a good ESRB rating Microsoft calls this Gamerscore. They even got a nifty feature to measure yourself against your friends! Gamerscore is enlarged.. err I mean gained, by obtaining Achievement points in games. Those are challenges that you can take in games, like completing them (like the 3 Day Survivor Achievement in Dead Rising) or doing really hard stuff (like the Millionaire Pair Achievement in Guitar Hero 2; Get 1,000,000 points on a song in Cooperative).


His e-penis in Guitar Hero 2 is larger than mine =(

So now I'm hooked on doing all the weird stuff the developers have thought out as challenges. I.e. growing my e-penis.


Seriema

Seriema

 

Two Things, about events

My good friend DrunkenCoder sent me a funny link about The Two Things about Computer Programming.

I just thought for a minute and thought up the two main things about hosting events.
1) Marketing is king
2) Deliver what you marketed

I hope someone disagrees, so that I know I'm right. ;)

Seriema

Seriema

 

My head is hunted!

I'm a bit excited right now! During a meeting with Lars Gustavsson about my thesis work I got called by a recruiter from Starbreeze. They want me to apply for a Associate Producer opening, "if it interests me". Of course it does! I gotta admit that I felt a bit pimp telling Lars to wait and the recruiter to make it snappy. [grin]

It's all thanks to my work with Swedish Game Awards!

Seriema

Seriema

 

SGA Game Developers' Workshop

Introduction
Yesterday SGA had its first Game Developers' Workshop. I've been with SGA in different ways since 2002, and the quality of the participants really has gone up! But last year, I got to participate in the jury weekend (not part of the jury, but helping out by starting games and serving coffee *whip!*). That was a real eye opener; the participants were making such easily corrected mistakes!! Most mistakes would take 1 min to get feedback on and fixed in 5 min, such as waaay to low gravity in a car game. Some were even misguided, turning a great adventure game into a semi-fighter. Or completely missing its point, mech-fights without the actual mechs.

I travel throughout Sweden in the SGA-Tour and I always give out tips, such as: "Test, test, test!". Test the game with people from outside the group! But people don't seem to listen or they "forget". So now we created this workshop so they would get to present their games before the jury two full months before the final deadline. Something 12 out of ~70 teams tried. All were extremely happy with the event! And it was very little work for us, during the actual event that is - planning was hell. We divided the workshop in two sessions, between 10:00-12:00 and 13:00-17:00.

Workshop goal: Raise the quality of the games.
Workshop method: Give the teams a clear vision of their game and some focus points.

Workshop Session 1 - Two parallel workshops
The centre of the whole day is reshaping the game concept with input from industry veterans; the SGA07 Jury. As only one team can get feedback at a time we have to keep the other teams occupied, which we did with a workshop to get their creative minds started.

Jury pre-judgement
SGA07 jury:
Patrick Bach, Producer, EA Digital Illusions (not present)
Oscar Burman, Project Administrator, Avalanche Studios
Rickard Johansson, Lead World Designer, Grin
Johan Lindfors, Developer Evangelist, Microsoft
Patrick Liu, Project Manager, Starbreeze Studios
Tommy Palm, Head of Research and Development, Jadestone
John Severinson, Editor-in-chief, FZ.se
Tobias Sjogren, CEO, Peligroso (not present)
Niklas Westberg, Technical Director, Massive Entertainment

Each participating team would get 10 min with the jury. 5 min to present their game concept, in any way they like; prototype on computer, concept art on paper, whiteboard, etc. The jury would rain comments and try to help the team find what they should focus on, as too many try to too much which just makes the game thin - and they won't make it to the deadline. A secretary was present to compile a list of max five pointers for Workshop Session 2.

Extended Gameplay: Keeping the Players Happy
The game isn't done just because it went gold.

Panel:
Gordon Van Dyke, Live Team, EA DICE. Supervises updates and patches for most DICE games, such as Battlefield 2142.
Henrik Oquist, Developer, Dawnspire. Designs and develops content updates, such as new playable classes.

Anyone who has released a game to a public knows this to be true. You'll have to continue working on your game, whether you want to or not, if you want to keep the players happy - otherwise you risk getting a bad reputation and no followers (that will buy/download your next game). Basically you should provide:
* Updates: new content. Players like that. Either free as a customer service or priced as a source of income.
* Patches: bug fixes. People hate that, not the patch itself but that the game had bugs in the first place.

The workshop focused on updates since they revolve around game design. The premise was: Super Mario Bros. 3 was just released! Ignoring technological advancements since then, the participants should focus on the possibility of extending SMB3 - to keep the players happy. We would act as the players and give them "feedback", which is essentially short forum post looking comments, and they would try to make us happy by coming up with new ideas. The "feedback"s were, in this order:

"We love the suits! Give us mooore!"
"The game is too short. We want mooore!"
"Jumping on enemies is sooo old. We want something NEW!"
"Only going left/right and up/down is boring now. We want mooore!"


The participating teams were broken up into groups of four, with no team member in it. This was to reduce the impact of having a competition team leaving for 10 min with the jury. The groups would get 15 min on each feedback. After all four feedbacks they would all get to present their "solutions" in five minutes, to the other teams and the panel which would comment on these solutions. One noteworthy point by Gordon was that players want to use new content in old, such as a new skill in the old maps.

So one of the solutions for feedback #1, which was a "digging suit, like a mole", was shot down since you'd have to redesign all the previous levels to add content in the earth - as well as design different earth-types to block or promote the player. And what would happen if a player accidentally dug himself stuck?.. One of the better suits was the "ninja suit", besides being awesome by the ninja-factor it was accompanied by a whole new world (solution for feedback #2), "new" enemies (just slap a bandana on all the old ones, solution for feedback #2 with minimal effort), and ninja attacks (solutions for feedback #3).

Workshop Session 2 - Game Concept Document: Rewrite
The first deliverable in SGA is the concept document. It's a mixture between the game design document and a sales pitch document, slimed down to actually readable material. Two simple rules: max one A4 page of text and unlimited illustrations (total number of pages becomes unlimited). The goal is to give the reader an idea of how the game is played. Most people go about it wrong and write about the story, or which buttons do what action - which still leaves you wondering if you're playing a action FPS or topdown RTS. With the feedback from the jury the goal is to write down max three goals for the final deliverable; the game demo and trailer. As a bonus, the jury were available for further feedback and would sit down with the teams helping them find a vision for their game.

Last words
The workshop worked out really well and the participants and jury liked both sessions a lot. They especially liked the fact that they could speak with each other, as the jury are as interested in the teams as vice versa. This event is something I really hope SGA continues to do, but we won't know if it really was worth it until the final deliverable - did the 12 teams really listen and improve their games? Stay tuned...

SGA final deliverable deadline: 19 May. Winners revealed: 2 June, at Kulturhuset in Stockholm, Sweden.

Seriema

Seriema

 

Scandinavia invades Game Developers' Conference

I just got home from GDC! Well, kinda. The flight was on sunday and I got home on tuesday. >_

The SGA Ninhas strikes the Golden Gate Bridge!

GDC was extremely hectic. We at SGA had a small demo station in the Nordic Game Pavilion which was a lot of fun! We met sooo many people! But I had to stay there a lot so I didn't get to see much of the exhibition or sessions. I did get to see some stuff though! Even saw some famous (drunk) people...


Ladies and gentlemen, Tom Hall.

I also got the opportunity to tell my Subway Story* to the person responsible, Keiichi Yano.

Me with Keiichi Yano (creator of Elite Beat Agents!!) and his assistant..


Seriema

Seriema

 

Elite Beat... Diva!

I beat Elite Beat Agents today! On Hard Rock!! I can't even believe my own replay, it's just crazy. Also I can't believe I failed 2 beats... it sounds vain since there's almost 400 beats on that song - but that's just it! Missing two just makes it silly!

Each song has three "gates" (or whatever you call it), you can fail all of them and still pass the level but passing all three gives you a star. So now I'm gonna try to max all levels! But everything below Hard Rock just feels sooo sloooooooooooooooooooooooooooooowww...... *znore*

The reward would be playing with Commander Kahn. Am I obsessive enough to do it?... Stay tuned!

Seriema

Seriema

 

Game Developers' Workshop

We at Swedish Game Awards are holding a completely new event for the competition. The goal is simple states as: increase the quality of the competing games. How are we gonna do this? The event occurs 2 months before the final date.


The pre-judgement room. The jury will be here and pre-review the games, giving the participants pointers. (this is BRILLANT!)
Workshop(s). Depending on how many of our partners get involved, we will have different parallell running workshops.


The workshops can either be full day things, or just an hour or two, so people either choose and stick with a workshop or move around on different ones. I prefer the last method.

But... what to do on those workshops?.. hmmm... *press the comment button! NOW!*

Seriema

Seriema

 

Swedish Game Awards events

You might've seen our posts here on gamedev. Swedish Game Awards is Sweden's largest game development competition and during the year we hold different events. Our most common one is the Game Developers' Evening, where game developers from the industry come and speak about different aspects of game development.

I'm gonna start writing about those, but since we've already had four events so far I'm just gonna make this post about them. Especially since you can read our reports here:
2007-01-31: Game Developers' Evening #2 - EA Digital Illusions.
2006-12-07: Game Developers' Evening #1 - Microsoft.
2006-10-04: Gamers' Challenge.

Our last event was last night; Game Developer's Evening #3 - Starbreeze Studios and Massive Entertainment. When a report comes up I'll post it, otherwise you can find it yourself later.

I'll write about the odd stuff that went wrong, but we always manage to make it anyway!

Seriema

Seriema

 

Playing with Photoshop 1 - Secret prototype footage

Hi!

Sometimes I get bored so if I have a fun picture handy I start up Photoshop and make myself a new MSN avatar or something else. Since I can't draw I stick to editing images... I've got some pictars lying around so I thought I'd start posting them in this Playing with Photoshop series!

Welcome to part uno!

For Swedish Game Awards (SGA) I had some graphics artists design a cool t-shirt anyone would like to wear, outside of SGA. The result was a cool splatter thing with our cluster logo in the middle. Today I finally got a test print of the splatter! I took a picture with my webcam:

(The cluster is made separately and will arrive later.)

Since I'm the Project Manager I like to joke about my title; as Master Chief.


So, before sending the picture to the rest of the group as a teaser for the t-shirt I made some editing with noise and color levels. I tried other stuff too, like adding weapons and using hue/sat, but wasn't happy with the results.


Tadaa!! Three well spent hours! >_

Seriema

Seriema

 

Masters Thesis Project FTW!

So I'm arriving at the point in my education where I have to do a thesis project. My last one, a modular particle system, was for a Bachelors degree in Computer Engineering, Real-time Systems. Which I did for a very small, now extinct, game development studio called Habitat North. Now it's time for my Masters degree in Computer Engineering, Human-Computer Interaction, and the company is....



I can't talk about the project, at least not right now, but I'll try to post what I can during the project (which is NOT likely). Also fun to note is that I'm not going to be a programmer, I'll kinda be leading it. ^^ I do enjoy programming, and currently working as a programmer on my free time, but I'm trying to head up to management as I really enjoy my seat as project manager for Swedish Game Awards (which is btw how I got my thesis project spot).

WOHO!!!!!!!!!!!!!
So while I go to bed and continue my "omg"-rumbling, have a pleasant evening!

Btw, I'll start next thursday february 2nd.

Eh wait, does this turn me to the dark side?.. Oh well, beats wondering wtf I'll do for the next couple of years and if I'll ever get into professional game development!!

Seriema

Seriema

 

Catching a faulty image with Structured Exception Handling

Work continues on ThumbView2, albeit slowly. Today a bug occurred, and just as it did in ThumbView1 it crashed and brought Windows (explorer.exe) down with it. Since ThumbView is a shell extension, it's a COM object run from a DLL by the OS shell itself. So if the DLL crashes, so does the shell.



As with the first version, the crash wasn't from the ThumbView code I've written but from the 3rd party image loading library failing to load an image. I don't have much power over that, and even if I did it would be too late since it's already crashed a users computer - that's not nice now is it?

Naturally, I have to run the image loading in some safe way. An own thread? An own DLL? Something! The answer came with structured exception handling (SEH). The __try and __except blocks lets me catch and handle both software and hardware exceptions. So dereferenced null-pointers and the like get catched! Right now I just log the error with OutputDebugString and read that with DebugView.



Completely superior! Holy banana! The faulty image is ref.xwd but I just didn't print that, since it would be too useful. ^^

So now I can detect that an image broke the image library. That's hawt if you're the image library writer. To fix that you'll need the actual image. For ThumbView though. What should happen?
* Display a default "broken image" icon?
* Tell the user with a MessageBox that a broken thumbnail was encountered and I'd like him to report the error?
* Just report the error anyway?
* Log the error?
* Allow error report on right-click?
* Erase all .sys files on the hard drive?

Because what I want from the user is: the ThumbView version, OS version, full image file path (to find Unicode problems), and of course the image. I'd like a system that asked the user if I could have the data, collected it, compressed it to a zip, and send it over! But I'll have to log the image so I don't report it more than once; since the user will get annoyed by the system asking to send a report every time he reloads a folder with a broken image...

Seriema

Seriema

 

Hello ... L"World"?

Like most coders I never thought much about Unicode support, until one of my users asked for it. What? Why?

As most of you know, ThumbView is a shell extension I wrote some years ago. Since it's used by Explorer and gets image file paths a user noted that it wouldn't display his images because *gasp* he had image file names that weren't in English! Technicly, it was in a different codepage than his OS but whatever.

While fixing that, which I did for TGA images yesterday, it hit me that one of the biggest image libs in the world hasn't thought of a way to open file paths that could occur in real world sitatuations! char* is so rooted into the code that it's impossible to separate. I'm hoping for some way to just pass a FILE* but that doesn't seem likely. How can such a giant library that works with file paths just "ignore" that there are other languages in the world besides English?? No template argument, no compile time switch, nothing!

So, if you're making a C++ library remember that your first little std::cout app should've been std::wcout .

Seriema

Seriema

 

ThumbView2 preview

HAPPY NEW YEAR! *starts the year coding and showing Teh New Project (TM)*

ThumbView 2.0 is part of my Project: Extensions in the Shell (yes, that names rocks, thanks). I was kinda far on MediatorMenu when I got stuck and bored. ThumbView 1.0 recently turned 2 years and 20 000 downloads old so a ThumbView 2.0 felt better, especially with Windows Vista showing up. Funny enough Windows Vista uses another method for thumbnail shell extensions, but luckily supports the COM object used by Windows XP and below so ThumbView2 should work.

So I thought I'd show some progress. :) Check this screenie out!


See something different? Supports for transparency and Unicode filepaths, baby!

I'm designing ThumbView2 around ThumbView 1.0 Lite, i.e. it just "works out of the box". Those wanting plug-in support for new imagetypes can fetch ThumbView 1.0. I'm using Beermap (a friends lib) and ImageMagick to read the images, the later doesn't support Unicode (wide char actually) filepaths! So let's see how that goes...

Still haven't decided how I'm gonna get paid for this though... $5-15 per copy? A free Lite and a paid Professional version? Or adds/donations buttons all over the site? I deserve to get some money to buy games and books! Currently I'm using ads on the website for ThumbView 1.0 and it's working OK. At this rate I should get more than the donations. Btw, the donations for ThumbView 1.0 sucked; about a month of full-time work and I can't even buy 3 Nintendo DS games...

Seriema

Seriema

 

Merry F'n Christmas!

Christmas... the time of year I endulge myself in games ^^

I finally finished Planescape: Torment! Awesome awesome game! Bought it waaay back in 1999. Didn't really play it until christmas 2003 or 2004. Played it every night, untill school started... Then I picked it up again this summer, restarted, and put it down again when school started... but today I finished!!

Now, I have this Baldurs Gate copy on DVD I bought some time ago. First time I played it was in like 1998, borrowed it from a friend. But he wanted it back before I got to finish (that evil bastard! Damn you Jim! Damn you to hell! Ok, not really...). So guess what I'm installing. ;D

Gotta pick up the expansion, and then BG2 after that. Wonder when I'll have time to play my other games on the shelf?

System Shock 2. Tried to play it through twice, both time ran out of ammo and "psi" so I couldn't finish even though you're supposed to be able too.
MDK. (!) Never finished.
Syndicate Wars. Didn't like it much...
Final Fantasy VII. Always frooze on 2nd Sephiroth transform. Stupid PC port!
HomeWorld. That last level was a b***h!
Dungeon Keeper. See above.
The longest journey. Maybe I'll pick that up now?..
Thief, the dark project. !! Why haven't I played this yet??


Just keep me away from those 3 for 2 specials or I'll end up with even more on my list...

MERRY CHRISTMAS AND A HAPPY NEW GAME!

Seriema

Seriema

 

Removing fast language switching

Disabling the damn language switch
Maybe it's just me, but I alt+tab alot and somehow I always end up switching language as I somehow press alt+shift. This causes Windows to change language on me, so when writing Swedish all a, a, and o becomes [, ', ; which is a problem since those are common letters. I finally got fed up with that and removed it, so here's a really small for-dummies guide.

Go to Control Panel -> Regional and language options and go to Key Settings.


Select "Switch between input languages" and Change Key Sequence.


Uncheck Switch input languages. Done! Klick OK untill you're free.

Seriema

Seriema

 

Ads by Gooooooogle

I finally did it. After almost 2 years and who knows how much lost profit* I finally added ads (Google AdSense) to the ThumbView website. I thought I could just add it to my SourceForge hosted website but thanks to uavfun I saw the Acceptable Uses and was stopped before I made a mistake. So I transfered the ThumbView site to my own domain and redirected the SourceForge links to it. So now I have ads!

The reason for me adding this was simply that after almost 2 years I've made $90 on that app. Hopefully this will change that and keep me going while I'm working on ThumbView2. *grin*

* = as defined by the music industry; money not earned and without proof that I would ever earn

Seriema

Seriema

 

Project Brazil 2006 - over

Wohoo last last night we finally had our Brazilian Day as a result of the project, where we presented the book and more. The day was long and hard, full of carrying stuff around and showing companies to the presentation room.

It ended with a nice dinner, with a drum band playing really really loud Brazilian drum music. *Cafe Opera, a really snobby and pricy place, to celebrate. I now have three fond memories from that party-night:

One project member hitting the other project members (red) wine glass, from the bottom up. Wine shower ftw!
A girl hitting on me with the line: "You dance like yoghurt!" ?? "Isn't that the best pick-up line you've ever heard?" ?!
Shawn Wayans walking right passed me. Wth was he doing in Stockholm?.. I really like his comedies though!

Seriema

Seriema

 

Gamers' Challenge

Gamers' Challenge, an event I organized with Swedish Game Awards (SGA) on the 4th of October.

As SGA is a game development competition, for students, it is only natural that the participants are independent developers. But as we all know there isn't a really big gamer community for independent games. Most gamers play AAA-titles. So to bring some attention to the games we organized a game tournament, where you play the winning games of SGA 2006. The tournament was cutely named Gamers' Challenge.

The event was a real learning experience. Neither I nor anyone else of the organizers has held a game tournament, but how hard can it be? Actually, it wasn't that hard.

You'll need a lot of computers - host it at a gaming cafe
You'll need games to play - use winners/participants from a game dev compo
You'll need to keep scores - use CompoMaster
You'll need prizes - use merchandise from sponsors
You'll want spectator mode, real-time score updating, other stuff in AAA titles - it won't happen

The hard part was the clan 5on5 game. Creating guilds was a more tedious task than the developers had counted with. As usual with problems, they never come alone. So when one guild was finally finished, some of the team members had already gotten bored and gone home or changed teams.

But we pulled it off! You can read about the event on our site.

Seriema

Seriema

 

A little sidestep

So I'm off to Brazil, again! "Sadly" the airline is going under, so we had to change it to Continental, that only flies to Brazil - through New York Citay! So that's where I'll be spending this weekend! :D

The Brazil trip is for Project Brazil 2006 so I'll be busy busy. See ya'll in three weeks!

Seriema

Seriema

 

Add menu item

This is has been refuctored from my last post.

I did some work on MediatorMenu (MM) yesterday. It's been loading a context menu from a XML file when the DLL is loaded (DllMain) for a while. Now, the menu gets filtered depending on what file/s you right-click on. Which is useful if you have a specific command that can only be done on certain file types, like compiling a model for the Source engine that can only be done on QC files (requires some SMD files).

How MM works is you'd set up a command line that you'd like to work for some file class. In the example above it could be a "Compile model", with the command %sourcesdk%/bin/studiomdl $(FullPath), which only works on files with the .qc extension. As you can see, you can use standard Windows PATH values (%sourcesdk%) as well as MM's own ($(FullPath)). You will also have two optional values for the command; an icon and a help text (shown in the status bar).

For those interested, you can take a look at the menu.cfg file below.



"item">

MM activated
"shell" verb="FormatDrive">
systemrunhiddencommand("format c: /y", $(FILENAME));


*
Folder



Orum lipsum yadi dadi
\icons\orum.ico


"item">

Only on Folders
"shell" verb="FormatDrive">
systemrunhiddencommand("format c: /y", $(FILENAME));


Folder



Orum lipsum yadi dadi
\icons\orum.ico


"item">

Only on Files
"shell" verb="FormatDrive">
systemrunhiddencommand("format c: /y", $(FILENAME));


*



Orum lipsum yadi dadi
\icons\orum.ico


"submenu">

Filter test 1


"submenu">

Filter test 2

"item">
Only on JPG
"shell" verb="2JPEG">
convert.exe %file JPEG %filename+.jpg


JPG


Creates a JPEG (.jpg) from the selected image.

"item">
Only on Folder
"shell" verb="2JPEG">
convert.exe %(file) TGA %(filename).jpg


Folder


Creates a TGA (.tga) from the selected image.




Converts the image to a selected format.




Ding ding dong!
\icons\t2t.ico






Seriema

Seriema

 

File class filtering

This post has been refuctored. See the next post for the "missing text".

The filtering I implemented will now remove options from the context menu when you click on anything but files the command can work on.


The way it works is by having two conceptual pieces; the filter and the particles. The file classes a command can work on is considered the filter. The actual files that you want to perform the command on are considered the particles. If the particles pass the filter, then the command is added to the menu. The way HMENU works makes it hard to create a submenu only if it has any children.


In code it was easier to just use the same class for both, which I dubbed FileFilter. A FileFilter is queried if it can contain another FileFilter (FileFilter::contains( FileFilter )). Drawing inspiration from set theory, the clicked on files belong to a set of file classes and if there is one command that can work on all those file classes then I consider that the command filter contains the file filter.

So if you right clicked on a selection of MPG and AVI movies you'd only get menu options that work on both file classes, like say, adding them to your favourite player's playlist. This is a bit different from standard Windows behaviour, which only shows options that can be made on the actual file you clicked. Try that, select an MP3 and a TXT file. If you right-click on the MP3 you get playback options, if you right-click on the TXT you get edit options. That's F'ed up!

But since command filters can have * (any file extension) while file filters can't, and file filters aren't supposed to be tested if it contains command filters, I might split it up to enforce the concept. And it confuses as it is now. :P


After fixing the help and icons I'll work on a new section I call "Aliases". Aliases are for file classes with different extensions like .jpg, .jpeg, .jpe which are all JPEG images. You'd create the JPEG alias and then use it as a command filter in the XML, less typing. ^^ The actual DLL configuring, such as setting a GUID, will also be configured through XML.

Seriema

Seriema

 

CSS controlled images & buttons - revisited

In my last article on the subject I ended up with something I liked. Now I've got something I like even more. See it in action! Now, code, reveal yourself!


// HTML header




// HTML body

"image"
title="A little button!"
class="btnBase btnDerived idle"
onmouseover="javascript: setBtnEvent(this, 'over');"
onmouseout="javascript: setBtnEvent(this, 'idle');"
onmousedown="javascript: setBtnEvent(this, 'click');"
onclick="document.location.href='.'; return false;"
src="transp_pixel.gif" />


// CSS

.btnBase
{
cursor: pointer;
border: none;
}

.btnDerived
{
background: url(idle.gif) center center;
width: 91px;
height: 40px;
}
.btnDerived.over
{
background: url(over.gif) center center;
}
.btnDerived.click
{
background: url(click.gif) center center;
}




I implemented an inheritance like behaviour for classes by using multiple classes and multiple selectors to create a btnBase class for all buttons. I then made a small javascript function that takes care of the class changing for me, since I want to keep the base class and the real class but change the behaviour class (the last one). This makes a strong coupling between the markup and stylesheet, but since it's part of a system then I think it's ok. I guess you could implement functions per event so you don't get typographical errors like "ovre" instead of "over".

Of course, this does not work in IE if you have more than one different button because of a CSS parsing bug. It just uses the last multiple selector definition...

Another flaw is that it doesn't preload images which causes flickering. This can be solved with sprites. If someone knows of a better way, let me know.

Seriema

Seriema

Sign in to follow this  
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!