Sign in to follow this  

[.net] Putting the graphics into a windows form in their own frame?

This topic is 4839 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'm creating a 2d tile based game. What I'm attempting to achieve is the buttons (standard windows forms) on the bottom and left, and the rest to be a frame with their own scroll bars. In this frame, I just plan to display tiled image files. If I have not explained this well enough, take a look at freeciv (http://www.freeciv.org). What would be the best way to do this? Should MDX be considered at all? Or will GDI+ be enough? And is it possible to use MDX for this? The reason I'm considering MDX is because I may switch to a 3d terrain (like civ 3) in a later version. Thanks. -Nick

Share this post


Link to post
Share on other sites
It is certainly possible to do this in GDI+ or MDX - I guess the question is which is more appropriate. This really depends on three things, how comfortable your are with the API, how complex the game is going to be, and the target platform spec (i.e. how powerful is the machine).

Personally, I would go with MDX - its not too hard to do a tile based game in Direct3D. GDI+ on the other hand is excellent for what it is designed for, but that was not really games, and certainly wont be appropriate if you do wish to change to a 3D terrain at some stage.

I once wrote a tile based RPG in C++/Win32/GDI, it was quite easy to do, but the biggest problem I had was performance, especially if you needed to draw a lot of fonts, and I don't believe GDI+ has any significant performance boosts over GDI.

Share this post


Link to post
Share on other sites
Yeah, go with MDX, its pretty easy to set up, especially if you are just doing windowed mode. You can get away with GDI if its turn based but for real-time or even turn based with a lot of animation/effects you need MDX. MDX may be more work in the beginning but it pays off in the long run.

Just a suggestion but you could set it up with a multiple window interface. Have a main window that contains several child windows. A window for the map, one for chat, another for command buttons, etc. That way people can easily position them however they want. Although if you really want to you can use MDX to draw onto a picturebox or something (i think, im not 100%). But it is a lot more common to have the graphics take up the whole window.

Share this post


Link to post
Share on other sites
Absolutely! As long as it inherits from Control (they all do) it can be done!

Mind that you shouldn't put to many things on the desktop/form if you want a good frame rate because the paint events will take a long time.

Cheers

Share this post


Link to post
Share on other sites

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