Author |
Message |
Sheppard
Crewman
Joined: 30 Sep 2007, 01:00 Posts: 10
|
Hello, I have played BotE, and I am creating my own game. Well I was wondering what software you used. I was wanting to expand then software what I am using now.
Thanks
|
03 Oct 2007, 02:39 |
|
|
Malvoisin
Fleet Admiral
Joined: 13 Nov 2006, 01:00 Posts: 2111 Location: Germany
|
C++ with MS VS 2008, MFC classes, GDI+.
the UI however is bloody difficult to program with no real window manager at hand for the standard Microsoft MFC Foundation Classes..
|
03 Oct 2007, 07:17 |
|
|
Malvoisin
Fleet Admiral
Joined: 13 Nov 2006, 01:00 Posts: 2111 Location: Germany
|
|
03 Oct 2007, 17:08 |
|
|
mstrobel
Chief Software Engineer
Joined: 11 Aug 2005, 01:00 Posts: 2688
|
Hey, that's great! I want me some Alpha 4 .
@Sheppard: Supremacy is written in C#/XAML, and I use Visual Studio 2008 Beta 2 with the ReSharper plugin. The UI is much easier if you use WPF instead of MFC .
_________________ Lead Developer of Star Trek: Supremacy 253,658 lines of code and counting...
|
03 Oct 2007, 17:45 |
|
|
Malvoisin
Fleet Admiral
Joined: 13 Nov 2006, 01:00 Posts: 2111 Location: Germany
|
|
27 Dec 2007, 13:22 |
|
|
Strings
Lieutenant Junior Grade
Joined: 11 Nov 2007, 02:55 Posts: 264 Location: UK
|
The title of the first link is: "Integrate Windows Forms Into Your MFC Applications Through C++ Interop" At the moment I'm making XNA render into a UserControl, which can then be used on a Windows Form, so this is very promising. Good find. The UserControl and Windows Form are in C# though.
Last edited by Strings on 27 Dec 2007, 13:57, edited 1 time in total.
|
27 Dec 2007, 13:41 |
|
|
Malvoisin
Fleet Admiral
Joined: 13 Nov 2006, 01:00 Posts: 2111 Location: Germany
|
|
27 Dec 2007, 13:57 |
|
|
Strings
Lieutenant Junior Grade
Joined: 11 Nov 2007, 02:55 Posts: 264 Location: UK
|
Yeah, XNA does have a lot of prerequisites redists: .NET, XNA, DirectX, oh and a graphics card with 1.1 shader support and judging from the amount of trouble people had getting the model viewer to work last week, I agree with you that having two versions is the best plan. But I know of a CodePlex project for an installer that checks for and if necessary install the redistributables required to get the XNA game running (DirectX 9.0c October 2006, .NET Framework 2.0 SP1 and XNA 1.0 Refresh), adding 27 MB to the game's size. It can also check for a certain level of shader support on the target system. Cool, loads of links with info that looks really promising! I'm glad that we're finally getting started on solving the problem. it's been nagging me quite some time.
|
27 Dec 2007, 14:21 |
|
|
Malvoisin
Fleet Admiral
Joined: 13 Nov 2006, 01:00 Posts: 2111 Location: Germany
|
from what I understand, having a c# written form and unmanaged c++ mfc whatever should work together without much hassle (hopefully). I guess even if it takes code line fumbling it shouldn't be too much to do since the planets and the 3D engine are just 2 forms basically, right? Edit: a german how-to: http://download.microsoft.com/download/4/7/a/47aca5b1-ad88-4248-949b-d0333d238516/msdnMagazin_WindowsFormsInMFCAnwendungenUeberCppInteropIntegrieren.pdf
|
27 Dec 2007, 14:38 |
|
|
Strings
Lieutenant Junior Grade
Joined: 11 Nov 2007, 02:55 Posts: 264 Location: UK
|
We shall have to investigate and see, lets hope it just works if we follow the examples. Found an actual MFC and Windows Forms code sample from Microsoft, requires building first though, it's a Visual Studio project. http://www.microsoft.com/downloads/deta ... aa50b0f599
|
27 Dec 2007, 14:49 |
|
|
Malvoisin
Fleet Admiral
Joined: 13 Nov 2006, 01:00 Posts: 2111 Location: Germany
|
okay, let's wait on our code guru before we proceed any further. I don't have the full VS2005 btw. to check any sample form out quickly but I think there's an express version which maybe has the necessary functionality to test..
|
27 Dec 2007, 14:54 |
|
|
Strings
Lieutenant Junior Grade
Joined: 11 Nov 2007, 02:55 Posts: 264 Location: UK
|
I will try building it and if it works, post the compiled .exe on here.
|
27 Dec 2007, 14:56 |
|
|
Malvoisin
Fleet Admiral
Joined: 13 Nov 2006, 01:00 Posts: 2111 Location: Germany
|
okay thx. In the meantime I'll try the express version out.
|
27 Dec 2007, 14:58 |
|
|
Strings
Lieutenant Junior Grade
Joined: 11 Nov 2007, 02:55 Posts: 264 Location: UK
|
It compiled in VS2008, but I am not not clear whether it is working correctly. Maybe Sir P. will understand it better. Or maybe I'll understand how it works if I read more about it. http://www.mediafire.com/?4rchpxlpzfu
|
27 Dec 2007, 15:18 |
|
|
Malvoisin
Fleet Admiral
Joined: 13 Nov 2006, 01:00 Posts: 2111 Location: Germany
|
the express version terminates with an unknown error message while compiling. Also your exe does not run showing a "application configuration incorrect" (or rather something likewise translated into german ). I'm installing the microsoft platform sdk right now, maybe the Visual Studio Express version alone is not enough..
|
27 Dec 2007, 15:48 |
|
|
Strings
Lieutenant Junior Grade
Joined: 11 Nov 2007, 02:55 Posts: 264 Location: UK
|
*shrugs* I don't know man I was surprised it even compiled after the conversion to VS2008, when it runs it shows something like the screenshot I attached. Now I'm reading this document again to try and understand what's going on, http://msdn.microsoft.com/msdnmag/issue ... fault.aspx
Attachments:
MFCWinFormsSample.png [ 158.96 KiB | Viewed 14904 times ]
Last edited by Strings on 27 Dec 2007, 16:25, edited 2 times in total.
|
27 Dec 2007, 16:10 |
|
|
Malvoisin
Fleet Admiral
Joined: 13 Nov 2006, 01:00 Posts: 2111 Location: Germany
|
well, at least I know now why it doesn't compile. The MFC libraries aren't supported by the Express versions of VS.
as for your compiled exe, it's strange that it does not run with my pc since I have everything installed that one could possibly imagine except any dev tools or sdk (okay, safe for the MS platform sdk which I just installed). Gonna read this page too you linked..
Edit: I could try the vc2008 redist though..
|
27 Dec 2007, 16:18 |
|
|
Strings
Lieutenant Junior Grade
Joined: 11 Nov 2007, 02:55 Posts: 264 Location: UK
|
This is what I can grasp from a quick read and what the sample app showed me. - The C++ code in BOTE have to be compiled with the /clr flag before it can use .NET features. - Something called Mixed-mode compiling allows just a small part of the BOTE code to be compiled with /clr. - A feature called "C++ interop or IJW (It just works)" can then be used. - A special class in MFC, CWinFormsControl allows you to host Windows Forms controls in MFC dialog boxes ( I think this is what happens in the sample app ). So, if we get it to work, the UserControl with the XNA rendering will be inside a dialog box. Hmm.. Edit: No wait, you can host Windows Forms controls as views too. But I dont understand that bit of the article at all.
Last edited by Strings on 27 Dec 2007, 16:36, edited 1 time in total.
|
27 Dec 2007, 16:25 |
|
|
Malvoisin
Fleet Admiral
Joined: 13 Nov 2006, 01:00 Posts: 2111 Location: Germany
|
hehe a dialog box, well, I guess we have to cut the dialog option out of that box then don't we. anyway, did you compile mfc04 with a 64bit flag or something? Even after download the vc2008 redist, it still gives the error message..
|
27 Dec 2007, 16:34 |
|
|
Strings
Lieutenant Junior Grade
Joined: 11 Nov 2007, 02:55 Posts: 264 Location: UK
|
I compiled it as Win32. It was either Win32, or Itanium (wtf, server thing?) or x64.
And I just thought of this, if we dont want to involve Dialog boxes, we can simply not render to the UserControl, I can modify the XNA code to render to the actual background of the Form instead.
|
27 Dec 2007, 16:39 |
|
|
Malvoisin
Fleet Admiral
Joined: 13 Nov 2006, 01:00 Posts: 2111 Location: Germany
|
strange. Hope it's just their buggy code . Can somebody else try and download this file and see if it runs on his machine? Edit: well, do it! (but first talk to sir p. cause I don't know what he wants here ).
|
27 Dec 2007, 16:43 |
|
|
Strings
Lieutenant Junior Grade
Joined: 11 Nov 2007, 02:55 Posts: 264 Location: UK
|
Just done it it was pretty easy, just passed the handle of the Form instead of the handle of the UserControl, in fact, I reckon that's what I'll use from now on when I dont actually have other GUI elements in the Form. But for the model viewer, I'll keep UserControl or I can probably use something even simpler, like say, a blank Panel.
|
27 Dec 2007, 16:50 |
|
|
Malvoisin
Fleet Admiral
Joined: 13 Nov 2006, 01:00 Posts: 2111 Location: Germany
|
good. I guess MouseOverEvents will still be possible in such a form? BotE currently features a simple MouseOver-Event when hovering over a planet. On the left bottom side, a short planet class description text is displayed. Will that work with a rendered planet too? Edit: btw. I get this message (third one on the page): http://www.codeproject.com/KB/cpp/vcredists_x86.aspx . Seems like it has something to do with certain CRT files that are missed by the compiled program.. http://forums.microsoft.com/MSDN/ShowPo ... 9&SiteID=1 (this seems also very interesting for troubleshooting. Looks like this /clr option needs special care with mfc dll repositories..)
|
27 Dec 2007, 16:53 |
|
|
Strings
Lieutenant Junior Grade
Joined: 11 Nov 2007, 02:55 Posts: 264 Location: UK
|
In a purely XNA setting, I can get that to work quite easily by checking if where the mouse is on the screen projects an invisible line that intersects the BoundingBox / BoundingSphere of a model, and then display a string somewhere if it does intersect. This is a technique called picking. So if we are thinking about planets, I would use the bounding sphere instead of the bounding box for a better fit, and if a planet is intersecting with the line from the mouse, then the string, for example, "Planet9 mousedOver" can be passed to BOTE to process properly (have to look into how to pass messages between MFC / Windows Forms.) Or XNA can process it too, and show what planet type it is tooltip style. So I'm pretty sure it is doable. yeah, something about Side-by-side DLLs... have to do something with them, in the Manifest, or something. I'm not sure
|
27 Dec 2007, 17:06 |
|
|
Malvoisin
Fleet Admiral
Joined: 13 Nov 2006, 01:00 Posts: 2111 Location: Germany
|
following one of my links from page1, I found a lot of seemingly useful webcasts by a german MS developer which sir p. might find very interesting: 1. http://www.microsoft.com/germany/msdn/w ... =100100266 (use of .NET and c# written forms in unmanaged code) 2. http://www.microsoft.com/germany/MSDN/w ... 1032314634 (like in 1. but this time with focus on implementation in Visual Studio 2005) 3. http://www.microsoft.com/germany/MSDN/w ... 1032303161 (a general WPF introduction webcast series) 4. http://www.microsoft.com/germany/msdn/w ... 04-01.mspx (c++/cli in Visual Studio 2005) 5. http://www.microsoft.com/germany/MSDN/w ... =118757735 (cli explained in 4 episodes) btw. registration on windows live! is required. If someone already has a live account and can download and quick upload these to sharepoint (we'll remove it after download) that would be extremely helpful I guess.
|
28 Dec 2007, 13:31 |
|
|
Strings
Lieutenant Junior Grade
Joined: 11 Nov 2007, 02:55 Posts: 264 Location: UK
|
In one big .rar http://rapidshare.com/files/79775489/Ma ... _.rar.htmlI couldn't upload to the sharepoint because it kept giving me errors but here it is anyway.
|
29 Dec 2007, 06:47 |
|
|
Malvoisin
Fleet Admiral
Joined: 13 Nov 2006, 01:00 Posts: 2111 Location: Germany
|
downloading yep, for sharepoint you either need a (university) 100Mbit/s Internet connection or split all files up in 7mb packages. It may be a settings thing with the site, mstrobel might know more about this.
|
29 Dec 2007, 09:35 |
|
|
Malvoisin
Fleet Admiral
Joined: 13 Nov 2006, 01:00 Posts: 2111 Location: Germany
|
okay, next (and last) one is 40 min long and the one about c++ and cli in vs 2005. Well from what I learned so far is that all .net components (dlls) need to be COM-compatible in their attributes when calling them from unmanaged code. .net-own specific classes and types need to be processed in the .net component in an "encapsulated" way. Even multithreading in vb6 is easily done that way. However, it's even possible to call such classes that communicate via non-com-compatible types but it's a non-supported feature and may be scrapped or is already scrapped. .NET 1.0 originally was intended to be fully compliant with unmanaged code. That approach was abandoned in 2.0 but still the feature is working. All in all, it seems viable to use any given .NET component and also Windows Forms via wrapping as long as the .NET specific "work" is done inside the .NET component to be used/called in the unmanaged code. I guess Strings, you and puste like we call sir p. on our german boards, should sit together and try to implement a more or less rudimentary 3D planet view. This IJW and CLI thing seems only to be useful the other way round, i.e. when you have managed c++ and you want any unmanaged c++ or managed .NET code to be combined in a single exe thus merging it completely, but from the managed c++ viewpoint. Here are 3 links that I find useful: http://207.46.236.188/MSDN/ShowPost.asp ... 1&SiteID=1http://msdn2.microsoft.com/en-us/library/zsfww439(VS.71).aspxhttp://msdn2.microsoft.com/en-us/library/9x0wh2z3.aspxand of course the pdf file linked in page1 ( http://www.microsoft.com/germany/msdn/library/net/cplusplus/WindowsFormsInMFCAnwendungenUeberCplusplusInteropIntegrieren.mspx?mfr=true), which I'm currently reading. It covers Windows Forms User Controls in MFC applications via /clr. It's a little contracting to what I wrote above with IJW not really helpful. Guess that's wrong .
|
29 Dec 2007, 12:50 |
|
|
IB_
Crewman
Joined: 08 Dec 2007, 01:00 Posts: 39
|
I was going to wait till the new release to make suggestions, but the waiting is getting to me. One thing I think there is too much of is different screens. I think unifying the screens and cutting down on the amount of clicks you need to micromanage you empire is a good idea. I've started work on some rough draft 800*600 Paint layouts.
|
01 Jan 2008, 21:24 |
|
|
Malvoisin
Fleet Admiral
Joined: 13 Nov 2006, 01:00 Posts: 2111 Location: Germany
|
that is a good idea. Sure there is plenty of room to combine a few screens such as workers' and build menu, monopoly menu and trademenu. Techniques like integrated pull-down menus and stuff would help there tremendously but is very tiresome to implement in current mfc architecture which is btw. the reason why sir p. implemented that many different menus in the first place, it's much easier to code. But, if you can develop some good drafts (take 1075x750 as size), go ahead! Might bring this "feature" much more ahead in schedule than it is now (unifying menus is on the "after bote v.1.0" still-to-do-list ).
|
02 Jan 2008, 07:02 |
|
|
|