Archived

This topic is now archived and is closed to further replies.

Using c++//C#//VB.net?

This topic is 5375 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Well, I guess I need some introduction (/me is kinda new here). I''m a 24 yr old programmer who wants to check out game programming. After 10 years of basic, and vb programming I''d like to switch to the C languages. I was working as a trainer in VB 6.0 in a Belgian training center, switched jobs and finding myself with loads of spare time :D. With the recent developments in the .net platform I''d like to know what you all think about using C# or VB.net as a game development platform. When learning a bit vb.net I realised C# isn''t that much of a diffrence, and I could cover it whole in a few months. So I tought why not switch to C# and leave that limited VB behind? If I want to try out some game development, and don''t want to be limited by the language I use, what should I learn best? Stick to C++ (wich would take more then 12 months to get the same experience as I have in VB6), like most of you guys, try out C#(Wich will take 6 months or so) or use VB.net (wich I can learn in a few weeks)? note: I completely master VB6 (including COM, ActiveX, ADO, n-tier programming, ..). I''ve allready created a tetris and a pac-man in VB6, but I gave up programming games in it since it doesn''t support (web)services, wich is needed to make something massive multiplayer.

Share this post


Link to post
Share on other sites
Well, it's your choice when it comes to languages. Do you want to learn a new language? You mention not wanting to be restricted by the language. Well, you'll already know VB's limitations (no pointers, etc.), but C/C++ has none of these problems, so that might be a good place to start. Your code will be more efficent in C/C++, as you can use little shortcuts which VB doesn't have because of it's "learner language" start in life.

