[.net] Web Based ActiveX Controls in VB.Net / C#

Started by
6 comments, last by EdR 15 years, 11 months ago
This is another thread in the web development section I created based on the same subject. The reason I'm posting this in this section is because I'd like to ask if anyone has used ActiveX controls in VB.Net or C# for their browser based game development. If so, how limiting is using an ActiveX Control for data management, graphics manipulation, networking, etc? How browser specific is it? Perhaps OS limitations? I'd rather not have to learn any new languages if possible, so if an ActiveX Control could do most of the work for me.. I'd tend to lean towards it depending on just how bad the headaches are that come from it. &#106avascript and PHP may be wonderful tools, but they're definitely not my number one choice.
Advertisement
You don't want to be using ActiveX controls for browser games. ActiveX controls are generally a steaming pile of crap: they're insecure (many users disable untrusted ones by default, because they can do nasty things to an end user's computer), they're slow (I don't even know if you can P/Invoke to use BitBlt on them, and GDI is pretty horrible). The only browser that will reliably be able to view them is IE on Windows. Alternate OSes and browsers generally cannot view ActiveX controls. There is no good reason to use ActiveX outside of a limited-scope environment where you know everyone is going to be using IE on Windows.

Silverlight 2.0 (which will use a limited version of the .NET framework) is looking to be pretty nice, but its market share is currently not good at all and I would advise not relying upon it for anything quite yet. It's also currently limited to Windows and a somewhat-working Mac port; the Mono Moonlight implementation is still very sketchy last I heard (which was a bit ago so I may be out of date).

Flash is still the best choice and is not hard to learn if you want to be making browser games. It's essentially a flavor of &#106avascript and I believe Adobe has a free Flash toolkit out there now.
http://edropple.com
Can flash handle a multi user environment, collision detection, database manipulation, etc?
If you write the code to. Flash supports sockets; thus client/server programming is feasible. Database manipulation is the same thing. I'm sure there are libraries somewhere to facilitate it. Collision detection is just geometry, and should be the same to implement in any language.
http://edropple.com
Quote:Original post by EdR
If you write the code to. Flash supports sockets; thus client/server programming is feasible. Database manipulation is the same thing. I'm sure there are libraries somewhere to facilitate it. Collision detection is just geometry, and should be the same to implement in any language.


I was more or less worried about it's speed capabilities with handling all these different features. Not to mention that I'm hoping to do a rather limited number of users per area, and then having everyone pass their data to all other users rather than to a server.

Why do you suggest flash over &#106avascript?
Quote:I was more or less worried about it's speed capabilities with handling all these different features.
I would bet real money that nothing you are doing is more complex or difficult than what others have done in Flash.

Quote:Not to mention that I'm hoping to do a rather limited number of users per area, and then having everyone pass their data to all other users rather than to a server.
Web applications are almost always client/server. I think you don't quite know what you're trying to deal with here, and I think you need to do more research. I do not think a web app is what you want to be making.

Quote:Why do you suggest flash over &#106avascript?<!--QUOTE--></td></tr></table></BLOCKQUOTE><!--/QUOTE--><!--ENDQUOTE-->Why do I suggest a hammer over a length of rubber hose when you have a nail to drive into the wall?<br><br>&#106avascript isn't made for games. It's not portable--every browser core, be it IE or WebKit or Gecko does &#106avascript differently. It's slow--try to make anything more complex than a very simple game (the most complex I've ever seen was Tetris) and &#106avascript will start drooling. It is simply not &#106avascript's "thing."
http://edropple.com
Quote:Original post by EdR
I would bet real money that nothing you are doing is more complex or difficult than what others have done in Flash.

You're probably right, but the only thing I've ever seen similar to what our project is going to consist of (that's been done in flash) was something like Dofus. We're going to be doing something on par with http://www.gaiaonline.com/ combined with Dofus, but the game aspect will need to be peer to peer.

Quote:Original post by EdR
Web applications are almost always client/server. I think you don't quite know what you're trying to deal with here, and I think you need to do more research. I do not think a web app is what you want to be making.

The idea is for a browser based game, where your profile has features similar to gaiaonline or myspace profiles. The catch is that the server we'll have access to will only be for web space and the database.

To offload the resources consumed through the game part of the site, we're intending to have the server simply hold the game data and lists of all the instances of the game with which users are in each instance and their respective IP's. Then, once the user has downloaded the client, logged in, and is ready to play.. their coordinates/chat messages are passed directly to the other users within that specific instance rather than being coordinated through a server.

Quote:Original post by EdR
Why do I suggest a hammer over a length of rubber hose when you have a nail to drive into the wall?

&#106avascript isn't made for games. It's not portable--every browser core, be it IE or WebKit or Gecko does &#106avascript differently. It's slow--try to make anything more complex than a very simple game (the most complex I've ever seen was Tetris) and &#106avascript will start drooling. It is simply not &#106avascript's "thing."<!--QUOTE--></td></tr></table></BLOCKQUOTE><!--/QUOTE--><!--ENDQUOTE--><br><br>I knew nearly none of that. That's why I'm asking the questions I am. It would make sense for some of the users we'll have to not even be interested in playing the game, and rather instead simply have a profile and collect items. In that case, I can't help but think HTML/PHP would be my better choice (again, I don't know.. just assuming here).<br><br>So the game itself might be best done in flash, but would it be worth it for me to do the entire site through flash? I haven't a clue. That's assuming flash is the &#111;nly decent choice for what I'm going for, which was supposed to be how my question was meant to be taken regarding &#106avascript (but I didn't know just how bad &#106avascript could end up being for this kind of project).<br><br>Edit/PS:<br>I really appreciate your help, it's a difficult subject for me to just simply Google without needing to research every term I've ever heard of regarding web programming.
Quote:I knew nearly none of that. That's why I'm asking the questions I am. It would make sense for some of the users we'll have to not even be interested in playing the game, and rather instead simply have a profile and collect items. In that case, I can't help but think HTML/PHP would be my better choice (again, I don't know.. just assuming here).
This is probably correct, yes. Although distributed games bring with them a host of problems you probably aren't equipped to really deal with, for the website at least a simple scripting language on the site makes more sense than Flash or anything else, because you have no need of it there.

If you insist on a distributed model for the game (which is a bad idea; client/server makes more sense in most situations where there is a persistent world or persistent records, for some pretty glaring reasons), you might as well write it as an offline application. Web apps are client/server; doing a distributed model within a system designed for client/server is difficult at best.

Quote:Edit/PS:
I really appreciate your help, it's a difficult subject for me to just simply Google without needing to research every term I've ever heard of regarding web programming.
You're welcome. Regarding the difficulty of the subject--Googling is probably a very good place to start. Google a LOT of this stuff. Read the Wikipedia pages on the various concepts and tools you're talking about. You'll be much better equipped to discuss this topic when you know what the various aspects of it are.
http://edropple.com

This topic is closed to new replies.

Advertisement