• Advertisement
Sign in to follow this  

What do you use to program your tools?

This topic is 4429 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I need to make a level editor for my 2D tile based game, and I was wondering what people used to write their tools, and why. I was thinking about either using Win32 or MFC. I wanted to know which one was better, or better yet the pros and cons about each. Should I use something else all together? Thanks

Share this post


Link to post
Share on other sites
Advertisement
I use enviroments that are powerful in both RAD and code, and as easy as possible. Until recently I used Delphi, now I have switched to C#.

Share this post


Link to post
Share on other sites
I used to use C++ Builder and Visual Basic, lately I mostly use C#.

Share this post


Link to post
Share on other sites
I'd agree with the previous 2 posters, give C# a shot. Particularly if the tool is for your own use or for very controlled distribution (where you can expect that the end user has the .NET Framework installed).

Personally, I'd use C# for everything if every Windows XP user was *guaranteed* to have the .NET Framework installed, but alas, it's not quite that straightforward. So, I plan on crafting some tools using the Win32 SDK directly, but they're fairly simple GUIs (not full editors).

Share this post


Link to post
Share on other sites
C# and Windows Forms, because they produce the most stuff [UI elements, collections, utility classes, common IO...] with the least amount of work without causing me pain when I impliment the innard parts that the tool actually does.

Share this post


Link to post
Share on other sites
I think with C++/CLI, using C++ for RAD tool development seems much more viable.

Share this post


Link to post
Share on other sites
I've been using C# but I'm thinking of switching to C++/CLI since I still feel more comfortable with C++ and .NET for GUI stuff is great. Of course I could always use both in the same program! :)


-SirKnight

Share this post


Link to post
Share on other sites
I think you're going to see people mainly talking about C# and C++/CLI. MFC can be a mess (I used to use it a lot, but man there was a lot going into your projects's code behind the scenes [and many times you had to dredge through it]). Basic Win32 programming for an advanced interface might have you pulling out your hair with the amount of stuff you have to manage and do manually.

I personally use C#. I might go the route of C++/CLI just for the fact that C++ Still allows me to read and write structures from memory to files easily.

I think personally that hands down, the .NET framework provides an excellent ability to develop tool type programs. I dont think I'd bother going back to the route of WIn32 or MFC ever since I got into developing tools with the .NET framework.

Edit: Silly typos can be evil.

[Edited by - Flimflam on January 4, 2006 3:49:12 PM]

Share this post


Link to post
Share on other sites
Whatever tool makes the most sense. Sometimes it will be VB6, sometimes PHP and javascript, sometimes Win32 C++, sometimes MFC. I usually pick the laziest possible way to build a tool, and use it. I've been looking for time to add Python and C# to my list so I can be even more lazy in the future.

Share this post


Link to post
Share on other sites
Quote:
Original post by FlimflamI dont think I'd bother going back to the route of WIn32 or MFC ever since I got into developing tools with the .NET framework.


Agreed! MFC is .. real painful. Having done a lot of my old tools in MFC, and having to deal with legacy MFC code at my job all the time I can quite confidently say that if you have the choice between MFC and C#, do not hesitate to go with the latter.

I'm pretty proud of the tool I've built. The editor itself is all C#, which then interfaces with an unmanaged C++ DLL, which interfaces with the rest of my (C++) engine. This pretty much guarantees my editor to be a WYSIWYG tool =)

As far ease of use, C# is fairly quick to pick up if you're familiar with C++ or Java (though knowledge of the latter might be more useful honestly). They have extensive libraries and will get you up and running with something nice in no time =)

Share this post


Link to post
Share on other sites
I used to use Python a lot, but now I'm using Scheme and Haskell more. Well, depends on what you mean by tools, I guess. I'm trying metalinguistic programming now, so my tools usually involve creating a new programming language.

Share this post


Link to post
Share on other sites
Quote:
Original post by Grafalgar
Quote:
Original post by FlimflamI dont think I'd bother going back to the route of WIn32 or MFC ever since I got into developing tools with the .NET framework.


Agreed! MFC is .. real painful. Having done a lot of my old tools in MFC, and having to deal with legacy MFC code at my job all the time I can quite confidently say that if you have the choice between MFC and C#, do not hesitate to go with the latter.

I'm pretty proud of the tool I've built. The editor itself is all C#, which then interfaces with an unmanaged C++ DLL, which interfaces with the rest of my (C++) engine. This pretty much guarantees my editor to be a WYSIWYG tool =)

As far ease of use, C# is fairly quick to pick up if you're familiar with C++ or Java (though knowledge of the latter might be more useful honestly). They have extensive libraries and will get you up and running with something nice in no time =)


I was about to go and use C#, but that was the snag i ran into. My engine was goin to be in C++. How exactly do you go about mixing C# and C++?

Also, would windows forms be a good way to go?

Share this post


Link to post
Share on other sites
On this topic, lets say i have a bunch of core rendering and management classes coded in C++/DirectX and i want to drop these classes into the a gui created with forms in C#, is this going to be a problem? Excuse my ignorance on the subject, of forms/c# I have no experience in both.

Share this post


Link to post
Share on other sites
The map editor(for that fact the whole engine) was written in C#, it provides alot of the functionality of C++ but the spead of something like visual basic.

lubby, if its c++ .net(a managed libary), i think( i very well could be wrong) you can mix and match code. if its not a managed c++ lib, you have to invoke the dlls

like:

[DllImport("user32.dll", EntryPoint="MessageBox")]
public static extern int MessageBox(int hWnd, String strMessage, String
strCaption, uint uiType);


now if it is managed c++ code you can just compile it to a .net assemebly and import it into your C# app.

thats a really rough outline, im sure someone can supply a more detailed answer.

Share this post


Link to post
Share on other sites
Quote:
Original post by SuperFunHappyMeowCat
I was about to go and use C#, but that was the snag i ran into. My engine was goin to be in C++. How exactly do you go about mixing C# and C++?

Also, would windows forms be a good way to go?


I have a single class in C# that serves as my 'DLL Interface' class, which just declares a bunch of externs that I define in a seperate DLL. Here's some code to do it (it's VERY basic, I have yet to explore the depth of library importing):


/// <summary>
/// Summary description for DLLInterface.
/// </summary>
public class DLLInterface
{
[DllImport("MyDLL")]
public extern static void DoSomething(int a, int b);
}




then in MyDLL exists a function:


void DoSomething(int a, int b)
{
// ...
}




You just have to make sure your DoSomething is exported. For some reason I couldn't get it to work using declspec, so I used a .def file instead. Works like a charm :) There's a great article about this in the October 2005 issue of Dr Dobb's Journal entitled "Calling C Library DLLs from C#"

Hope that helps =)

Share this post


Link to post
Share on other sites
I guess I'd use C++/MFC because I know these well. I'd rather that I knew C# so I could more quickly knock up a windows app, but I can't find the time to stop coding and learn it right now!

Share this post


Link to post
Share on other sites
I am using Lazarus (like Delphi but for the Free Pascal Compiler) for an upcomming map editor.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement