 |

11-11-2002, 05:41 AM
|
|
|
VB online
|
|
I'm not sure if this is possible, but anyway what I want to do is integrate a VB6 program I've made into a website. Basically, I want the ability for people to play my VB game online.
If this can be done, how do I go about doing it?
Do you have to rewrite your code into something like VB Script?
I fear it's not that easy to do.
|
|

11-11-2002, 08:07 AM
|
|
|
What kind of game is it? Does it have graphics or is it text only?
If you've never programmed VBScript before, I'd suggest stay in windows. Even with a very simple text-based game there are a LOT of issues to deal with that you'll have to "re-learn" in VBScript.
If you're using graphics and if you're really determined to do this, you have three basic options:
1. Use VML. This is going to be the worst performance and VML isn't supported all that well (better in IE, but there's still not a lot of documentation). It's the only true web-only method. It will require changing a LOT of code, I'm sure and there are no "BitBlt" methods.
2. Use a custom control and do your painting on that. This requires IE (maybe new versions of Netscape?). It also means a user will have to trust your control, which means popups. You'll also need to get a cert to sign your control with so that people can check its authenticity. If you just plan on giving it to friends, not such a big deal.
3. Use something akin to .NET's distributed approach. Meaning, you code it as a windows app but distribute it over the web. If you use .NET you can have it do automatic updates and more.
If all this doesn't sound too discouraging, give it a try. I've done ASP programming for a few years so I can help with most questions once you get started.
-Ner
|
|

11-11-2002, 11:54 AM
|
 |
Junior Contributor
|
|
Join Date: Sep 2002
Location: Inside your head
|
|
|
|
What about using VBScript? I tihnk its used th same way as java. Well anyway I know there is something for VB you can use in websites. o.O
|
__________________
Why is there war, famine and poverty in the world? Here's my answer: Ŋ\(°_o)/Ŋ
Yes, I made my own avatar. And no, I'm not going to make one for you.... sorry.
|

11-11-2002, 12:58 PM
|
|
|
Why not use ActiveX? Create a new project in VB, ActiveX, then copy all the code and controls into the activex project, then you have to do some more thinks, I donīt know exactly but something like this:
1. You have to register it, itīs somewhere in VBīs menus
2. You have to make a .OCX file from the ActiveX, this cannot be done in vb, microsoft has developed a small programmed called Xpad or something (canīt remember)...
search in google for something like: +activex +vb +create
|
|

11-11-2002, 01:26 PM
|
|
|
You can write VBScript on the server or the client (client must be IE). While the syntax is mostly the same as VB6, there are some major differences. First, there's no access to API's - no DirectX, no BitBlt, etc. For that you'll need a custom control (either your own, or one from some place like Wild Tangent) which means hosting a control which means IE
As for creating an OCX, VB can do that no problem - no extra tools required. Just pick an "ActiveX Control" type for your project and that's the default. Otherwise you can change it through project properties. As I said above, you'll have to require IE as the browser if you want to go this route (Netscape 6 or 7 may support this, but I'd bet they work differently than in IE).
If you go the ActiveX route, you can test from VB as well. You'll have to set up a website with one page (you can use the personal website thing free from MS and for most OS's). Then in your VB project go to the properties of the project, Debugging tab and specify "Start Browser with URL" and point to your test page. The page will have to have the OBJECT tag with the approprate code to point to your control. I haven't done this for ages so you'll have to search Google for help with that last part
If you want your game in a browser hoping that multiplayer will be easier, it won't be. There's nothing built-in that will allow you to see who else is connected (connected to what?) and how to join existing games, etc.
Good luck!
-Nerseus
|
|

11-11-2002, 09:56 PM
|
|
|
I've attached the game I want to put online, it is pretty simple. Doesn't contain anything really fancy.
Please look at it and advise on the best way to put it online.
It's not a multiplayer game, so thats not the reason I want it online. I just want people to be able to compete for the highscore online and I don't really want a solution where they have to download the game and it just checks the highscore via the web.
|
|

11-11-2002, 11:27 PM
|
|
|
Well, of all the games you could have chosen, this is a relatively easy one. For ease of use, you'd do best to code it in client-side VBScript and VML (just my suggestion). The VML isn't too hard, but might take a bit of practice. You could always go with the ActiveX control, but you'll have the issues I mentioned before.
Be aware that coding in VBScript for the client will require IE - Netscape won't work, it only understand javascript on the client.
As for posting your high scores, you could always Post the page with a simple form and the player's score. Not much in the way of security but it would be simple enough to do
Good Luck!!
- Nerseus
|
|

11-12-2002, 01:04 PM
|
|
Senior Contributor
Retired Leader * Expert *
|
|
Join Date: Sep 2002
Location: Israel
|
|
Hey schuel, I'm glad to see your moving forward with your game (putting it online). One thing though, I downloaded the file here and noticed the bug you had a couple of days ago was still there. Did you forget to fix it?
|
__________________
Have you tried looking right in front of you (or at least in MSDN)?
|

11-13-2002, 12:08 AM
|
|
|
Hey shmoove, I fixed the bug but I must have forgetton to update the zip, oops!
|
|

11-13-2002, 03:05 AM
|
|
|
Ok, so it seems VBScript and VML is the way to go, but to tell the truth I have no idea how to go about any of this. I'm just a begginer with VB let alone all this other stuff.
What are the steps I need to take to do this?
Where do I start?
|
|

11-13-2002, 09:44 AM
|
|
|
If you don't care about saving high scores or anything like that, you can actually code this in HTML (using VBScript on the client).
I'd take a look at tutorials on VML. I have a book on it but haven't touched it for about 2 years. Your best bet is to Google search for "vml tutorial" or something similar.
Once you get that down, you can search for how to trap the keydown globally. Take a look at MSDN for help on VBScript on the web.
Those should be the two hardest parts - the input and graphics. After that, you'll have to convert your code to use Variants (the only datatype in VBScript). I haven't seen your code, but if you're using Classes, they're not available in VBScript. You can break your code into modules if you want and load them as linked files, but they'll all be loaded as if they were from one big file. In the beginning, I'd say put all the code into one HTML file. You can always break it out later if you want.
Good luck!
-nerseus
|
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
| |
|