Sign in to follow this  

Check my work

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

Hi. I am trying to learn C#, I am doing this tutorial: http://msdn.microsoft.com/coding4fun/gamedevelopment/beginning/default.aspx I did what was on that page and I would like someone to check my work and tell me if I am right so far. using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using Microsoft.Samples.DirectX.UtilityToolkit; private double deltaTime; namespace BattleTank2005 { public partial class GameEngine : Form { public GameEngine() { InitializeComponent(); this.Setstyle(Controlstyles.AllPaintingInWmPaint | Controlstyles.Opaque, true); } private void GameEngine_Load(object sender, EventArgs e) { } } } protected override void OnPaint(PaintEventArgs e) deltaTime = FrameworkTimer.GetElapsedTime(); { FrameworkTimer.Start(); this.Invalidate(); } I'm sorry to ask for this but having no prior experience in c# before, I don't know if it is right.

Share this post


Link to post
Share on other sites
I take it you're using the Battle Tank 2005 Direct X tutorial (didn't go into the link). Honestly if you are just starting the tutorial and you're not sure if your setting it all up right you might want to go back the basics for a little while. I realize with a tutorial for something like Direct X will be hard at first - When I got the SDK I tried to do that first too, heh - but you need to start smaller. If you feel you know basics well try to do the more basic tutorials like drawing a triangle out of certain points and stuff. Trust me that will make it ten times easier and make it take a lot less time in the end.

Sorry for the block of rambling on :P

Share this post


Link to post
Share on other sites
I have to agree. Starting with something extensive is a painful experience. Your best bet is to go with anything that gives instant gratification. I know that sounds wierd, but actually seeing results on screen goes a long ways toward figuring out what you are doing. I would recommend starting with either something that had full source code, then tweak values and see what the result is. Or start with something simple and work your way up.

Share this post


Link to post
Share on other sites
If you have no prior experience in C# (or in similar programming languages), this tutorial is way too advanced for you. Start with an introduction to C# tutorial so that you can understand how the language works. Then, you'll be able to figure out whether this code is correct or not on your own.

Share this post


Link to post
Share on other sites

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