Sign in to follow this  

Game Tools Development

This topic is 2324 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

Ok, some time ago I asked here about making a game engine in C#, and with the answers, I realized that I'm not currently able to make one, as it's a very complex project and a beginner doesn't have enough experience to build one.

So, as I started making some other things and little games, like pong, I found a job entry for a tools programmer, and that really caught my eye, and after that I decided to be a tools programmer.

So far i'm (still) getting experience with C# and WPF. But the biggest problem is finding articles and stuff on tools development.

In my vision, C# and WPF seems pretty good for tools, however, in the few articles i've seen, they said that as they needed wrappers to integrate with, let's say, the game engine, things started to get complicated, code duplicated and features limited. My concern now is knowing if C# and WPF is a good choice for tools development, or just C++ with a "framework", like Wx or QT is the way to go.

The articles i've seen are from 2009 mostly, so a lot could have changed since then.

Also, I'm aware that different tools may need C++, others could just be implemented in C# or any other language that best fits. Is anyone here in the field? If yes, can you give me more examples of tools that you have done, so I can get more concrete examples? and also, which languages/frameworks do you use most of the time?

I'm very excited about this and I hope i'm at the right place to ask about this.

Thank you very much

Share this post


Link to post
Share on other sites
availability of tutorials cannot be used to judge if a tech is good or not for the job.

It is unlikely to find these kind of tutorials because they're very implementation dependent.

Here is what i got from direct experience. Tools are build on the top of an engine. Mostly likely you'll have to deal with a C++ engine.

You have 2 possible approaches to host that engine in your C# application.

1) You build a C++ dll and expose the engine through pure C functions. You should look at things like OpenGL or ODE for examples about wrapping "objects" into pure C calls.
In C# land then, you will create a P/Invoke static class that binds all the function exposed in the DLL.

2) You build a managed C++ wrapper around the engine and then reference that from your C# code.

I'd say approach 1 is nice because you work with "real" C++ and "real" C#... the problem is that you'll have to write every function 3 times.. in the native class, in the C layer, in C# P/Invoke layer.. this can get annoying after a while.
Approach 2 forces you to deal with "managed C++" which isn't nice, plus, MS has the bad habits of changing it from version to version, so you managed C++ VS2005 code might not work with a new version of the compiler, and you'll have a massive rewrite to do. Plus you need to learn a new syntax to do things in the .NET way.
I have tried both and tend to prefer the managed C++ approach.. but when you spend lots of time in C# you'll start to hate every minute of C++ [img]http://public.gamedev.net/public/style_emoticons/default/tongue.gif[/img] .

Anyhow, you'll need to become really familiar with P/Invoke and marshalling stuff from native to C# and back... if that's what you want to do, get started with learning how to call functions, move data, move strings, structures back and forth... cause you'll be doing lots of it for your tools.

Share this post


Link to post
Share on other sites
[quote name='kunos' timestamp='1311608534' post='4840021']
availability of tutorials cannot be used to judge if a tech is good or not for the job.

It is unlikely to find these kind of tutorials because they're very implementation dependent.

Here is what i got from direct experience. Tools are build on the top of an engine. Mostly likely you'll have to deal with a C++ engine.

You have 2 possible approaches to host that engine in your C# application.

1) You build a C++ dll and expose the engine through pure C functions. You should look at things like OpenGL or ODE for examples about wrapping "objects" into pure C calls.
In C# land then, you will create a P/Invoke static class that binds all the function exposed in the DLL.

2) You build a managed C++ wrapper around the engine and then reference that from your C# code.

I'd say approach 1 is nice because you work with "real" C++ and "real" C#... the problem is that you'll have to write every function 3 times.. in the native class, in the C layer, in C# P/Invoke layer.. this can get annoying after a while.
Approach 2 forces you to deal with "managed C++" which isn't nice, plus, MS has the bad habits of changing it from version to version, so you managed C++ VS2005 code might not work with a new version of the compiler, and you'll have a massive rewrite to do. Plus you need to learn a new syntax to do things in the .NET way.
I have tried both and tend to prefer the managed C++ approach.. but when you spend lots of time in C# you'll start to hate every minute of C++ [img]http://public.gamedev.net/public/style_emoticons/default/tongue.gif[/img] .

Anyhow, you'll need to become really familiar with P/Invoke and marshalling stuff from native to C# and back... if that's what you want to do, get started with learning how to call functions, move data, move strings, structures back and forth... cause you'll be doing lots of it for your tools.
[/quote]

Both ways does the job, but the second one, the managed C++, is very ugly and as you said, MS changes stuff quite often.... so, in this case, using C++ for tools wouldn't be better?
I mean, by using C#, on this kinds of problems, you lose time wrapping functions and in the managed code, as you gain in the rapid UI and the development of the "tool itself".

