Wintermute Engine Forum

General Category => General Discussion => Topic started by: Jerrot on July 22, 2003, 10:08:30 AM

Title: Programming
Post by: Jerrot on July 22, 2003, 10:08:30 AM
Hi,

ok, I guess this is mainly a message to Mnemonic, but of course everyone is welcome. (Maybe there are also some secret readers here... ;) !)

I really want to start "real" coding again, but I don't understand a word on the Microsoft site, I don't find a good way to start off and I don't want to restrict myself too much by my choice.

Ok, so there are Visual Studio 6.0 - which I own - and there is VS.NET. Fine, maybe I should upgrade. Should I ?

".NET" always talks of C#, XML, Web Applications and that stuff... hey, I never asked for web applications and I've got no idea, what ATL, "managed C++" and all that stuff is. There are just too many new words explained by other new words. :)

Next problem: there are too many possibilities to choose to create applications. There is the Win32 API, there is MFC, there is DirectX and different Wrapper Classes, where I can't judge if they are good. Ok, the easiest way seems to be to create some MFC project, but I don't understand what the wizard creates and how I could change it. I guess I don't like MFC at all. ;) And thinking of XML surfaces/skins, it seems to be ridiculous anyway.

So here is what I want to learn and what I want to be able of some day/year:

...please... SHOW ME THE WAY!  ;D
I need GOOD tutorials and maybe hints for useful wrapper classes for GUI management etc.

Ohhh, I really miss the good old Amiga times ...

Thanks for any help !
Title: Re:Programming
Post by: Mnemonic on July 22, 2003, 11:58:19 AM
Ow, that's tough... I'll tell you my point of view, which is not neccesarily right and some might disagree with certain points.

Quote
Ok, so there are Visual Studio 6.0 - which I own - and there is VS.NET. Fine, maybe I should upgrade. Should I ?

Ok, now we're getting to the most important question at this moment: to .NET or not to .NET. If you are not going to use the .NET framework, there's no reason why to upgrade to VS.NET. Although there are some improvements to C++ and the MFC library, they are not significant enough to be worth buying VS.NET.

On the other hand, if you want to develop using .NET, you definitely should upgrade. There are 3rd party open source solutions for .NET (SharpDevelop), but VS.NET is soooo much better.

Now, what *is* the .NET framework everyone's talking about these days? .NET is Microsoft's ideao of the next generation development platform for the next decade (at least they say so now :-). It's basically a huge (and I mean *huge*) library of various functions, file IO, windows UI development, web development, XML, registry functions, cryptography, databse access... you name it. It's meant to be a way of wrapping all the diverse Windows' API's developed in years, all packed in one consistent object oriented library. Plus, like I said in another thread, it's meant to be a cross platform solution. The compiled .NET programs are platform independent, they are just interpreted by a certain platform's runtime.
.NET platform also provides several programming languages to use the library from, namely C#, Visual Basic.NET, JScript.NET and others. Now there are other 3rd party languages available for .NET, such as Delphi.
All those language use the features of the underlying .NET platform and use its types and features.

In short, .NET is not just about web develpment or XML, it's a fully featured depelopment environment. DirectX 9 also provides direct support for .NET applications.

As you can see, I used a lot of space to decribe the platform, because I really think it's well constructed and easy to use; in fact, I'm working on a .NET interface layer for the WME engine core and I intend to use C# to develop the new WME tools.


Quote
Next problem: there are too many possibilities to choose to create applications. There is the Win32 API, there is MFC, there is DirectX and different Wrapper Classes, where I can't judge if they are good. Ok, the easiest way seems to be to create some MFC project, but I don't understand what the wizard creates and how I could change it. I guess I don't like MFC at all.
It really depends on which applications you are going to write. MFC is useful mainly for GUI apps, because the native Win32 GUI functions are quite cumbersome and MFC simplifies the tasks. Of course, MFC also provides some supporting classes, for example for easy string handling, for dynamic arrays etc.
DirectX is a standalone library for multimedia applications, it has nothing to do with MFC.
As an example: the WME runtime is written in C++, it directly uses only a few Win32 functions, and DirectX. It also uses the STL (standard template library) which is also a set of several supporting types (again, strings, dynamic arrays etc.).
The WME tools use MFC for GUI, plus they link the engine core (which is MFC independent).


Among MFC there are some other GUI libraries out there. There was the OWL library by Borland, very similar to MFC, but it's dead now, since Borland switched to the Delphi/C++Builder type interfaces.
I believe AGS uses wxWindows, which is supposed to be multiplatform, but I don't know much about it.


Quote
I want to learn C++ ! It seems to be the base of everything and the most advanced language next to Java (uggh!!) which is not too platform dependent. 99% of all tutorials just suck, they introduce thousands of new keywords and don't explain them. I'm searching for the 1% !
Yes, most of the "modern" languages are based on C++. It's really easy to switch to C# if you know C++ (personal experience :-) Unfortunately, I won't point you to any good tutorials, because I learned from books (and I won't point you to the books, because those were locally published ones).

Quote
I want to create Windows applications
Ok, I'm definitely voting for .NET and C# on this one. Win32 is almost unusable for larger apps and MFC is now considered obsolete. But if you'd really want to use MFC, I can recommend the "Inside Visual C++" book by David J. Kruglinski.


Quote
I want to create resizable GUIs (hehe, I just write this down because these things were so easy on the Amiga, but my first tests with VC and VB didn't work this way at all!)
I don't know what you mean by resizable GUIs ???


Quote
I want to be able to use DirectX some day (I managed that already with some tutorial, but I don't REALLY understand it!)
Just a few hints:
 -forget about DirectDraw, it's obsolete. Direct3D in DX8+ is much easier to use anyway.
 -DirectMusic is a mess ;-)))
 -read the DirectX documentation (at least the relevant parts), THEN the tutorials :-)




Ok, I probably forgot to mention about thousand things I wanted to. Let's go on :-)
Title: Re:Programming
Post by: odnorf on July 22, 2003, 12:57:31 PM
Sorry for saying something off-topic but what *exactly* do you mean jan by saying "I'm working on a .NET interface layer for the WME engine core"? You make me really worried now :) I thought that you said that you will not change the engine's core to C++.NET
Title: Re:Programming
Post by: Mnemonic on July 22, 2003, 01:00:05 PM
Sorry for saying something off-topic but what *exactly* do you mean jan by saying "I'm working on a .NET interface layer for the WME engine core"? You make me really worried now :) I thought that you said that you will not change the engine's core to C++.NET
I will not. The layer will lie between the C++ core and the .NET part. No need to worry :)
Title: Re:Programming
Post by: odnorf on July 22, 2003, 01:08:22 PM
Sorry for saying something off-topic but what *exactly* do you mean jan by saying "I'm working on a .NET interface layer for the WME engine core"? You make me really worried now :) I thought that you said that you will not change the engine's core to C++.NET
I will not. The layer will lie between the C++ core and the .NET part. No need to worry :)

e? I am not a programmer and I am not sure if I understood you. In what way this will improve wme? Please, provide some really-long-for-newbies explanations..... :) Will this make wme to run on the NET framework?
Title: Re:Programming
Post by: Mnemonic on July 22, 2003, 02:30:25 PM
e? I am not a programmer and I am not sure if I understood you. In what way this will improve wme? Please, provide some really-long-for-newbies explanations..... :) Will this make wme to run on the NET framework?

The engine is composed of bunch of C++ classes. Those handle all the functionality, like drawing, playing sounds, loading and managing of all of game objects (scenes, actors, sprites...).
Now, the tool usually consists of lots of windows, dialogs, icons, toolbars, that kinda stuff. My intention is to write the GUI part in C# (using .NET library). But, the tool still needs partial access to the engine internals. And that's what the interface layer will handle.
Title: Re:Programming
Post by: odnorf on July 22, 2003, 02:34:51 PM
e? I am not a programmer and I am not sure if I understood you. In what way this will improve wme? Please, provide some really-long-for-newbies explanations..... :) Will this make wme to run on the NET framework?

