1

I am developing a game in VB6 (plz don't ask me why :) ).
The storyboard is ready and a rough implementation is underway.

I am following a "pure-software-rendering" approach. (i.e. no DirectX, no openGL etc.)

Amongst many others, the following "serious" problems exist:

  • 2D alpha transparency reqd. to implement overlays.

  • Parallax implementation to give depth-of-field illusion.

  • Capturing mouse-scroll events globally (as in FPS-es; mapping them to changing weapon).

  • Async sound play with absolute "near-zero-lag".


Any ideas anyone. Please suggest any well documented library/ocx or sample-code.
Plz do suggest solutions with good performance and as little overhead as possible.

Also, anyone who has developed any games,
and would be open to sharing her/his code would be highly appreciated.
(any well-acknowledged VB games whose source-code i can study??)


UPDATE: Here is a screen shot of GearHead Garage.
This picture ought to describe what i was attempting in words above... :)

alt text
(source: softwarepod.com)

Glorfindel
  • 21,988
  • 13
  • 81
  • 109
TheCodeArtist
  • 21,479
  • 4
  • 69
  • 130
  • @Robusto Sorry if i sounded too rude in asking for help. But, anything U could suggest in solving these issues would be of great help... Thank you. – TheCodeArtist Apr 22 '10 at 12:49
  • I didn't think that was rude -- I thought that response was because you are asking for the world. – MJB Apr 22 '10 at 13:10
  • Won't threading be somewhat of a concern? – RobS Apr 22 '10 at 13:35
  • @ RobS I don't think (-read hope with my fingers crossed) so. The game is a single-player offline game, with no NPCs – TheCodeArtist Apr 22 '10 at 13:45
  • 1
    An alternative to fixing these issues would be to use XNA with VB.NET to minimize the amount of code you would have to rewrite. – CiscoIPPhone Apr 22 '10 at 15:33

5 Answers5

3

EGL25 by Erkan Sanli is a fast open source VB 6 renderer that can render, rotate, animate, etc. complex solid shapes made of thousands of polygons. Just Windows API calls – no DirectX, no OpenGL.

alt text
(source: vbmigration.com)

VBMigration.com chose EGL25 as a high-quality open-source VB6 project (to demonstrate their VB6 to VB.Net upgrade tool).

Despite that, and despite my opinion that VB6 is often criticised too harshly, I can't help thinking there must be better options for game development in 2010?

Glorfindel
  • 21,988
  • 13
  • 81
  • 109
MarkJ
  • 30,070
  • 5
  • 68
  • 111
2

You may want to check out the Game Programming Wiki -- it used to be "Lucky's VB Game Site" (and we're talking a LONG time ago) but all of the content (VB5/6 centric) moved to the Wiki with the addition of other languages.

It appears that much of the legacy VB6 content is still available on the site.

Nate
  • 30,286
  • 23
  • 113
  • 184
0

Have a look at DxIce : http://gamedev.digiapp.com/

zaf
  • 22,776
  • 12
  • 65
  • 95
0

I think you will find no well-acknowledged written games in VB6 for precisely the reasons you state above.

It was not designed to be a high performance language. For that you NEED to use the graphics libraries (DirectX, OpenGL) you said you didn't want to use unless you want to BitBLT everything yourself using API calls which is probably not going to get what you need.

VB6 is interpreted, outdated, and I'd be surprised if it runs on Windows 7.

I think you need to seriously re-evaluate the methodology here.

Jeremy
  • 4,808
  • 2
  • 21
  • 24
  • In my earlier attempts at game-dev in i had using wav and mid files embedded in the res & was able to get almost zero-lag audio effects. Also i have used bitblt and a crude parallax implemenatation in code while scrolling along one direction. Bitblitting is fine as a last resort for me. I am trying to save the time and effort and of meddling in the low-level code, if i can. I hav no idea to implement Capturing mouse-scroll events globally though... thanks for your concern – TheCodeArtist Apr 22 '10 at 13:43
  • VB6 is not interpreted, it is compiled to native code. It runs on Windows 7 - in fact it is fully supported by Microsoft on Windows 7. Still, I won't give you -1, because choosing VB6 to develop a 3D game is pretty odd, and I wouldn't do it myself. But people have done odd things - see my answer for an open source VB6 3D rendering engine http://stackoverflow.com/questions/2690656/vb6-game-development/2692088#2692088 – MarkJ Apr 22 '10 at 15:21
  • @MarkJ - are you sure it is "fully supported" by Microsoft? Or are you thinking of VB.Net? Everything I've read indicates that official VB6 support ended back in 2005. Also, VB6 can be interpreted or native-compiled according to developer choice so it's not a "is/is-not" so much as a "maybe/maybe-not". – GalacticCowboy Apr 22 '10 at 15:46
  • @MarkJ You were right, VB6 can be compiled to native code, but it does compile to P-Code by default. http://msdn.microsoft.com/en-us/library/aa240840(VS.60).aspx It also looks like MS will maintain an "it just works" philosophy on Win 7, but will not be officially supported. http://msdn.microsoft.com/en-us/vbrun/ms788708.aspx – Jeremy Apr 22 '10 at 16:46
  • @Jeremy If you read a bit further down: "The core Visual Basic 6.0 runtime will be supported for the full lifetime of... Windows 7". Like it says in this Stackoverflow answer from Feb 09 by, well, erm, cough, blush, me :) http://stackoverflow.com/questions/447007/will-windows-7-support-the-vb6-runtime/592740#592740 – MarkJ Apr 22 '10 at 16:55
  • @GalacticCowboy yes I am sure VB6 is supported, see the other comments which link to the official Microsoft statement. – MarkJ Apr 22 '10 at 16:57
0

For audio playback, I have used http://www.fmod.org/ in the past. This, and other libraries like BASS, are only free for non-commercial use. I also suggest avoiding the built-in multimedia playback object.

Wayne Renaud
  • 139
  • 3
  • 7