PDA

View Full Version : Opinions - best way to create a browser-playable game?


Backov
04-21-2006, 11:04 AM
I've been thinking about multiplayer recently, and an idea popped up for a multiplayer board/CCG game that I thought might be fun.

However, I'm primarily a C++ guy. I've never done anything in complex web apps. Lots of PHP/MySQL, but nothing at the level of interactivity I am thinking about.

So, that said - what do you think is currently the best approach for a somewhat graphics heavy browser-playable app. Assuming that it can't be done in PHP/HTML.

Java?
Flash?
Shockwave? (Is that even still around?)
XAML/XUL/Whatever new MS thing is around the corner?

princec
04-21-2006, 03:49 PM
Flash is the most ubiquitous and the one that'll make you want to throw up the most; Java is next most ubiquitous and probably more comfortable to you but will be the hardest to get consistent good results from. Cas :)

whisperstorm
04-21-2006, 05:18 PM
If you are just doing simple 2d animations or fairly static designs, dont discount plain old DHTML / AJAX. With the advent of the <canvas> tag in safari,opera, and firefox - and google's compatibility layer for IE - you can even draw bitmapped graphics and effects to a 2d region - almost like coding for an old console.

For example:

http://www.abrahamjoffe.com.au/ben/canvascape/

Backov
04-21-2006, 05:20 PM
Thanks for the feedback Cas, I've been hearing that about Flash - I look at the UI and am just confused. It seems kind of rough to have to use a tool that was made for animations and somehow get it to do games. :)

Chris Evans
04-21-2006, 05:36 PM
Don't overlook Shockwave. It's more powerful than Flash. More consistent than Java, and has a solid market penetration. It also has an object-oriented scripting language.

The drawbacks are the initial price and the learning curve with the scripting language. But if you can get over those hurdles, it's probably the best option for a graphics heavy browser game.

UnknownGuy
04-22-2006, 06:26 AM
Hey hey, I am a Flash Fanboy, it ain't all that bad(Except for the whole power thing :p).

Flash 7/8 do have a pretty good OOP system set up, though I have only gone a bit into c++ OOP(Though flash has no function overlaoding, no pointers etc...).

The great thing is the handling of animation, and the simplicity of the of attaching graphics.

If you use ActionScript 2(OOP), you would probably want to use an external edtior like SEPY for instance. In my game, which I've worked on forever(Not flash's fault, mine :p), I barely use Flash itself except for compilation and placing a few pieces of code/things on the stage.

If you want any help with Flash, if you use it, just PM me.

My two cents.

PaulModz
04-22-2006, 07:28 AM
Unless you plan on being truly HTML/browser based, you should check out .Net 2.0 Smart Client applications.

You build your application like any .Net Windows Forms app (Managed DirectX is very good, BTW), and push a few extra buttons in Visual Studio when building your application. Visual Studio will “publish” your application to a website (any web server will do, Windows and IIS are not required since all the smarts are on the client side). When a user enters the URL for your application, Internet Explorer and .Net 2.0 create a safe sandbox for your application to run in much like Java does, though you can specify that you would like the application to have complete and unfettered access to the local machine, which requires an approval from the user like any other installer.

Your application binaries are stored in a local cache by IE and each time the user starts your application (from the start menu or by going to the application URL) the local version of every file is checked against the version on the web site, updating anything you want the user to have. While your application is technically hosted by Internet Explorer, it doesn’t run inside the browser, and is indistinguishable from a normally launched Windows application.

In addition to managing you application, the SmartClient installer can also download and install standard prerequisites like the .Net framework itself, ADO, VC++ runtimes, Windows Installer 3.0, etc. (not sure about Managed DirectX, but there is a mechanism to create custom prerequisites, and I’m sure MS will make one available soon). These prerequisite installers are downloaded from MS and don’t have to be included in your installation or stored on your web server.

The last thing to consider is the special relationship between a SmartClient application and any XML Web Services running on the web site it was launched from. Even if your application is restricted from making direct calls to the Internet, you can almost always access a web service that is running on the same web server (or maybe its the domain, not sure) that is hosting your application.

Backov
04-22-2006, 04:20 PM
Hmm, that sounds just about ideal. Thanks, I'll check that out.

Although, it kind of sucks to lose Mac compatibility.

revve
04-23-2006, 03:18 AM
However, I'm primarily a C++ guy. I've never done anything in complex web apps.

I'm surprised nobody mentioned igLoader (http://www.igloader.com/) yet. Haven't used it myself yet, but I've heard of several other forum members who have. Apparently it's getting quite a bit of coverage. You simply develop your app in whatever language you want to, wrap it with igLoader and you have a cross-browser web-game.

You won't get it to work on non-Windows operating systems unless you use flash (or java) or something web-native, though.

Teq
04-26-2006, 05:08 AM
Flash is the most ubiquitous and the one that'll make you want to throw up the most; Java is next most ubiquitous and probably more comfortable to you but will be the hardest to get consistent good results from. Cas :)

Never written an applet in my life, any advice on this? (can take this out of the thread if u wish...)

princec
04-26-2006, 05:25 AM
Tutorials abound. Just extend the Applet class, override init() and destroy() and paint().

Cas :)

