Archived

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

gilfosh

sick of vb

Recommended Posts

gilfosh    122
Hello, I have been making games with VB6 for about 10 years now with DirectX and such; I can''t make the move to C++. I know I should buy some books and stuff but I have no budget for that. Please tell me how I could learn VC++ and DirectX easily so that I can finally use C++ instead of VB to make games.. any good tutorials or sites out there?

Share this post


Link to post
Share on other sites
dave    2187
The best thing to do mate is goto msdn.microsoft.com and have a look there.

It offers a tutorial from displaying a basic D3D ready window up to a moving textured mesh. thats where i began and im currently writing a simple graphics engine.


The exact link to the tutorial is below.

http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/dx8_c/directx_cpp/graphics_using_754j.asp

Have a gander there, if you want further help mate

ace_lovegrove@hotmail.com

msn or email me

Take care

Share this post


Link to post
Share on other sites
Xai    1838
from VB you might choose to try C# first ... it''s a lot simplified over C++.

I personally think C++ is the most powerful general purpose language there is right now, but C# is a good step between VB and C++. It has most of the power and features of other common langauges like Java, and has much cleaner syntax in many areas than C++, and many less tricky things to remember (because Standard C++ is built on top of early C++, on top of Standard C, on top of early C - there is some crude that is less than ideal in it) ...

Another great thing about C# (if you are wanting to program .NET) is that A) the basic tools for development are included free inside the .NET SDK ... so people who can''t afford to upgrade to Visual Studio 2003 can still program C#. And also, the CodeDOM which allows you to compile code at runtime, is built into .NET runtime ... so you can use C# as a scripting language too ... pretty cool.

If you aren''t going .NET development, then only Java and C++ are real alternatives ... Java is very like C# in that it is tied to one platform (the Java platform - which runs on all major platforms, but makes them look like each other) and is a Simplified C++, in fact Java and C# are almost exactly the same. C++ on the other had is cross platform, and truely usefull for ANY type of programming, from apps and games, to systems programming, device drivers, anything ... AND IT HAS TEMPLATES (my favorite thing).

Share this post


Link to post
Share on other sites
Themonkster    159
if you now how to use the windows api from vb then I doubt your have much of a problem with windows c++.

I think you do a search for some online courses some are free

Share this post


Link to post
Share on other sites
gilfosh    122
the problem with .net is that it has lots of baggage. users have to download the framework which is a large file. I have been coding in vb.net for a year now and yes, the language is very easy and powerful but its just too slow and has too much weight to it. I won''t be coding in .net too much, i dont like it. The reason i want to finally learn vc++ is that its the fastest, cheapest, most reliable, and most universal language for windows, especially for game writing.

Share this post


Link to post
Share on other sites
Xai    1838
I totally agree, it''s just that your late to the party ... cause the next big version of windows (Longhorn), will expose the current Windows API, plus a .NET interface for every system feature (currently .NET still has to use COM and Win32 API calls for many core features) - and the version after that will no longer support the Win32 API at all. Also, Microsoft is now considering .NET their primary focus for all development, and so things are added to and fixed in C# with higher priority than C++ ... this trend will likely only get worse ...

Now, of course they aren''t even considering dropping C++ support, just trying to shove MANAGED C++ down our throats ...

But C++ is still the idea place to be, and be going for cross-platform sitautions.

Unfortunatly, by the time you learn C++ well enough to get into the intricate working of the awesome template system, .NET will have its own brand of generics ... which will mean A) C++ will not be as far ahead of C# as it currently is, and B) C++ programmers will have to know BOTH systems, to write good C++, and to use the .NET components others distribute.

Share this post


Link to post
Share on other sites
alnite    3436
quote:
Original post by gilfosh
Please tell me how I could learn VC++ and DirectX easily so that I can finally use C++ instead of VB to make games.. any good tutorials or sites out there?
I am afraid there is no shortcut in transitioning from VB to C++. You have been using GUI all the time in VB. However if you want to learn C++ you must revert back to the old "Hello World" text mode to learn the syntax first. When you learn the GUI, the nasty Win32 API will make your head spinning. Once you get used to Win32 API, then you can start using DirectX. Quite a journey there.

Share this post


Link to post
Share on other sites
There is not shortcut from vb to c++. If you are truly interested, go out there and but some books on Visual
C++, C++, and definetly look for books by Bjarne Stroustrap.
He is the creator of c++. Be prepared to invest 50+ hours
just learning basics of the language if you are truly dedicated to reaping the languages rewards...

Sagar Indurkhya (SIndurkya@yahoo.com)

Share this post


Link to post
Share on other sites
You only need a bare-bones knowledge of Win32 API to get DirectX running, and most game programming books tell you what to do in that instance (Although he doesn''t have the budget for books...). I would recommend getting started with the FREE book I provided above (that should keep you busy for a little while, and you''ll have to read it or something similar to be able to switch to C++), and try to save up some money to get Programming Role Playing Games in DirectX or some other DirectX teaching book. For example, if you want to buy UT2k4, or half-life 2, or some other game: Don''t. Save the money and buy a book, they cost about the same.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster   
Guest Anonymous Poster
Hi there,

I was in your position about a month ago - and I have made the jump. Everything is about 10X as complex, but it is worth it as now I am using DX9, Effect files etc which I could not use in VB. However C++, takes a while to get used to (fortunatly I have had to learn C for my uni course), but it is well worth it in the end.

Good Luck and I hope you make the jump!

Share this post


Link to post
Share on other sites
gilfosh    122
thank you...

although I really wanted lots of links to tutorials, I got a lot of help anyway. Since I''ll have to send about $200 on programming books now (God help me, somehow I''ll find the money!), I''ll look around for some free books and courses. In the mean time, I''ll keep learning the .net interface and probably will turn to C# if not C++. so if i want to learn c++ from the ground up would visual c++ or Borland''s C++ builder be better?

Share this post


Link to post
Share on other sites
Mike737    122
quote:
Original post by Unsuspected
don''t forget that the internet is just full of resources and tutorials.


I grabbed a whole tonne of the NeHe tutorials off the net and printed all out and put them in a binder... thats just one way of purchasing a game dev "book" without purchasing one.

Hmmm... I think I should really go and patent that idea right now! I could make like a fortune*. I think I''ll do it now!


*Note: fortune includes the number 0

----
Mike
Portfolio: Http://members.iinet.net.au/~slyons
Team AI: Http://members.iinet.net.au/~slyons/teamai

Share this post


Link to post
Share on other sites
Fidelio66    164
quote:
I am afraid there is no shortcut in transitioning from VB to C++. You have been using GUI all the time in VB.


