Page 1 of 2

Classes starting, anything I should know?

Posted: Wed Aug 25, 2010 10:35 pm
by zNelson24
I've been coding what I could in C#, and all I've could come up with is one game and a bunch of half-assed crud. This semester I'm going to be in an Intro to Programming class, which teaches Visual Basic.

Is there anything I should now about the transition from (some) C# to Basic? Also, does anybody know of any game development libraries out there for Visual Basic to use down the road? Thanks!

Re: Classes starting, anything I should know?

Posted: Wed Aug 25, 2010 11:35 pm
by krilik
Visual Basic syntax is easier. The class will probably give you a better understanding of programming if you are just starting out.

The only APIs for developing games with VB, as far as I know, are Win32's API, DirectX, and technically you can use XNA but its unofficially supported and you can't compile Xbox 360 games.

Honestly, just use that class as a way to learn basic programming concepts more than anything. Since you are already using C# (and I assume XNA), it would be a better route to stick with it in terms of game development.

Re: Classes starting, anything I should know?

Posted: Wed Aug 25, 2010 11:52 pm
by mattheweston
Also from what I have learned in my career as of late, C# is prefered to VB.NET for ASP.NET web development.

Re: Classes starting, anything I should know?

Posted: Thu Aug 26, 2010 1:32 am
by zNelson24
Thanks! I've been wanting to make XNA games, but I can put that on hold (to be honest, I was one of those idiots who 'started' developing games before getting into programming). I got the book the school is using, and I'm already reading through it.

Re: Classes starting, anything I should know?

Posted: Thu Aug 26, 2010 2:59 am
by EccentricDuck
Right on, reading ahead should definitely help. I'm in a similar boat to you. I maybe started with a bit more programming - I was inspired to learn and started out with Python before being lured into C# and XNA by a friend of mine, but I definitely jumped into XNA before I had a full grounding in C#. Part way through learning how to use XNA I went back to better learn C#. I'm still learning some aspects of the language (most recently: event-driven programming and delegates).

I'd be most interested in utilizing Visual Basic for making an editor or user interface for the purposes of development. Beyond XNA though I'm sure there are several areas where the two of them could be beneficial. It's been a long time since I used VB, but I remember it being good for making little GUI apps. I wonder if you could make an app with a C# back end and a VB front end.

I'll be going back to school this fall as well. My first class will be in Java programming (oh joy). Shouldn't be too hard since it's based on the same sort of JIT compiler concept as C# and from what I understand there's a lot of similarities between the two, but I don't really have a burning desire to learn Java (the one reason might be to somehow get involved with Minecraft). I was hoping that it would be something like Python or C++. I'd rather go for a scripting language or something more low-level than another language at exactly the same level as what I'm already using.

I'm going to keep trying to do what I can with XNA during the semester, but we'll see how much time I have. Maybe I'll find myself accidently writing out Java in Visual Studio ;) Good luck this fall!

Re: Classes starting, anything I should know?

Posted: Thu Aug 26, 2010 7:49 am
by mattheweston
Actually, I believe you could use a VB front end with a C# backend; however, I don't know what the point would be. I believe C# has just about everything that VB has as far as winforms and gui stuff.

Once you get a little more programming knowledge under your belt, take a look at how to incorporate XNA into a winform. =) Then you can run your game from within a window form and create a really good editor for your games.

XNA is a great tool; however, I would recommend learning game programming at lower levels once you get further along in your studies. Once you learn what is going on behind all your code in XNA learning the lower level stuff will assist you in being able to optimize your code.

Re: Classes starting, anything I should know?

Posted: Thu Aug 26, 2010 9:28 am
by dandymcgee
mattheweston wrote:Actually, I believe you could use a VB front end with a C# backend; however, I don't know what the point would be. I believe C# has just about everything that VB has as far as winforms and gui stuff.
Yes, it does. Considering they're both Microsoft languages using the same IDE, the GUIs in C# and VB look identical. With that said I much prefer C# over VB, as the last time I used VB I wanted to shoot myself whereas C# was a rather pleasant experience. C# and VB programs are both translated into Microsoft's Common Intermediate Language (CIL) before being compiled to machine code. Theoretically, anything you can create in C# could be duplicated exactly in VB. The difference is the ease with which the program could be written.
krilik wrote:Visual Basic syntax is easier.
I do agree this to be true for someone who has never touched programming before. C# books have a HORRIBLE habit of introducing classes (C# is extremely Object-Oriented, everything is a class), before things like simple conditional statements and arrays. While it is necessary to have a basic understanding of classes as soon as you can when using C#, I still believe fundamental programming concepts deserve a much higher priority on any "Intro to Programming" class's agenda.
krilik wrote: Honestly, just use that class as a way to learn basic programming concepts more than anything. Since you are already using C# (and I assume XNA), it would be a better route to stick with it in terms of game development.
I especially agree with this statement. Use the experience to help you understand the underlying theories, then apply those theories to your own projects in C#.

Side Note: Wow, .NET introduced Classes and Structures to VB. When I used VB it was 6.0 and the keyword for a struct was "Type". I took me two years to discover that the concept even existed in VB due to the ridiculous keyword selection.

Re: Classes starting, anything I should know?

Posted: Thu Aug 26, 2010 9:51 am
by avansc
I know C# has some form of pointers(something about unsafe hoohaa), i dont know if they are 1 to 1, but VB does have em. just as a little wrench in the mix.

Re: Classes starting, anything I should know?

Posted: Thu Aug 26, 2010 1:45 pm
by Falco Girgis
Nothing. Intro to anything programming classes are fucking jokes. If you know what a variable is, you are ahead of the curve.

Re: Classes starting, anything I should know?

Posted: Thu Aug 26, 2010 3:13 pm
by M_D_K
GyroVorbis wrote:Nothing. Intro to anything programming classes are fucking jokes. If you know what a variable is, you are ahead of the curve.
Dude I hate intro to programming classes, I especially hate how they're mandatory.

Re: Classes starting, anything I should know?

Posted: Thu Aug 26, 2010 4:47 pm
by GroundUpEngine
GyroVorbis wrote:Nothing. Intro to anything programming classes are fucking jokes. If you know what a variable is, you are ahead of the curve.
wholeheartedly agreed

Re: Classes starting, anything I should know?

Posted: Thu Aug 26, 2010 6:09 pm
by XianForce
GroundUpEngine wrote:
GyroVorbis wrote:Nothing. Intro to anything programming classes are fucking jokes. If you know what a variable is, you are ahead of the curve.
wholeheartedly agreed
Yeah, I took a couple of online programming courses from a local university (sadly the credits won't transfer though :/) and the only prerequisite was "Ability to power on a computer"...

Re: Classes starting, anything I should know?

Posted: Fri Aug 27, 2010 12:18 am
by EccentricDuck
avansc wrote:I know C# has some form of pointers(something about unsafe hoohaa), i dont know if they are 1 to 1, but VB does have em. just as a little wrench in the mix.
Yeah, C# uses something called delegates (which is exactly what I'm learning to use as mentioned above). It's basically a function pointer except that it implements type-safety. I couldn't explain exactly how it differs from the C/++ way of doing it, but it exists.
GyroVorbis wrote:Nothing. Intro to anything programming classes are fucking jokes. If you know what a variable is, you are ahead of the curve.
I've contacted my instructor over some stuff with course conflicts already (and seeing if I could get into the engineering programming class since I believe they work with either C or C++, but that was a no go) and it seems like I could totally go above and beyond what the rest of the class is doing and that he's helped other students to do that before. Looks like a big part of the class is based around programming a game in a simple 3D java engine that he wrote so that should be interesting. I still wish it was in another language, but it could definitely be worse. Maybe I'll learn something from seeing the differences between two different JIT languages.


The thing I'd be most interested in the OP's case is playing around with integrating different languages - even if something like winforms in C# is more practical than VB. I'd still think that it would be good practice and definitely worth the time if you can find an instructor that'll let you (and hopefully even help you) work with the two of them. It's funny that winforms should be mentioned - that's another thing that I just realized existed. XNA must have winforms integrated since that's already how it runs; probably so that it can have different implementations depending on whether you're creating a build for Windows or the Xbox. You still have full power over setting the resolution, full screen mode, etc (just that a new programmer doesn't need to worry about it off the bat) and you can create separate viewports for doing co-op play, creating a map in the HUD, or whatever else you'd want separate viewports for.

Re: Classes starting, anything I should know?

Posted: Fri Aug 27, 2010 5:12 pm
by MrDeathNote
EccentricDuck wrote:
avansc wrote:I know C# has some form of pointers(something about unsafe hoohaa), i dont know if they are 1 to 1, but VB does have em. just as a little wrench in the mix.
Yeah, C# uses something called delegates (which is exactly what I'm learning to use as mentioned above). It's basically a function pointer except that it implements type-safety. I couldn't explain exactly how it differs from the C/++ way of doing it, but it exists.
You are right about delegates being similar to function pointers but Avansc is right too, in c# you can use pointer syntax similar to c++ by declaring that class, function or variable as unsafe.

Re: Classes starting, anything I should know?

Posted: Fri Aug 27, 2010 8:14 pm
by Trask
Agreed with the 'intro to programming classes being a forced joke' thing, it would be nice if you could test out of it or something. Save money and time, hell if you're in the right school, you could fill that in with an elective to better round your skills or even introduce you to a new area of learning.

On the topic of VB, I never cared for it. I didn't like having the GUI editor, or whatever it's called, put code in there for me. It threw me off, but I'm weird like that. Being in IT, I do use/create VB scripts, so I do get to be reminded of its syntax from time to time.

Don't get too worried about programming languages, the syntax you'll learn by simply doing it again and again, use these 'basic' classes to learn about the concepts behind programming. You know the basics of Java and never plan to use it ever again outside of that class? That's fine, learn about OOP, use Java as a basis while you're in class. Switch to C++ when you're all grow'd up and you'll be a superstar. ;)