The engine is composed of bunch of C++ classes. Those handle all the functionality, like drawing, playing sounds, loading and managing of all of game objects (scenes, actors, sprites...).
Now, the tool usually consists of lots of windows, dialogs, icons, toolbars, that kinda stuff. My intention is to write the GUI part in C# (using .NET library). But, the tool still needs partial access to the engine internals. And that's what the interface layer will handle.

I was about to say again "e?" but I just read it again and everything seems clear now... :) anyway.. thanks for answering...
Title: Re:Programming
Post by: Jerrot on July 22, 2003, 04:21:27 PM
Uh... wow, Mnemonic! Thanks for that detailed answer!!

Ow, that's tough... I'll tell you my point of view, which is not neccesarily right and some might disagree with certain points.

I can hear "someone"'s thoughts screaming for open source here... ;-)

Quote
Plus, like I said in another thread, it's meant to be a cross platform solution. The compiled .NET programs are platform independent, they are just interpreted by a certain platform's runtime.

I'm curious if there will really exist e.g. some Linux runtime...

Quote
As you can see, I used a lot of space to decribe the platform, because I really think it's well constructed and easy to use; in fact, I'm working on a .NET interface layer for the WME engine core and I intend to use C# to develop the new WME tools.

Hm, ok, that rounds up the facts I read about it.
So C++ is not usable for .NET before you port it to C# ? Or make it "Managed" (which is as far as I could discover 99% the same, but classes get some Garbarge Collection keyword or something...) ? But somewhere I read, the .NET compiler accepts C++ as the only unmanaged language, so I don't get it yet...

Quote
DirectX is a standalone library for multimedia applications, it has nothing to do with MFC.

Yes, it was some old code example in my mind that confused me here (opening a DirectX window which took me hours... ;) !).

Quote
Among MFC there are some other GUI libraries out there.

What about that .NET Windows Form Builder ? It seems to be similiar to the VB Forms. Is that something new and abstract or is it MFC based ?

Quote
Yes, most of the "modern" languages are based on C++. It's really easy to switch to C# if you know C++ (personal experience :-)

I read a little about it and it sounds really great (especially the part about pointers, hehe). I'll surely have a second look on it, but I can't afford the .NET Studio now, EUR 1200.- ... wow ! Guess, I'll try out SharpDevelop instead...

Quote
Unfortunately, I won't point you to any good tutorials, because I learned from books (and I won't point you to the books, because those were locally published ones).

I found a very good collection on http://www.programmingtutorials.com (http://www.programmingtutorials.com) if someone else is interested. And I found out that the jump from C to C++ is much smaller than I always thought.

Quote
I don't know what you mean by resizable GUIs ???

I mean GUIs that act like a web page with a framset. If you resize your browser, your GUI width and height are always 100%, the different parts just resize, get scrollbars or center. When I tried this (ok, it was just a short try) with MFC, all items stayed in the upper left corner and the rest of the window was empty. Guess I just didn't understand the concept of it.

Quote
Just a few hints:
 -read the DirectX documentation (at least the relevant parts), THEN the tutorials :-)

 :P ok, you got me... I always want everything immediately.  ::)

Thanks a LOT!
Title: Re:Programming
Post by: odnorf on July 22, 2003, 04:40:56 PM
Quote
I can hear "someone"'s thoughts screaming for open source here... ;-)

I am not screaming... :) Just talking with the volume really high sometimes  ;D

Quote
I'm curious if there will really exist e.g. some Linux runtime...

We talked about this while you were on holidays at http://www.dead-code.org/forum/index.php?board=1;action=display;threadid=244;start=0

At the same talk we learn some valuable things about the portability of wme interprenter too... But be prepared, this thread is a chaos (changed subject with every new line).
Title: Re:Programming
Post by: McCoy on July 22, 2003, 05:07:20 PM
I'll surely have a second look on it, but I can't afford the .NET Studio now, EUR 1200.- ... wow !