Sure there is, it''s called Delphi. Supports both the highlevel way of working with forms, application.run, button.onclick() handlers, etc, but can also be used to program straight win32 with a peekmessage/processmessage loop and doing everything manually. Another advantage is that because a lot is so similar to .NET (TList vs arraylist, properties in classes, the forms framework that while you are learning you are also learning the .NET way without even realizing it. Delphi even does console apps with writeln()
For C++ programmers C# might feel a bit strange, for Delphi programmers it''s so much similar that they will just go ahead and code.

Share this post


Link to post
Share on other sites
alnite    3436
quote:
Original post by Fidelio66
Sure there is, it''s called Delphi. Supports both the highlevel way of working with forms, application.run, button.onclick() handlers, etc, but can also be used to program straight win32 with a peekmessage/processmessage loop and doing everything manually. Another advantage is that because a lot is so similar to .NET (TList vs arraylist, properties in classes, the forms framework that while you are learning you are also learning the .NET way without even realizing it. Delphi even does console apps with writeln()
For C++ programmers C# might feel a bit strange, for Delphi programmers it''s so much similar that they will just go ahead and code.
Not sure what you are talking about there. AFAIK Delphi syntax is like Pascal (Delphi to Pascal is like VB to BASIC). And Pascal syntax is different than C/C++ syntax.

C# syntax is a lot closer to C++ than Delphi. And it can do both text-mode and GUI too.

@gilfosh
I do not recommend using Visual C++ for learning C++. That IDE is meant for project development. You need a bunch of project files just to compile a simple "Hello World" program. Everytime you compile a program, you will end up with these 10+ files that are only meaningful to Visual C++, not you. I haven''t tried Borland C++ Builder personally, but from what I have heard, it''s a lot simpler.

Share this post


Link to post
Share on other sites
NickB    146
Hmmm, to start with if all you wanted to do were 1 file (+ header) projects I suppose you could get away with using something like:

  • SCiTE (part of the scintilla project - d/l the win 32 binaries! - it allows editing of many languages (even fortran...which has saved my line in the past!))

  • TextPad - my brother uses this with GCC when he has to do programming classes at his uni (not a CS course tho...)

or some such colouring editor to edit with, then you can set these tools up to run an external compiler, such as
  • GCC

  • MinGW

  • Open Watcom ( link - www.openwatcom.org )

  • The Borland tool set (BC5 - already mentioned)

  • Or even, download the MS Platform SDK - apparently that includes cl.exe (the MS C++ compiler - the non-optimising version though) (+presumably a linker?)

Alternativelly, if you want a free & fully featured IDE you could do worse than to try one of these:

  • Bloodshed DevC++ (IIRC it has MinGW packed with it)

  • Eclipse (with the C++ plugin - but you''ll need to d/l a compiler - say from the list above)

Mentioning Eclipse reminded me that no-one seems to have mentioned Java, which has C++ like syntax & a relativelly easy to program GUI api - you might want to consider it (the dev tools are again free + use Eclipse for an IDE)

I''d forgotten there are so many high profile & free dev tools!

(whilst I''m at it, an honorable mention to "lcc-win32" - it comes with an IDE, but it is a pure C (rather than C++) compiler - but I quite like it for some things)

Share this post


Link to post
Share on other sites
SKREAMZ    108
well i learnt c++ from this site http://www.cprogramming.com/ if u ask my i found it to be fantastic it has tutorials on c++, opengl, AI, 3d maths and alot of other stuff like c++ quizes, and it also has a list of compilers which you can buy or download for free.


omg this sounds like an advert, well i hope you find it to be of use.

Share this post


Link to post
Share on other sites
Oculus_Malus    123
Delphi is about the same thing as C++, only cleaner (less specials char, more textual terms, well structured) wich make it easier to learn and debug. It use the same end compiler than bc++ so the code is just as fast. With a minimum knowledge of delphi you can translate any code (c, c++ java) to it so anything from the win32 api to opengl and directx works exactly the same way.





--- At The Edge Of Time

Share this post


Link to post
Share on other sites
markr    1692
Everyone else in this thread has been suggesting programming languages.

The problem I find with VB users, is that they don''t really understand how programs actually happen at all.

Lots of VB6 users seem to think that programs consist of "Forms" which you drag things called "Controls" into.

Whereas in fact, real programmers know that this is not really the case. What happens is, the VB6 runtime arranges things so that the programmer (or VB6 user anyway) gets roughly what they expect based on the contents of the "Forms" and "Controls", by taking control of the actual execution of the program.

It comes as a shock to most VB6 programmers that you can make a program with no form, no controls, which starts at the beginning and continues to run until it reaches the end.

This tends to be the metaphor used in imperitave programming languages like most of the above cited.

VB6 tends really towards a 4GL-style event driven system, whereas most of the above behave more "traditionally" like an imperitive language (i.e. Pascal).

Possible exception: scheme, which I know little about but may be a bit like Lisp, i.e. a partially functional language where execution order is determined by how the interpreter chooses to evaluate things.

Mark

Share this post


Link to post
Share on other sites
Manip    156
That’s a very poor generalisation. Some, new VB programmers might think that way but I think your find a lot that are actually very knowledgeable and even have CS degrees. In my experience, MOST vb programmers understand completely about how programs are constructed and yet still choose to use VB. Making visual applications in C++ is a pain in the ass, to say the least. They tend to look ugly or simple, or both. Although writing on this level gives the programmer full control, they rarely are able to use that effectively.

MFC is poor. That’s all I can say... it is not designed very well. A better solution to visual application development is C++ Builder.

Visual Basic offers a simple, quick method to implement or prototype application projects. It hides the inner workings of applications, but does not remove the programmer from their programs. A Visual program written in visual basic still uses a lot of the same features as a VC++ application. Branches, loops etc etc. You can implement a binary tree in Visual Basic easily enough. And you might be shocked to learn that after the visual layer it is a full programming language! Shocking isn't it! It’s called Basic, and is very powerful. A lot of people don't like VB because they feel they have moved higher and therefore have the right to reticule those below them. This is particularly true about Java programmers, C++ ones aren’t that bad.. But that might be because they are often more mature.

Your statement would be true if Visual Basic did not contain any programming language at all, but it does. People say that VB does not teach basic programming skills. But that’s not true either. C and Basic are actually very very similar in language features at the upper most levels. But C goes lower (duh!). But I think your find that most business and a lot of other applications don't even need these features and could have been written in basic. I would also like to address something someone said. They said 'you can always spot a visual basic programmer who has moved to C because they always use the goto' (or something to that effect). But wait, doesn't C contain the goto statement? Don't other languages? Oh they do?! Wow... What you should have said is "You can always spot a poor programmer by how many goto's they use". I write for visual basic and NEVER EVER use goto's. I also don't use error control until I roll out the final version. Only a poor programmer thinks error control should fix all the stuff that is broken. Poor Programmer != VB Programmer

Strong Points:
- Very Good Debugger (The step though debugging process is very effective)
- Very Easy to read (Basic is nice because you don't end up with things like } } } )
- Very Fast Development times
- Strong Error Control
- Powerful interface


[edited by - Manip on March 26, 2004 7:36:34 AM]

Share this post


Link to post
Share on other sites
flangazor    516
quote:
Possible exception: scheme, which I know little about but may be a bit like Lisp, i.e. a partially functional language where execution order is determined by how the interpreter chooses to evaluate things.
Scheme will act like a procedural language if you like. You can have the code:

(print "hello world!")
(print "This is scheme.")
(if (eq? 1 4)
(print "1 and 4 are equal")
(print "i and 4 are not equal"))

Which will print out a predictable set of strings.

However, if you are using the mred gui toolkit, you can have something like:

;; Create a dialog
(define dialog (instantiate dialog% ("Example")))
;; Add a text field to the dialog (with a dummy callback procedure)
(instantiate text-field% ("Your name" dialog void))
;; Note: MzScheme’s void procedure accepts any number of arguments
;; Add a horizontal panel to the dialog, with centering for buttons
(define panel (instantiate horizontal-panel% (dialog) (alignment ’(center center))))
;; Add Cancel and Ok buttons to the horizontal panel
(instantiate button% ("Cancel" panel void))
(instantiate button% ("Ok" panel (lambda (button event) (print "Ok clicked.")))
;; Show the dialog
(send dialog show #t)


This seems more event based like Tk, Qt, or Awt. The places where you see void or lambda here are the event handlers.

Share this post


Link to post
Share on other sites