The thing is, you'll need to learn an API to do any game programming, so you'll have to choose OpenGL or DirectX. The Windows GDI might be good for card games, but it simply won't cut it when it comes to 3D and more advanced 2D graphics. With your COM background, DirectX might be a good choice, but OpenGL's excellent too. I use OpenGL in VB6 and C (check out DarkVertex in my sig; it's a 3D map editor written in VB6 using OpenGL), but both OpenGL and DirectX can be used in VB6, VB.net, C/C++ and C#.

To use OpenGL or DirectX in VB6/VB.net, you'll need to start a Standard EXE, then click Project->References, and load the appropriate type library. You'll need to get the VB type library (search for vbogl.tlb in Google) if you want to use that, but I believe the DirectX API type libraries come with VB6.

However, most books on APIs will be focused on C. All the books I've read on OpenGL and DirectX use C/C++ for the examples; C/C++ is the current industry standard, and used to write 80% of games. If you want to find examples of VB6 OpenGL programming, you can visit NeHe's Tutorial Site, when contains about 36 excellent OpenGL tutorials, initially written in C, but converted to VB and other languages by fans of the site. Hope everything I've said helps, post back if you need more info on OpenGL in VB (if you choose the OpenGL path) ...



Coding Stuff ->  [ iNsAn1tY Games | DarkVertex | How To Do CSG | Direct3D Vs. OpenGL | Google ]
Fun Stuff    ->  [ Evil T-Shirts | Stick-Based Comedy | You're Already Here | The Best Film Reviews ]


[edited by - iNsAn1tY on March 25, 2003 6:06:44 PM]

Share this post


Link to post
Share on other sites
If you are trained in vb and want to write for the .net platform (and you *will* write for the .net platform if you use c#), then why don''t stick to VB.net?

In .net the programming language is mostly a choice of taste. C# has some features that VB does not (unsafe code-blocks e.g.), but after all, both produce IL-code.

I''ve been told that VB.net is a bit different from VB in some ways (I only use C#), however it could be more efficient for you to stay with VB.net.

Just my 0.02€

- Andre

Share this post


Link to post
Share on other sites
Well, first of all I won''t stick to VB6 since it hasn''t got the stuff to write services ect ..

I''ve gone trough all the changes in VB .. starting from VB4 it was a big step learning all the new stuff in VB5. It took mee quite a few weeks. Moving forward to version 6 it wasn''t that big of a deal, just reading a book and that was it.

But, with the introduction of .net vb has become a whole new language. It will take a sh*tload of time to learn it, so I tought .. Why don''t I try C#?

One more thing, the mono project (http://www.go-mono.com/) is developing a .net parser for *nix systems, but it will only support C# .. (But what will Corel do??? Make .net platform independand, including VB.net?)

Share this post


Link to post
Share on other sites
Well, after reading some more articles on VB.NET vs C# vs C++ I''ve come to a conclusion.

- In general C# and VB.net generate the same optimized code and have the same possiblilities. Game specific the fps-rate from vb.net code and C# should be the same.

- vb.net allows you do finish your projects faster, it uses less lines of code.

- C# was made purely for C/C++ users who want to switch to .net, new programmers should learn vb.net

- There are games being developed in vb.net wich look very nice!
(check out http://www.3dlevel.com ! It even contains the vb.net source of a finished 2D racing game!!! There are also vb.net 3D game projects being finished)

- I guess vb.net has got something to proove, and defenatly got a BIG potential in game development.

Conclusion: I guess I''ll start reading my vb.net book whom is laying around here for a couple of months :D

Share this post


Link to post
Share on other sites
I''m doing similar to MrOzzy, namely moving from VB6 to a .Net RAD language.

However, I''ve decided that maybe C# is the better language to learn first - you''ll get more benefits from that than VB.Net plus the advantage (knowing VB6) that ''downgrading'' to VB from C# should be a heck of a lot simpler to moving from VB.Net to C#.

But you''re right in the sense that the performance difference between the two is not worth worrying about.

Regards

Share this post


Link to post
Share on other sites
quote:
Original post by MrOzzy
- vb.net allows you do finish your projects faster, it uses less lines of code.


The LOC count should be about the same in VB.NET and C#, with minor concessions to some legacy utility functions available to VB users(you should avoid these anyway).
quote:

- C# was made purely for C/C++ users who want to switch to .net, new programmers should learn vb.net


VB.NET was made purely for VB6 users who want to switch to .NET - new programmers should learn C#.



"If there is a God, he is a malign thug."
-- Mark Twain

Share this post


Link to post
Share on other sites
quote:
Original post by Shag
I'm doing similar to MrOzzy, namely moving from VB6 to a .Net RAD language.

However, I've decided that maybe C# is the better language to learn first - you'll get more benefits from that than VB.Net plus the advantage (knowing VB6) that 'downgrading' to VB from C# should be a heck of a lot simpler to moving from VB.Net to C#.

But you're right in the sense that the performance difference between the two is not worth worrying about.

Regards


Actually converting from VB .Net to C# should be easier that the other way around - since overall C# has a couple more features than VB (basically pointers and unsafe areas), translation from C# to VB may imply more changes than the other way around (which should be a matter of directly translating the syntax)

My take on the C# versus VB from a VB6 programmer perspective: I do think you should start with vb - it has changed significantly, but the syntax should still be more familiar to you, and the IDE holds your hand a lot more than C#'s meaning that I think that geting into VB .Net should still be quite faster than to get into C# - and in the end, if you still want to change to C# later on, what you learn on VB .Net will still hold in C# - in that direction it pretty much really is only a change of syntax.

You know, I never wanted to be a programmer...

Alexandre Moura

[edited by - alexmoura on March 25, 2003 11:19:15 PM]

Share this post


Link to post
Share on other sites
quote:
Original post by Arild Fines

VB.NET was made purely for VB6 users who want to switch to .NET - new programmers should learn C#.



Well, not according to Microsoft :D



[edited by - MrOzzy on March 26, 2003 4:50:58 AM]

Share this post


Link to post
Share on other sites
Hmm, well I was expecting this one :D. I''ve gotten it from a newsgroup on http://www.dotnet247.com, been seaching for that post haven''t found it back. But one thing is fo sure C# is only designed because MS wanted to give C/C++ programmers access to the .Net framework but thier main goal is to make one single language based on VB, not C. So, thier advise is that new programmers better learn VB.net, not C#.

note: The post that I read it in was from one of the members of the MS Development team. I''ll post it here when I find it back.

Share this post


Link to post
Share on other sites
quote:
So, thier advise is that new programmers better learn VB.net, not C#.


Wrong. Simply and plainly wrong.


Regards

Thomas Tomiczek
THONA Consulting Ltd.
(Microsoft MVP C#/.NET)

Share this post


Link to post
Share on other sites
quote:
Original post by MrOzzy
But one thing is fo sure C# is only designed because MS wanted to give C/C++ programmers access to the .Net framework but thier main goal is to make one single language based on VB, not C.

So is this.



"If there is a God, he is a malign thug."
-- Mark Twain

Share this post


Link to post
Share on other sites