Polycount Productions
04-26-2006, 06:17 AM
How about this: igLoader (http://www.igloader.com) (program in your own language... release using igLoader?)

XIX
05-04-2006, 04:28 PM
Thanks for the feedback Cas, I've been hearing that about Flash - I look at the UI and am just confused. It seems kind of rough to have to use a tool that was made for animations and somehow get it to do games. :)

Do not go near the actual flash authoring app.

If you are a real coder just use mtasc / swfmill , check http://www.osflash.com for more useful tools and titbits.

Ignore the naybobs, flash isn't that bad, the basic deal is you have the exact same setup as a browser with javascript (actionscript is javascript is ECMAscript) only its tweaked towards running at a reasonable frame rate rather than displaying static content.

I actually quite like ECMAscript, it's very similar to Lua. Similar enough that I'm thinking that having game code written in Lua that can be translated and run under flash as well as in a custom client is the way I want to go.

I's also like to plug http://www.bunchball.com as a possible server side hosting solution for a flash CCG style game. I'm nothing to do with them, but I like what they have.

Xiotex
05-10-2006, 05:31 AM
On the plus side - it was quick to get the game up and running. The game took just two weeks to write).

On the down side - Flash is designed to fail silently so debugging it was hell.

Flash 8 has really improved things as far a I am concerned.

Would I do it again? Well, yes I would use Flash again... but secretly hope I never have to!

Tertsi
05-10-2006, 06:37 AM
The bad thing about igLoader is that very few users really have the plug-in.
So the users have to manually install the plug-in first and during that time they could have just as well installed the game.

dxgame
05-11-2006, 07:57 PM
"So the users have to manually install the plug-in first and during that time they could have just as well installed the game."

How big of a foot print in IGLoader?

jankoM
05-12-2006, 01:13 AM
The bad thing about igLoader is that very few users really have the plug-in.
So the users have to manually install the plug-in first and during that time they could have just as well installed the game.

If you take away falsh and shockwave I think igLoader still has (will have) the biggers possible userbase amongst the plugins. (I think miniclip is using it also). I also think it is no-install (just click the popup in IE) and download is very very tiny. I will use it on all my games that are appropriate to do so.

BinaryMoon
05-12-2006, 01:51 AM
not sure what you mean by footprint. The plugin file size for igloader is smaller than flash (currently under 100k).

Currently Miniclip isn't using the plugin but we have bought a license to use it and will be transferring all of our activex games over to it some time soon. That should increase the installed userbase considerably (we get approx 27 million unique visitors a month).

Mike Boeh
05-12-2006, 07:01 AM
I have a lot of experience now with this I think, and my simple answer is:
Use Flash! It's relatively cheap to have your game ported to flash, and then it can be played by about 98% of all web users with no additional download or hassle.

I have an activex control that works similar to igLoader, and it has been difficult to get users to actually use it- and that's with an automatic prompt. Also, an older version was flagged by many spyware/virus scanners as a trojan- which isn't true of course. But the fact that the control downloads and runs an exe isn't something that these checkers like to flag. Seeing CreateProcess immediately will raise issues.

In my more recent version, I added lzma compression and data encryption, and it hasn't been reported by the checkers- but I bet it eventually will. I think igLoader is doomed to the same fate. With anyone able to buy it- eventually it will fall into the wrong hands. Tim had mentioned going after the offender with legal action, but I doubt somebody in China really cares.

Additionally, most web game sites want flash, java, or shockwave- not ActiveX. The portals are okay with it, but not the webgame sites that will actually bring traffic to you directly. So if you want that additional traffic, forget about it with a plugin or ActiveX control. Java has the Microsoft issues, and Shockwave is slowly fading away. So that leaves Flash, and only Flash.

So I guess in summary, even though I have ActiveX versions working perfectly- I am still paying to have Cosmo Bots and Water Bugs ported to flash.

BinaryMoon
05-12-2006, 07:29 AM
Flash is most definitely the best followed, some way off, by Director. However igLoader is really good for people who don't have the time/ inclination/ technical know-how to get their game converted.

I must admit I have similar concerns about igLoader and spyware scanners but hopefully since it is a proper marketed application Tim will be able to at least slow down these problems.

BTW As soon as you get Best Friends working in Flash we will be all over it :)

Mike Boeh
05-12-2006, 07:35 AM
Oh don't get me wrong, I think igLoader is a wonderful implementation. It's exactly how I would do it if I had the time. But I just think flash is the better alternative- despite its crappy performance... I am not factoring time/money constraints into the equation.

princec
05-12-2006, 07:37 AM
Flash is most definitely the best followed, some way off, by Director. However igLoader is really good for people who don't have the time/ inclination/ technical know-how to get their game converted.

I must admit I have similar concerns about igLoader and spyware scanners but hopefully since it is a proper marketed application Tim will be able to at least slow down these problems.

BTW As soon as you get Best Friends working in Flash we will be all over it :)
Reckon Titan Attacks will work nicely as Flash?

Cas :)

Indiepath
05-12-2006, 07:43 AM
But I just think flash is the better alternative.
Exactly, our product is an alternative to Flash and Java not a replacement. And that is why I like to tell people that you can even play a Flash or Java minigame within igLoader as the main game downloads.

Mike Boeh
05-12-2006, 07:50 AM
Exactly, our product is an alternative to Flash and Java not a replacement. And that is why I like to tell people that you can even play a Flash or Java minigame within igLoader as the main game downloads.
BTW, I had said no to giving you my source code a while back... But since I am dropping it now, I'd be happy to share it with you now- if there's anything you can get from it. Just PM...

BinaryMoon
05-12-2006, 07:58 AM
Titan Attacks would be perfect for Flash. Shame you didn't create it in that from the start :)

Indiepath
05-12-2006, 07:58 AM
BTW, I had said no to giving you my source code a while back... But since I am dropping it now, I'd be happy to share it with you now- if there's anything you can get from it. Just PM...
Thanks Mike, it would certainly be interesting to see your implementation. I'm sure you're INBOX will soon fill up with others wanted a glimpse too :)

Cheers,

Tim.