Thank you Lord for CloneCD  ;D ;D



--------------------------------------------------------------
Legal disclaimer: This topic does not show any simpathy or support for piracy, in fact, I condemn it  ;D
Title: Re:Programming
Post by: MMR on July 22, 2003, 05:11:27 PM
Well a good book to learn C++ is:

"C++ How to Program"
Editorial: DEITEL & DEITEL (Prentice Hall)

I've got it in spanish, so here is the "Original" "English" information:

ISBN 0-13-528910-6

It's very useful. It has a lot of examples and it covers the main things of C++ language with Tips and other stuff. It also cover the STL :D
Title: Re:Programming
Post by: Mnemonic on July 23, 2003, 08:34:39 AM
I'm curious if there will really exist e.g. some Linux runtime...

Like odnorf already pointed out, there are at least two open source implementations (of course, not from Microsoft):

http://www.go-mono.com
http://www.dotgnu.org


Hm, ok, that rounds up the facts I read about it.
So C++ is not usable for .NET before you port it to C# ? Or make it "Managed" (which is as far as I could discover 99% the same, but classes get some Garbarge Collection keyword or something...) ? But somewhere I read, the .NET compiler accepts C++ as the only unmanaged language, so I don't get it yet...
Unfortunately, I'm not familiar with the C++ "managed extensions" and how it exactly works. However, C# allows you to use pointers, direct memory allocations and all that "nasty" C stuff, but this code is considered "unmanaged".


What about that .NET Windows Form Builder ? It seems to be similiar to the VB Forms. Is that something new and abstract or is it MFC based ?
Yes, completely new. There are hardly any resemblances to MFC. It's indeed very similar to VB/Delphi.

I read a little about it and it sounds really great (especially the part about pointers, hehe). I'll surely have a second look on it, but I can't afford the .NET Studio now, EUR 1200.- ... wow ! Guess, I'll try out SharpDevelop instead...
Yep, the complete Visual Studio is quite expensive. On the other hand, the standalone C# edition is about 10 times less expensive, which is more reasonable (for me, at least).


I found a very good collection on http://www.programmingtutorials.com (http://www.programmingtutorials.com) if someone else is interested. And I found out that the jump from C to C++ is much smaller than I always thought.
Other good links:

C++, C#, MFC, .NET
http://www.codeproject.com
http://www.codeguru.com

Game programming
http://www.gamedev.net
http://www.flipcode.com
http://www.gametutorials.com


I mean GUIs that act like a web page with a framset. If you resize your browser, your GUI width and height are always 100%, the different parts just resize, get scrollbars or center. When I tried this (ok, it was just a short try) with MFC, all items stayed in the upper left corner and the rest of the window was empty. Guess I just didn't understand the concept of it.
I see. Well, in MFC you have to program it yourself. In Windows Forms (.NET) it's only a matter of setting the "Dock" and "Anchor" properties of certain controls.

Quote
Just a few hints:
 -read the DirectX documentation (at least the relevant parts), THEN the tutorials :-)

 :P ok, you got me... I always want everything immediately.  ::)
IMHO the DirectX docs will give you an overview of the architecture and features, which is important to understand.
Title: Re:Programming
Post by: Mnemonic on July 23, 2003, 10:02:23 AM
http://dead-code.org/misc/wme_net.png  ;D
Title: Re:Programming
Post by: odnorf on July 23, 2003, 10:25:24 AM
http://dead-code.org/misc/wme_net.png  ;D

WOW! So you are working in the new SpriteEdit or is it just a test to learn C#?

I also see that you got yourself a new graphics card.... good! :)
Title: Re:Programming
Post by: Mnemonic on July 23, 2003, 10:53:09 AM
WOW! So you are working in the new SpriteEdit or is it just a test to learn C#?
So far it's only a test of the interface layer. But, yes, Im planning to start with SpriteEdit, because it's simpler.


I also see that you got yourself a new graphics card.... good! :)
Getting ready for Half-Life 2  ;D
Title: Re:Programming
Post by: odnorf on July 23, 2003, 11:20:18 AM
WOW! So you are working in the new SpriteEdit or is it just a test to learn C#?
So far it's only a test of the interface layer. But, yes, Im planning to start with SpriteEdit, because it's simpler.

You are going to program a new SceneEdit which is a "long term task" instead of a new feature (there are 19 waiting...:))? That's strange! :D It seems that you REALLY want to start programming in C#.... I guess it's time to start downloading the .NET framework to be ready....
Title: Re:Programming
Post by: Mnemonic on July 23, 2003, 11:25:46 AM
You are going to program a new SceneEdit which is a "long term task" instead of a new feature (there are 19 waiting...:))? That's strange! :D It seems that you REALLY want to start programming in C#.... I guess it's time to start downloading the .NET framework to be ready....

Many of the "waiting" features will require significant changes to the tools. Currently, changing the tools is a pain. So let's call this a... "strategic decision" ;)
Plus, I REALLY want to start programming in C# :D
Title: Re:Programming
Post by: Jerrot on July 24, 2003, 10:44:45 AM
Hi Mnemonic,

I'm curious if there will really exist e.g. some Linux runtime...
Like odnorf already pointed out, there are at least two open source implementations

Uh, I didn't get that although I read it. But I understood the mono project as some alternative to the .NET framework, not as an implementation of it. Now... that will be one of the things for me to test, as soon as "my" brand new VS update arrives! (Why pay if your company pays ?! ;D )

Quote
Quote
What about that .NET Windows Form Builder ? It seems to be similiar to the VB Forms. Is that something new and abstract or is it MFC based ?
Yes, completely new. There are hardly any resemblances to MFC. It's indeed very similar to VB/Delphi.

Do you know if this is usable for the "new" C++ version or only for C#, etc. ?

Other good links:

Thanks.  :)

Quote
I mean GUIs that act like a web page with a frameset. If you resize your browser, your GUI width and height are always 100%, the different parts just resize, get scrollbars or center.
I see. Well, in MFC you have to program it yourself. In Windows Forms (.NET) it's only a matter of setting the "Dock" and "Anchor" properties of certain controls.

Well - it sounds like .NET is what I'm looking for finally. I need that GUI help, because I just read some tutorials for C++ and discovered that I still knew most of it - and the parts that are completely new for me are quite similiar to methods in Java. But anyway I couldn't work with it at all, because I didn't even know how to open a window with that basic knowledge. ;-)

Title: Re:Programming
Post by: Mnemonic on July 24, 2003, 03:53:55 PM
Now... that will be one of the things for me to test, as soon as "my" brand new VS update arrives! (Why pay if your company pays ?! ;D )
Yeah, same here :) But I'm gonna purchase the C# edition anyway.


Do you know if this is usable for the "new" C++ version or only for C#, etc. ?
I suppose there's not much difference between C# vs managed C++ support. Of course, the "original" C++/MFC support will be somewhat limited.
Title: Re:Programming
Post by: Mnemonic on July 27, 2003, 06:41:05 PM
I found an interesting article which compares the C# language features to Java and C++:

http://genamics.com/developer/csharp_comparative.htm
Title: Re: Programming
Post by: sychron on March 13, 2008, 12:22:53 AM
This thread is a little outdated, but if anyone stumbles across using the search function:
You can get a free development environment for every .NET language at the microsoft site. Theese Environments are called Visual Studio Express, just search for them. They are free for uncommercial use, but that's just great for just having a look on the language and/or framework.
Title: Re: Programming
Post by: Schnuffel on March 13, 2008, 04:12:37 AM
Actually, they're free for commercial use, too.

Quote
Can I use Express Editions for commercial use?
Yes, there are no licensing restrictions for applications built using Visual Studio Express Editions.
Title: Re: Programming
Post by: sychron on March 13, 2008, 04:16:58 PM
Actually, they're free for commercial use, too.

Quote
Can I use Express Editions for commercial use?
Yes, there are no licensing restrictions for applications built using Visual Studio Express Editions.

Hmm. That's new. Thx for the info.