Jump to content
  • Advertisement
Sign in to follow this  
cardician

Question about C# components for game

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

Hello all.

First a minor bit of background. I'm not a new developer, have some programming experience, but not really any in the gaming arena. Recently I've had some free time and decided to try and expand my knowledge and hopefully increase my skills. I started making a game based on a board game I like called Zombies!!! I'm not making this game for profit or probably even to ever see the light of day, just to gain experience. So when deciding what to write the game in, I decided to go with C# because of how easily visual studio makes creating windows form guis. This isn't a graphically intense game, so I'm not using full screen 2d graphics stuff or anything like that. Just some buttons on a form basically.

So to my question. How do people think the best way to display the map tiles would be? I've reached a stand still because I can't figure out the best component to use to display them. Basically what I want is some sort of grid like component that I can display graphics on. Maybe a bit of explanation about the game would help. Zombies is a tile based board game. So the game starts with one 3x3 square tile placed on a table. Characters start in the center square of that tile. Each turn, players draw one card from a stack of 3x3 tiles and add them to the game board. There are some rules on how new tiles can be added of course, so they can't just go anywhere. So I'm trying to figure out the best way to translate this to some sort of form component, if that makes sense. None of the normal components seem appropriate though. Some sort of grid based component that I can then fit the 3x3 images into would be perfect since I need to track each of the nine squares to know what lay within them. Is there anything like that? Am I completely thinking about this in the wrong way?

I suppose since I'm using C# I should just look into using the XNA framework and making the game more graphical based. It's just that the only real graphics needed are the map aspect so it seemed like overkill to me. Anyway, I welcome the opinion of those more knowledgeable than I so please feel free to chime in with whatever. Thank you very much.

Share this post


Link to post
Share on other sites
Advertisement
Hello cardician,

if you are happy to make this game with WPF than you should have a look at the Grid class. There are some variants out there so you might find something really close to what you need.

MSDN

XNA would be a different way to approach the problem. But as you are saying, that you are doing this game to learn something new, i would recommend XNA. :)

--GWDev

Share this post


Link to post
Share on other sites
Thanks very much for your reply. I will definitely look into the Grid class and see if I can figure out how to make that work.

I know, I probably should be looking at XNA and I actually do intend to move on to that. It just seemed overkill for an app that has little need for graphics.

Share this post


Link to post
Share on other sites
Another appoach could be to use the TableLayoutPanel component.

If you give it 3 rows and 3 columns (or more if you need it to grow later on), and add a PictureBox in each cell...

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!