For an example, i find that QT has a great designer for the UI and provides some great libraries/utilities that can help in the aspect of rapid development, so can I compare it to MS C# with WinForms/WPF?

One of the things that i like about this job is that we don't get any credit of the games, instead I would get my "reward" in making another's job more easy and fluid. Does scripts and level editors count in the responsibilities of a tools programmer to make?

Thank you for the answer so far

Share this post


Link to post
Share on other sites
QT is not bad, but you can't compare it to the level of productivity you get using C#... The trick is to identify the minimum amount of functionalities that need to be exposed from the native code.. and keep as much logic in the nice and fast C# environment.
I have used QT for a resolution/options panel in my last project and it was ok but I wouldnt use it for a full level editor.

If you want to stay in C++ land you might have a look at what Borland is doing with the C++ Builder line. I have used C++ Builder in the past and it was brilliant although you still have the problem of connecting the engine since the Borland compiler doesn't agree with the MS one on library formats (it used to be the case).. so you'll have to compile your engine in C++ Builder.. and this could lead to more problems.

At the end of the day... I'd stick to a C# / Forms / Managed C++ solution which is what I am currently using.

Share this post


Link to post
Share on other sites
[quote][color=#1C2837][size=2]Does scripts and level editors count in the responsibilities of a tools programmer to make?[/size][/color][/quote]


Seeing as these are in fact tools, yes designing and implementing these applications would be part of a tool programmer's job.


[quote][color=#1C2837][size=2]For an example, i find that QT has a great designer for the UI and provides some great libraries/utilities that can help in the aspect of rapid development, so can I compare it to MS C# with WinForms/WPF?[/size][/color][/quote]

I doubt that developing a GUI-based application in C++ with QT would be possible in the same time you could develop one with visual studio in C#
Personally I use QT with C++ for my tools which need to access my engine directly, but I find it a serious pain to keep this up, especially with QT generating additional code for custom widgets through a preprocessor (if you could call it that) which can get messy to keep organized imo.

I'm seriously considering writing a .NET wrapper for my engine at the moment so I can use it in C# (or any .NET language for that matter); I love C++ for engine development, but I absolutely hate it when it comes to GUI-based development, so I'd rather go through the process of writing a wrapper instead of having to write and maintain my tools in C++.

Share this post


Link to post
Share on other sites
Important point;

"Managed C++" is dead; C++/CLI is it's much better replacement.

Sure, I wouldn't write a whole app in it, however for interop of C++ <--> C# it's the best tool for the job.

It doens't even have to be that complicated; you don't have to wrap EVERYTHING, just use the C++/CLI dll to expose functionality to let you interact with the game/engine.

For example if you had an enemy class you wouldn't expose that directly but you would expose functionality to let you create and manipulate an enemy instance.

Share this post


Link to post
Share on other sites
Hum.... i see your points. So, no way to compare QT to C#, which is great, because i don't like so much the idea of leaving "the cleaness of code all the way". So i guess the time speind on the wrappers and "glues" is lower than the time spend doing in C++, which is very reasonable...

I'm starting to love this job more and more, though I need to learn more about C++ <-> C# interopability and how to tie them together...


But, C++/CLI is a whole another sintax compared to pure C++, and it would kind of act like a wrapper, but it will be like a "middle class" that interacts between the C++ code and C# code? am i right?

Kunos, i thought C++ builder was dead.... i don't see much "news" about it for a long time....

Also, i don't know if you can answer this but... is it preferable to use windows Forms or WPF for UI development? Because i saw some articles from 2009 that pointed some problems in integrating D3D or engines that use it, with WPF.

But thanks for the answers so far

Share this post


Link to post
Share on other sites
Borland is still up.. perhaps they've changed into Embarcadero or something like that, I did try the new C++ Builder some years ago and it was sweet but pricey (we have been all spoiled by VS :D). I still get offers from them in my email, so I think they're alive.

I don't have experience in WPF... every time I tried to use it, it felt slow, cumbersome and unispiring... I just fail to see the point behind it.
Forms feels faster and more similar to the way RAD software has been for the last 15 years.. so I stick with Forms.... just marshall the Handle property to the engine and it'll work with DX, OpenGL and everything else.. easy and fast.

Share this post


Link to post
Share on other sites
So i guess by your answer that Windows Forms are kind of a "standard" for game tools, right?

WPF is good, and has some advantages over WinForms, but I think in the field of games, which we need to interop with C++ a lot, WPF is too high level, and using it with a low level game engine, is not a good thing, and you can end up with a buggy tool and a non-functional. Found this by reading, but again, from articles from 2009.... so maybe M$ resolved this.

Nice that C++ builder isn't dead, and Embarcadero has put together some nice tools and i'm seeing now, almost like a "visual studio". And also i agree that we are spoiled by VS....

Share this post


Link to post
Share on other sites
[quote name='Mauricio Cinelli' timestamp='1311614982' post='4840076']
So i guess by your answer that Windows Forms are kind of a "standard" for game tools, right?

[/quote]


No,
the fact that I am using it doesn't make it a standard [img]http://public.gamedev.net/public/style_emoticons/default/tongue.gif[/img]





Share this post


Link to post
Share on other sites
[quote name='kunos' timestamp='1311614450' post='4840071']
Forms feels faster and more similar to the way RAD software has been for the last 15 years..
[/quote]


I'm talking about this part, which (in other words) you say that it feels more stable, faster and similar to what people use.... or at least, this sentence seems this to me. That's what i meant when saying about standard.

Share this post


Link to post
Share on other sites
[quote name='Mauricio Cinelli' timestamp='1311613948' post='4840062']
But, C++/CLI is a whole another sintax compared to pure C++, and it would kind of act like a wrapper, but it will be like a "middle class" that interacts between the C++ code and C# code? am i right?
[/quote]

The syntax is basically the same, they just add a few extra symbols to allow the 'unmanaged' and 'managed' world to be bridged.

For example in C++ you have the pointer syntax Entity * for instances on the unmanaged heap, in C++/CLI this has been extended so that you have Entity ^ which is a pointer/handle to an object on the managed heap. Which you select depends on where the object exists and who needs to use it.

There is a bit of learning involved of course, but it's surprisingly simple and MS have done a good job with the language.

As for WinForms vs WPF that's very much a depends.

Last project I was on, all the GUI tools were WinForm based; this project they are WPF based.

WinForms are fast to throw together, however WPF does allow you to do more (such as skinning) but as to if you need it only you will know.

The only issues I know about regarding D3D and WPF is that WPF can only be used to draw to D3D10 textures, not D3D11. However this is only a problem if you intend to use WPF to render INSIDE your D3D app. I don't know of any issues when it comes to having D3D rendering to a control inside a WPF app, nor would I expect there to be any.

Share this post


Link to post
Share on other sites
[quote name='phantom' timestamp='1311616423' post='4840093']
[quote name='Mauricio Cinelli' timestamp='1311613948' post='4840062']
But, C++/CLI is a whole another sintax compared to pure C++, and it would kind of act like a wrapper, but it will be like a "middle class" that interacts between the C++ code and C# code? am i right?
[/quote]

The syntax is basically the same, they just add a few extra symbols to allow the 'unmanaged' and 'managed' world to be bridged.

For example in C++ you have the pointer syntax Entity * for instances on the unmanaged heap, in C++/CLI this has been extended so that you have Entity ^ which is a pointer/handle to an object on the managed heap. Which you select depends on where the object exists and who needs to use it.

There is a bit of learning involved of course, but it's surprisingly simple and MS have done a good job with the language.

As for WinForms vs WPF that's very much a depends.

Last project I was on, all the GUI tools were WinForm based; this project they are WPF based.

WinForms are fast to throw together, however WPF does allow you to do more (such as skinning) but as to if you need it only you will know.

The only issues I know about regarding D3D and WPF is that WPF can only be used to draw to D3D10 textures, not D3D11. However this is only a problem if you intend to use WPF to render INSIDE your D3D app. I don't know of any issues when it comes to having D3D rendering to a control inside a WPF app, nor would I expect there to be any.
[/quote]

The issues that I saw related to D3D were from a earlier version of WPF and C# itself, i think it was 2 or 3, don't remember. So the problem using WPF with D3D in when i try to render using WPF? IF I have a GUI made in WPF that wraps, let's say, a game engine, I should have no problems? ( as long as the function calls are correct between C++ and C#)

Regarding the C++/CLI, I saw the ^ thing earlier and found it interesting though.

Share this post


Link to post
Share on other sites
Tools don't have to run within the game.

At one of my former companies we had tools that were written in C# that ran independently. The artist would typically be running the game, usually on a different machine or on a console dev box. Changes would be made to some art asset, and the artist would choose to send those changes to the game, which would then update itself accordingly.

Share this post


Link to post
Share on other sites
[quote name='A Brain in a Vat' timestamp='1311628556' post='4840200']
Tools don't have to run within the game.

At one of my former companies we had tools that were written in C# that ran independently. The artist would typically be running the game, usually on a different machine or on a console dev box. Changes would be made to some art asset, and the artist would choose to send those changes to the game, which would then update itself accordingly.
[/quote]

Wow, this looks awesome! and yeah, i know tools usually don't run inside the game...

Content pipeline tools are great.

But a question just popped on my head, regarding some earler answers. Ok, I do the UI in C# or whatever language, and the game engine guy makes the engine in C++, who writes the wrapper, in this case in C++/CLI? Me or the game engine guy?

Thank you for your time and answers so far

Share this post


Link to post
Share on other sites
[quote name='A Brain in a Vat' timestamp='1311628556' post='4840200']
Tools don't have to run within the game.

At one of my former companies we had tools that were written in C# that ran independently. The artist would typically be running the game, usually on a different machine or on a console dev box. Changes would be made to some art asset, and the artist would choose to send those changes to the game, which would then update itself accordingly.
[/quote]

True, this is ideal for tools like asset editors and such, but when it comes to scene editing I could see it become a real pain to separate the editor from the actual scene view, or am I not considering something?

Share this post


Link to post
Share on other sites
[quote name='Mauricio Cinelli' timestamp='1311631752' post='4840218']
But a question just popped on my head, regarding some earler answers. Ok, I do the UI in C# or whatever language, and the game engine guy makes the engine in C++, who writes the wrapper, in this case in C++/CLI? Me or the game engine guy?[/quote]


You're in a restaurant, and you order a salad. Which chef prepares it?


Share this post


Link to post
Share on other sites
[quote name='ApochPiQ' timestamp='1311633372' post='4840231']
[quote name='Mauricio Cinelli' timestamp='1311631752' post='4840218']
But a question just popped on my head, regarding some earler answers. Ok, I do the UI in C# or whatever language, and the game engine guy makes the engine in C++, who writes the wrapper, in this case in C++/CLI? Me or the game engine guy?[/quote]


You're in a restaurant, and you order a salad. Which chef prepares it?



[/quote]

I hate metaphors.... anyway, so the game engine guy makes the wrapper(hope so) . Sorry if I don't understand you right....

Share this post


Link to post
Share on other sites
Since the tools programmer should not be required to have a completely clear view of the exact details of the game engine it would only be logical that the engine programmers would create the wrapper, letting the tool programmer write a wrapper would be rather counter-productive if he/she still needs to find out how exactly the engine internals work

Share this post


Link to post
Share on other sites
[quote name='Mauricio Cinelli' timestamp='1311634551' post='4840240']
I hate metaphors.... anyway, so the game engine guy makes the wrapper(hope so) . Sorry if I don't understand you right....
[/quote]

My point was that it really depends on the restaurant you're in. It also depends on the salad.


In some teams, it makes sense for the tools guys to consume the engine as a service, and the engine guys don't touch the tools layer at all. I'd say this is actually the "better" way to do it.

In other places, the engine guys don't provide a clean interface onto their code for whatever reason, so deeper integration is necessary. In this situation, the engine guys build the wrapper.

Share this post


Link to post
Share on other sites
[quote name='Radikalizm' timestamp='1311633276' post='4840228']
True, this is ideal for tools like asset editors and such, but when it comes to scene editing I could see it become a real pain to separate the editor from the actual scene view, or am I not considering something?
[/quote]

You're not missing anything, what you say may very well be the case. This really depends on your game. For some games, having in-game tools might be very important. For others it might be a hindrance, or at least an unnecessary complication.

Share this post


Link to post
Share on other sites
[quote name='Radikalizm' timestamp='1311634994' post='4840241']
Since the tools programmer should not be required to have a completely clear view of the exact details of the game engine it would only be logical that the engine programmers would create the wrapper, letting the tool programmer write a wrapper would be rather counter-productive if he/she still needs to find out how exactly the engine internals work
[/quote]


hm.... of course! you're right.... :D

Share this post


Link to post
Share on other sites
[quote name='ApochPiQ' timestamp='1311635292' post='4840244']
[quote name='Mauricio Cinelli' timestamp='1311634551' post='4840240']
I hate metaphors.... anyway, so the game engine guy makes the wrapper(hope so) . Sorry if I don't understand you right....
[/quote]

My point was that it really depends on the restaurant you're in. It also depends on the salad.


In some teams, it makes sense for the tools guys to consume the engine as a service, and the engine guys don't touch the tools layer at all. I'd say this is actually the "better" way to do it.

In other places, the engine guys don't provide a clean interface onto their code for whatever reason, so deeper integration is necessary. In this situation, the engine guys build the wrapper.
[/quote]

That's what cause my confusion.... because it depends, but most likely, the game engine guys would do it. Thanks ApochPiQ


[quote name='A Brain in a Vat' timestamp='1311635353' post='4840245']
[quote name='Radikalizm' timestamp='1311633276' post='4840228']
True, this is ideal for tools like asset editors and such, but when it comes to scene editing I could see it become a real pain to separate the editor from the actual scene view, or am I not considering something?
[/quote]

You're not missing anything, what you say may very well be the case. This really depends on your game. For some games, having in-game tools might be very important. For others it might be a hindrance, or at least an unnecessary complication.
[/quote]

Totally agreed. Also, making separate tools depend on what you're doing. For an example, a animation format converter doesn't need to be in the editor, although it helps..

Share this post


Link to post
Share on other sites

This topic is 2324 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this