What to use: GDI+ or standard vb.net?

03-07-2006, 04:16 PM
Hi, I just started a 14 week university project where I am required to build an interactive game. I wanted to ask for some advice regarding weather to use the GDI+ library or not. Perhaps if I outline what I want my game to do the choice may become obvious....

Game Brief:

The game is a skater-hockey (wikipedia skater-hockey (http://en.wikipedia.org/wiki/Inline_hockey)) style game. The view will be top down, so ill plan to have top-down images only of players, the ball and goals. I want players to be able to "push" the ball around, shoot and possibly even pass to fellow players whilst being able to move (pass, move, shoot). Goals are scored by putting the ball in the open net (the goal keeper has been pulled!).

I'm not after code solutions, just peoples opinion of what would be the best method of creating this game. So far ive been working with picture boxes and timers for my early tests, though GDI+ sounds like a better option, but is it really necessary?

With regards to player-count and moving objects on the screen, I plan to have 2 or 3 players per team (2 teams), plus a ball (not sure if picture boxes or GDI+ have strengths/weaknesses when handling multiple images moving in different directions).

Anyway, I hope Iíve made it clear with regards what i'm asking here. Any comments are much appreciated!

Thanks, Alex

03-07-2006, 06:35 PM
GDI+ would be definitely better as far as having the game feel more in your control.

With lots of pictureboxes you'll probably end up with some nasty flickering, but tends to be easier as you don't worry about your drawing (which is why you get flickering).

03-08-2006, 12:57 AM
So can GDI+ handle images? I.E, can i define a player as a picture, and assign some other properties to him? Then i could move the player using GDI+, and the player would be represented with a picture. Perhaps its just me not understanding GDI+ thats the real problem here :)

03-08-2006, 06:58 PM
To experiment and get a feel for GDI+, go to your form's Paint event. Copy this code:

e.Graphics.FillEllipse(Brushes.AliceBlue, 10, 10, 200, 200)
e.Graphics.DrawLine(Pens.Black, 10, 10, 200, 200)

Pretty easy. The Graphics object also has DrawImage method which will do what you need.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum