PDA

View Full Version : New to Programming



ShawnStovall
05-06-2006, 11:19 AM
I just got done ordering Microsoft Visual Basic 2005 and I was wondering what
language that Lightwave uses in its plug-ins. I want to know this so I can buy the appropriate training guide. Thanks for your help.:D

kruemel_1
05-06-2006, 11:36 AM
VB would be the wrong choice.
To start LScript is a good language. You don't have to care about the function of exports or callbacks or includes and can learn how LW works.
The LScript syntax is very familiar to every C programmer, so for compiled programs (.p files) C or C++ is a good choice.

ShawnStovall
05-06-2006, 11:42 AM
What program do you recommend?

Sensei
05-06-2006, 11:47 AM
You need C/C++ compiler.. LW developers usually use Microsoft Visual C++, but M$ has very bad optimizations in the latest cheap low-end compilers, so it might be better to buy older Visual C++ 7.0 or go for one of the top and expensive, if you don't care about money.. or Intel C/C++ compiler (it's 64 bit executable generation capable), it's $400-$500 if I recall correctly.. or Borland C/C++.. There is command-line only free full version, but it's ultra fast in compilation (because it's quite old compiler).. However not too good for not experienced programmer because you don't have real-life debugger..

ShawnStovall
05-06-2006, 11:53 AM
So what you are saying is that MSVB will work but it isn't that good?

colkai
05-06-2006, 11:55 AM
At the moment, MS are also providing VC Express as a free download, I got it myself and have successfully created a plugin from it.

Celshader
05-06-2006, 11:57 AM
Dan Maas wrote tips on how to compile plug-ins for LightWave using the free GCC (http://gcc.gnu.org/) compiler (scroll down to the bottom of this page):
http://mywebpages.comcast.net/erniew/lwsdk/docs/compile.html

lilrayray77
05-06-2006, 12:10 PM
You can use DevC++ which is an opensource compiler (http://www.bloodshed.net/devcpp.html). It has a shell and everyhting so you don't have to worry about meesing with a console.

ColinCohen
05-06-2006, 12:17 PM
So what you are saying is that MSVB will work but it isn't that good?

You cannot use Visual Basic with LW.

Either use C/C++ or Lscript.

kruemel_1
05-06-2006, 01:39 PM
VB is SLOW. At best 10 times slower than the worst C++ compiler on the market. So even if it is possible to write plugins with it - no advantages at all.
Visual C++ is a common IDE, most programs under Windows offering an API are at least tested with VC.
I personaly prefer Borland C++. It's framework allows writing of nearly all Window programs faster than VB with the advantage of C++. For starters the is a Personal edition for 70 EUR or so.
GCC is a free compiler for every operating system. And after some time with Emacs (a free programming editor) usefull if you want to write programs for different OS.

ShawnStovall
05-06-2006, 02:04 PM
So even if I write in C++ in Microsoft Visual Basic it still wont work?

loki74
05-06-2006, 02:27 PM
So even if I write in C++ in Microsoft Visual Basic it still wont work?

You can't just go and write C++ in VB.

VB is an IDE for the BASIC language, specifically, MS's variation of BASIC called Visual Basic. It will not recognize, run, compile, debug, what have you, anything other than VB.

ufo3d
05-06-2006, 02:43 PM
So even if I write in C++ in Microsoft Visual Basic it still wont work?

if C++ work in MSVB, why ppl need to buy MSVC++?
you should understand what you need before ordering any product, unless you bought VB for something else.

ShawnStovall
05-06-2006, 05:47 PM
I did. I have just recently gotten interested in programming and needed something to get me off the ground with.

ShawnStovall
05-06-2006, 05:55 PM
I just downloaded and registered VC. Thanks.:thumbsup:

Bog
05-06-2006, 06:13 PM
Wow. This thread is pretty impenetrable.

Shawn,

Most LW Plugins that I come across are written in C++. A lot of them are written in LSCript, LightWave's native scripting language.

Maybe if you told us what you want your plugin to do, we'd be able to help you a bit more. Feel free to PM me, I'm not a programmer myself, but I know greater than zero plugin coders who I could put you in touch with.

Hang in there, mate! It's a learning gradient, alright, but empirical evidence shows that the first one's the hardest.

ShawnStovall
05-08-2006, 03:40 PM
I just went back to cancel my order when I found out that I ordered Microsoft Visual Standard not Basic. I think their is a difference but I'm not sure, so please tell me if this works.

:o<Thanks>:D

Titus
05-08-2006, 03:54 PM
Actually the plugins you find included as examples with the SDK are written in plain C, not even C++. I have written some plugins using only the SDK, windows notepad and compiling with Visual C 6 in command line, nothing else.

You want to read the SDK documentation first, you'll find there some instructions on how to start programming with different C/C++ compilers. Then you need to read the rest of documentation and examples because there is no straight forward documentation or tutorials. Also as a help and source of knowledge is the LW plugin yahoo group, with very smart and helpful people.

ShawnStovall
05-08-2006, 04:15 PM
Is VS any different then VB?

darkChief
05-08-2006, 04:21 PM
Visual Studio has VB, C/C++, C#, J# and other scripting languages in one package. New to proramming, good link is http://www.princeton.edu/~ferguson/adw/programming_languages.shtml

ShawnStovall
05-08-2006, 04:42 PM
So will this work?

ShawnStovall
05-08-2006, 05:47 PM
So even if I write in C++ in Microsoft Visual Basic it still wont work?

I'm sorry, I misunderstood, I now know that MVB is a completely different language. I thought that it was the name of the program I bought.:o

colkai
05-09-2006, 02:50 AM
Aye, it can be a minefield to the new coder. :)

Even with C/C++ there are a myriad of options, each with their own "way" and not all of them are suitable for using with the SDK.

ShawnStovall
05-10-2006, 01:56 PM
I have also ordered a book that teaches C++.

RedBull
05-10-2006, 02:32 PM
Microsoft Visual Standard?
What the **** is Microsoft Visual Standard?

There is no such thing, perhaps before people give advice,
you should take the time, to specify exactly what you ordererd and what your after, as it's a little hard to know from what's written.

If you mean Microsoft Visual Studio?
Than it will most likely contain what you need.

If you mean Microsoft Visual Basic - Standard - than no, it's not going to help..

Just to confuse you all, There is a LW file requester written in VB,
that comes with LW, it's the only VB plugin for LW i've ever seen...
But i would not attempt nor wish to learn, an outdated, non used language.

Codeblocks and DevC++ are both free GNU based compiler/editor/debuggers (IDE) that support both C and C++ and can be downloaded for free..
There are also a couple of tutorials, written on how to set them up with LW SDK. You can download and use the MS Visual C, (free version) as mentioned already......

Visual Studio, sounds way too advanced for what you'll be needing in the near future. I'd be quite happy to use the GNU one's until you need more.

The LW SDK is C based, and so a C++ book, WON'T help you a lot, if you intend on programming in LW's C SDK....

Sounds like you really need to think about what you are trying to achieve, and for what reasons, before committing to anything...

Lightwolf
05-10-2006, 02:57 PM
Just to confuse you all, There is a LW file requester written in VB,
that comes with LW, it's the only VB plugin for LW i've ever seen...
But i would not attempt nor wish to learn, an outdated, non used language.

Actually, I doubt that it is written in VB, especially since it is not a plugin per se but part of the core.
I assume the VB name has a historical reason that has nothing to do with Visual Basic


Codeblocks and DevC++ are both free GNU based compiler/editor/debuggers (IDE) that support both C and C++ and can be downloaded for free..

I'd recommend the free MS Visual C++ Express 2005 whatever... a decent compiler, a decent IDE, easy enough to set-up. And it loads the LW9 SDK samples as well (just check out the LW9 preliminary SDK).

And yes, a book on C++ will do no good, hacking LW plugins in C++ requires a bit of C experience.
I'd recommend the "The C Programming Language" from Kernighan and Ritchie as a base and C reference. It might not be enough of a book that "teaches" for some though.

Cheers,
Mike

ShawnStovall
05-10-2006, 02:59 PM
LW isn't the only reson I want to learn to program.

RedBull
05-10-2006, 10:55 PM
Actually, I doubt that it is written in VB, especially since it is not a plugin per se but part of the core.
I assume the VB name has a historical reason that has nothing to do with Visual Basic
Cheers,
Mike

Ah yes, brain fart.... I thought i remembered a thread talking about it being VB, but it's not...

I just looked, it seems it just a C panels, Visual Browser, rather than the standard windows system browser.

NanoGator
05-18-2006, 07:44 AM
I'd personally recommend LScript, at least to get started.

Here's a brief list of pros and cons regarding LS:

Pros:
1. It can be 'compiled', meaning you don't have to give source code away.

2. Runs on both PC and Mac. That's why there's only one build of Maestro that runs on both.

3. VERY easy to test since it executes right inside of Layout/Modeler. (As I understand it, C isn't so forgiving...)

4. The vast majority of what you'd want to do (at least on a beginner level...) is right there in front of you.

5. If you master the LScript half of it, the C version is much easier to grapple with. They're very similar to each other. (I mean the architecture, not the syntax.)


Cons:
1. The C route has a broader set of capabilities. When you get to the more advanced stuff, LScript has its limitations.

2. LScript's documentation is NOT very centralized. They have documentation for a good portion of it, but you have to run around the LScript updates pages on Newtek's site to find the rest of it. (I don't know if the C plugin documentation is better or worse.) Fortunately, the LScript forums here are a good library of knowledge.

3. Learn to program in C and a bigger door is opened than if you learn to program in LScript. You can use the C syntax elsewhere. (Arguably C is easier to learn if you've done LScript or PHP programming.)

Personally, I think you should start with LScript. It may seem like a longer path, but I'd expect you to find it rewarding.

Good luck. :)

ShawnStovall
06-04-2006, 08:43 PM
I think I should now be set!

I have:

"Beginning Visual C++"

"Beginning Visual C#"

"Inside LightWave [8]"

Visual Studio Standard

A whole summer to learn and determination.


PLEASE!!! tell me I'm ready to start learn programming!

:chicken:

GregMalick
06-04-2006, 10:36 PM
Sounds like you are ready --- since you are so eager.

LightWolf gave some great advice...
Download the free Visual Studio Express 2005.
The sample LW SDK plugins come with project files that virtually compile & work immediately.

It's what I'm using at the moment.. I love it and you can't beat the price.

BTW - the LSW SDK samples are great.
They are all in C - but that's OK for someone learning the syntax.
1. Take a short one and study it.
2. Post some questions in the Developers forum.
3. Join the lw-plugin group on Yahoo.
4. Use search in these forums/groups to find answers.
5 Compile & debug one of the programs - of the type that interests you most.

Have at it!

:thumbsup:

ShawnStovall
06-05-2006, 05:36 PM
I already have all the things I mentioned in my last post. The books I'm reading require the full version of the software(not express). It is a HUGE field to enter but I think I can enter it smoothly is I start studying it now.


Thanks for the advice everyone!:D