+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 30 of 42

Thread: Web-Playable Games

  1. #1
    Senior Member
    Join Date
    Oct 2004
    Posts
    167

    Default Web-Playable Games

    I've always wondered how web-playable games are done. I'm not talking about CGI clickfests ior Java meets hello world, but really playable browser games. And of course, I know about Shockwave, but it seems like an odd language in which to code things. But hey, if that's how it's done, coolio.

    That aside, I once tried porting my biggest and baddest game to the WildTangent WebDriver. I gave up when I realized the sucker was automatically calling Garbage Collection every 2 seconds. I ported the models, I ported lots of sprite textures, physics, collision detection, and even some AI only to see the thing stutter uncontrollably every 2 seconds. I haven't played with their stuff since though I hear they fixed that about a year later.

    I also know that EA had some strange ActiveX content for some of their online games. What I never found out was exactly how they got it work in IE.

    So anyway, how do ya do it? A link would be great...

  2. #2
    Senior Member
    Join Date
    Jul 2004
    Location
    San Diego, CA
    Posts
    1,148

    Default

    How long ago were you using WildTangent? We were using it in 2001 for a rather elaborate game (elaborte by web-browser standards) and also ran into that GC "heartbeat". Ours was more like once/second, though.

  3. #3
    Senior Member
    Join Date
    Jul 2004
    Location
    Phoenix, AZ
    Posts
    498

    Default

    This is the tech we use for our games (both web and standalone):

    http://www.virtools.com/

    It seems like the recent trend is custom-made ActiveX. PopCap and Raptisoft both went this route for their recent web games. The older conventional wisdom was to use Flash or Java 1.1; anything else would create huge installation problems. It seems this wisdom is being challenged. Fine by us, really, since the Virtools web player has very poor installed base
    Matthew Wegner
    Founder, Flashbang Studios
    Partner, Indie Fund
    Editor, Fun-Motion
    Co-Chair, IGF

  4. #4
    Administrator
    Join Date
    Jul 2004
    Location
    WA
    Posts
    1,415

    Default

    I know some games have been done in javascript and java 1.1. They seem to run pretty well in the browser, though as you can imagine they arn't really graphically intense.

    I was actually considering messing around with firefox's plugin architecture to do a little game. Mostly for fun, but also because it's a disruptive technology with some momentium and a growing number of users. It might actually be a nice niche market.
    Dan MacDonald
    a prisoner of the cause

  5. #5
    Senior Member
    Join Date
    Oct 2004
    Posts
    167

    Default

    Quote Originally Posted by Matthew
    This is the tech we use for our games (both web and standalone):

    http://www.virtools.com/

    It seems like the recent trend is custom-made ActiveX. PopCap and Raptisoft both went this route for their recent web games. The older conventional wisdom was to use Flash or Java 1.1; anything else would create huge installation problems. It seems this wisdom is being challenged. Fine by us, really, since the Virtools web player has very poor installed base
    I tried to figure out how to make ActiveX applets some time back. It looked like one had access to only DirectX 3 and retained mode D3D. Has that changed and is there now a sample app out there anywhere from which to try it out? DirectX 8 and said ActiveX would suit me fine.

    Also, since it's ActiveX, does that mean it needs a software certificate yadda yadda yadda?

    Scott

  6. #6
    Moderator
    Join Date
    Jul 2004
    Posts
    1,482

    Default

    If flash can do your game justice, that is the way to go. Dan, you don't think so even with Little Soldiers online version being Flash?
    Thanks,
    Brian Fisher
    ArcadeTown.com

  7. #7
    Senior Member
    Join Date
    Oct 2004
    Posts
    167

    Default

    Quote Originally Posted by Jim Buck
    How long ago were you using WildTangent? We were using it in 2001 for a rather elaborate game (elaborte by web-browser standards) and also ran into that GC "heartbeat". Ours was more like once/second, though.
    Heh heh, I think you might have emailed me about it in mid 2001. I made a big stinky noise on their forum about it in late 2000. It was really disheartening.

    Then life got in the way, and well, here we go again...

  8. #8
    Senior Member
    Join Date
    Jul 2004
    Location
    Durham, UK
    Posts
    4,873

    Default

    Modern applets rock. And Webstart sits in a curious no-man's land between browser based games and installed client applications.

    Cas

  9. #9
    Senior Member
    Join Date
    Jul 2004
    Posts
    629

    Default

    Here's yet another hat to throw in:

    http://www.alambik.com


    they have a plugin that can do a lot - it's sorta a cross between shockwave and dhtml.... The language is kinda odd, but fairly easy to create stuff with. And some of the demos are pretty interesting.

    I'd say however that if you want any degree of ubiquity with folks using browsers you'd probably should go with flash or java...
    [Web Developer and RPG Fanatic]
    AW Dot Com

  10. #10
    Senior Member
    Join Date
    Jul 2004
    Location
    Mississippi USA
    Posts
    289

    Default

    The key to using Shockwave for games is to bypass the Director stage/score metaphor entirely. You set the Director stage to loop infinitely, use the API to grab a handle to the screen, and create a backbuffer for blitting sprites. Then create your game loops and logic using the "normal" way: code.

    The scripting language is very easy to learn, like all scripting languages, and the newest version lets you use JavaScript if you prefer. You can use OOP or procedural structure. It has a debugger that works very well. You get fast alpha-blended sprites without hardware acceleration/incompatibilities, audio playback and control, TrueType-originated font embedding with anti-aliasing, resource management with packaging and encrypted protection, web playback through a widely distrubted plugin, and stand-alone Mac and Windows players.

    I'm evangelizing Director a bit, I realize, but I've been using it since version 4 and the maturity level it has reached is incredible. It is a powerful game production tool considering all the stuff that is built in, and it has been hammered on for so long most bugs are either known or gone.

    Of course, all of this assumes a 2D game. Director can do 3D, too. But use it for a game? I wouldn't.
    Tom Cain :: Smallware

  11. #11
    Moderator
    Join Date
    Jul 2004
    Location
    San Diego, CA
    Posts
    1,167

    Default

    Of course, all of this assumes a 2D game. Director can do 3D, too. But use it for a game? I wouldn't.
    Well, I actually did use Director for a 3D game. My game Pow Pow's Great Adventure was created with Director.

    I used Director for many of the reason's Tom brought up. But I also want to say probably the best reason to use Director is its cross-platform compatibility. It's the only application that I'm aware of that can easily deploy 3D game content to the Web, PC, and Mac (OSX & OS9) with literally a few clicks.

    The 3D engine is a bit outdated and could use some much needed bug fixes, but once you come to grips with some of its quirks you can still get some pretty good results, especially if you're not trying to do something too overly elaborate. Plus, you can use the Havok physics engine if you want.

    As Tom mentioned, if you're doing a 2D game, I'd highly recommend Director. There's just so many little options and features available that can help you create games quickly across all the major platforms.

    Two things I noticed that seem to turn people off to Director.

    1) Price - Yeah, the price is a bit hefty, but I really think it's worth it. No other game maker application supports as many file formats or has the same cross-platform compatibility. The greater audience you can reach helps offset the initial price.

    2) Lingo Scripting Language - A lot of purist tend to scoff at Lingo before really giving it a good look. However, it's one of the few scripting languages I know that allows you to use OOP. If you still can't stand Lingo, the latest version of Director allows you to use Javascript. So I don't think Lingo should be the primary reason not to use Director.

    If you have intentions to have a Web game/Web Demo, definitely check out Director. Flash obviously has greater penetration, but doesn't quite have the power or versatility of Director. If you're doing a small puzzle game, then go with Flash. If you're doing an action game or something bigger, check out Director. And yes, I'm evangelizing it.
    Outside the Box Software
    http://www.outsidetheboxsoftware.com
    |SocioTown - Virtual Game World |

  12. #12
    Senior Member
    Join Date
    Jul 2004
    Location
    San Diego, CA
    Posts
    1,148

    Default

    Quote Originally Posted by merovingian
    Heh heh, I think you might have emailed me about it in mid 2001. I made a big stinky noise on their forum about it in late 2000. It was really disheartening.

    Then life got in the way, and well, here we go again...
    Wow, I had to check my backlog of emails to check this, and all I've got to say is - daaaaaamn, you've got a hell of a memory. You were right; I did email you about this in mid-2001. You ended up ditching WildTangent for C++/D3D.

  13. #13
    Senior Member
    Join Date
    Jul 2004
    Location
    San Francisco
    Posts
    747

    Default

    Multimedia Fusion actually has web-based capabilities as well (Vitalize).

    Though the main issue I have with it is that it cannot handle large games or anything processor intensive when run through a browser.

    For offline games, it works like a charm.
    Alex Ahlund, President
    Casual Mechanics
    Formerly: Injoy Games

  14. #14
    Senior Member
    Join Date
    Aug 2004
    Location
    Cardiff
    Posts
    116

    Default

    We have web games on our site, all written in Java 1.1 (works on most MSIE versions without any extra plugins required).

    AFAIK, XP still ships with the VM even though there were some mutterings it wouldn't.

    As the Java syntax is very similar to C++, we have a set of libraries for C++ that use a similar interface to our Java libs, so we write the games in C++ and it takes around 1-2weeks to convert them to Java versions.

  15. #15
    Senior Member
    Join Date
    Jul 2004
    Posts
    799

    Default

    Well, here's how our web loader works.

    Basically, you make an ActiveX control, just using the wizard in Visual Studio. This is a control designed to be a window on a web page. Fairly simple at this point.

    Now, you have that ActiveX control download files from your server onto the user's machine. Usually into C:\Documents and Settings\Application Data\Your Company Name\Your Game Name (at least, that's how we do it).

    One of the files you download is a DLL. The DLL is your game, recompiled into a DLL, and not creating a window, but, rather, accepting a window as a HWND parameter in the DLL entry point.

    Now your ActiveX control, when it finishes downloading, fires off that DLL and tells it the ActiveX window. Boom, your game plays, using the ActiveX window as your game window. It's fairly simple to write a basic one. Where the HELL comes in is all the multithreading issues and whatnot that you'll run into while doing this.

    You can see ours in action by going here http://www.raptisoft.com/ and hitting the "Play Now" button.

    The basic advantage of ActiveX is that you don't have to program both a web version of your game, and a downloadable. Just make your d/l version, then strip out whatever you want, compile it as a DLL, and you're good to go. We managed to make the whole web hamsterball port itself, not including the loader, in three days, just ripping stuff out of the downloadable version.

  16. #16
    Senior Member
    Join Date
    Oct 2004
    Posts
    167

    Default

    Quote Originally Posted by Raptisoft
    Well, here's how our web loader works.

    Basically, you make an ActiveX control, just using the wizard in Visual Studio. This is a control designed to be a window on a web page. Fairly simple at this point.

    Now, you have that ActiveX control download files from your server onto the user's machine. Usually into C:\Documents and Settings\Application Data\Your Company Name\Your Game Name (at least, that's how we do it).

    One of the files you download is a DLL. The DLL is your game, recompiled into a DLL, and not creating a window, but, rather, accepting a window as a HWND parameter in the DLL entry point.

    Now your ActiveX control, when it finishes downloading, fires off that DLL and tells it the ActiveX window. Boom, your game plays, using the ActiveX window as your game window. It's fairly simple to write a basic one. Where the HELL comes in is all the multithreading issues and whatnot that you'll run into while doing this.

    You can see ours in action by going here http://www.raptisoft.com/ and hitting the "Play Now" button.

    The basic advantage of ActiveX is that you don't have to program both a web version of your game, and a downloadable. Just make your d/l version, then strip out whatever you want, compile it as a DLL, and you're good to go. We managed to make the whole web hamsterball port itself, not including the loader, in three days, just ripping stuff out of the downloadable version.

    Thank you! You truly rock for answering this 4 year-old question of mine :-)...

  17. #17
    Senior Member
    Join Date
    Jul 2004
    Posts
    624

    Default

    Raptisoft

    Just a note on your game playing in the browser. Everything works fine, but I would advise changing that second level to something else. Trying to avoid that black 8-ball with the cursor keys is almost impossible.

  18. #18
    Moderator
    Join Date
    Jul 2004
    Location
    Zürich, Switzerland
    Posts
    1,966

    Default

    Quote Originally Posted by Raptisoft
    Well, here's how our web loader works.
    Wow. I just tried it. It's just amazing!
    Gabriel Gambetta
    Google Zürich - Formerly Mystery Studio

  19. #19
    Senior Member
    Join Date
    Aug 2004
    Location
    Arlington, VA
    Posts
    656

    Default

    Very cool!
    Philip Ludington
    Mr. Phil Games

  20. #20
    Senior Member
    Join Date
    Oct 2004
    Posts
    179

    Default SQL Connection

    Has anyone tried any projects like this using ActiveX or Flash that are multiplayer and require a lot of communication with a server, as well as database pulls and updates?

    I'm curious if Flash especially is reliable enough or fast enough for this. I've currently got a turn-based strategy game (www.alloutwar.com) that run completely off of javascript and dhtml, and I'm wondering if looking into reworking the combat system into Flash would be worth the effort.

  21. #21
    Senior Member
    Join Date
    Sep 2004
    Location
    Jumping through Europe
    Posts
    1,403

    Thumbs up

    I've been doing major Flash stuff over past 4 years.

    I'm still not sure it's possible to do realtime multiplayer games in Flash. Flash is able to use HTTP for GET/POST (and XML natively, but parser really sucks so you have to use some other widely spreaded solution). Flash can access WebServices. And there's also XMLSocket. This is the native stuff we are talkign about. All of the native stuff is enough for any turn based games. Or something like VS Tetris, check http://www.ventoline.com/v2/ . You won't be able to use P2P here, only Client-Server solution, Flash can't "listen on a port".

    Flash programming is very different from other languages, it's very tricky to make a speedy and robust game/application, you need to know dozens of tricks.

    Another solution, which obviously allows you to do almost anything you want, is to make a wrapper for Flash. That way you'll be able to do networking via any language you prefer and just put variables back into Flash using different techniques. Again, if you don't know Flash, it's not worth it.

    If you want to see a recent successfull single player Flash game:
    http://zone.msn.com/en/root/deluxe.h...x_mp_lnk&ln=en

    In case anybody has any Flash-related questions (or may be a project to do), feel free to contact me.
    NO MORE SARCASM, JUST STRAIGHT CAPS FACTS.
    this is sparta!!!!

  22. #22

    Default

    Wow. I just tried it. It's just amazing!
    I agree.
    The only downside of ActiveX is that runs only on windows

  23. #23
    Senior Member
    Join Date
    Jul 2004
    Location
    Durham, UK
    Posts
    4,873

    Default

    Truly the correct tool for this particular problem is Java?

    Cas

  24. #24
    Senior Member
    Join Date
    Sep 2004
    Location
    Jumping through Europe
    Posts
    1,403

    Thumbs up

    Flash is more web-"rich" than Java.
    Don't forget that you need to download Java, but according to web stats from Macromedia...

    http://www.macromedia.com/software/p...s/flashplayer/

    That's very usefull graph for everyone!
    NO MORE SARCASM, JUST STRAIGHT CAPS FACTS.
    this is sparta!!!!

  25. #25
    Senior Member
    Join Date
    Aug 2004
    Location
    Cardiff
    Posts
    116

    Default

    Hmmm - not 100% sure I would trust Macromedias survey about it.

    Direct from our weblogs: over 96% of our visitors don't need to download anything to play our games online.

    We use Java 1.1 - supported in IE 5+, ans this is the percentage that are browsing with IE, or have the user-agent on the game pages of 'Java 1.x' if they are not using IE.

    - It is fairly easy to port from C++,
    - works on Macs, Linux, etc.
    - Does not require code signing / the user having to agree to download & install anything


    - Dom
    Last edited by Dom; 11-02-2004 at 12:29 AM.

  26. #26
    Senior Member
    Join Date
    Jul 2004
    Posts
    629

    Default

    I'm just getting into flash game development, and my platform of choice is the new open source software from Laszlosystems --- you can develop the entire application with xml and javascript which gets compiled into flash on the server side --- check out this demo:

    http://www.laszlosystems.com/demos/weather/

    I'm creating a graphical MUD using this tool -- here's an example
    http://www.andrewwooldridge.com/laszlo/tinyworld_game/

    It's perfect for 2d games.

    Anyway, just offering another alternative - plus it's free and open source now.
    [Web Developer and RPG Fanatic]
    AW Dot Com

  27. #27
    Senior Member
    Join Date
    Oct 2004
    Posts
    167

    Default

    Quote Originally Posted by Tom Cain
    The key to using Shockwave for games is to bypass the Director stage/score metaphor entirely. You set the Director stage to loop infinitely, use the API to grab a handle to the screen, and create a backbuffer for blitting sprites. Then create your game loops and logic using the "normal" way: code.

    Of course, all of this assumes a 2D game. Director can do 3D, too. But use it for a game? I wouldn't.
    Silly question: what's the difference between Director and Flash?

  28. #28
    Senior Member
    Join Date
    Oct 2004
    Posts
    179

    Default ActiveX

    Technical Question on the ActiveX stuff...

    Is it possible to have users download a .dll and all of the graphical resources it needs one time, to a known location, and then have an ActiveX control load that dll at any time later and run it?

    Have a situation where a potential .dll with resources could easily go over the 10mb mark, and having it download that every time someone uses it would be impractical. But I'm a little worried about the ability of the controls to read off a file it didn't create itself (have had this problem with Java before).

  29. #29
    Senior Member
    Join Date
    Jul 2004
    Posts
    799

    Default

    Yossarian:

    Yeah... you just have your loader see if the DLL is there. Is it? Don't download. But you want to enable version checking and stuff too.

    Take a look at Hamsterball on my site... then look in C:\documents and settings\application data\raptisoft\hamsterball. If the version number in the object tag on my site is different than the version number in version.txt, the whole thing re-downloads. Otherwise, it doesn't.

  30. #30
    Administrator
    Join Date
    Aug 2004
    Location
    California
    Posts
    1,769

    Default

    So those files are left there forever? From a user perspective that doesn’t seem right.

    The ActiveX Web version of Ricochet Lost Worlds relies on the browsers cache to eliminate duplicate downloads. It does not leave any other files behind. The game (DLL and art assets) are packaged in a CAB file. Every time you load the web page the loader (ActiveX control) asks the browser to download game’s CAB file. A specific download API is used which will make sure the CAB is no re-downloaded if it is already in the cache. The loader then extracts the contents of the CAB into a temp directory and deleted them when you exit the game. Nothing is left on the user’s machine except the CAB file in the browsers cache. The browser will automatically delete it from the cache eventually.

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts