Sign in to follow this  
cratty79

Advanced Game Programming book not working

Recommended Posts

My dad's GF bought me a book from 2009 (Check topic title for more info) and it doesn't work for me since I don't have the 2008 version of C#. I know they changed the syntax, but I don't know what syntax replaces what. Could anyone please help me on this one?

Share this post


Link to post
Share on other sites

Microsoft has their old free Express Edition installation images on their web site.  Direct link here since the main page links to the 2015 versions.

 

The disk image has the express edition (free version) of Visual C# 2008 and Visual C++ 2008, among other things.

Share this post


Link to post
Share on other sites

Alternatively, tell us exactly what "doesn't work for me" means (i.e. what are you doing, how does it respond, and how does that differ from your expectations), and hopefully we can help you work through it.

 

100% agree! Saying something doesn't work without providing some direction to help is going to draw a fair number of responses, but only in the same way throwing darts into a room where someone said there was a dartboard would.

Share this post


Link to post
Share on other sites

The book probably targets C#3, that said the project I work on during during my day job started life in C#2 and constantly growing and we now use C#6 on all the new code but there is lots of old code that still compiles just fine.

 

What has changed is all the language features that bring new ways of working and thinking about code, so if a library you are using is post C#3 then it might use syntax you have not encountered in the book. C#6 compilers can still compile C#1 code though.

 

What is the code syntax causing the issue?

 

Share this post


Link to post
Share on other sites

Well, the problem is the Bitmap, Graphics, and other things, but I am getting the C# 2008 to fix it. Thanks, frob, for finding the .iso and putting it here. Also, I have VS 2015, and some syntax was removed there. I have v2.0.5 through v4.0 in the NET framework. I don't know what API you are talking about, WoopsASword, and I was trying to do the first activity in the book, the 2D Car Physics.

Share this post


Link to post
Share on other sites

Well, the problem is the Bitmap, Graphics, and other things, but I am getting the C# 2008 to fix it. Thanks, frob, for finding the .iso and putting it here. Also, I have VS 2015, and some syntax was removed there. I have v2.0.5 through v4.0 in the NET framework. I don't know what API you are talking about, WoopsASword, and I was trying to do the first activity in the book, the 2D Car Physics.

 

What syntax has been removed? I am sat on 1/2 million lines of code, some dating back to 2008, and all still compiles.

 

UPDATED: They did make one change that is semantic and subtle. It is relates to the scope of variable in for loops. In that in older versions the for loop variable had scope in the function and that leads to subtle bugs if you captured it via a closure in the loop. This meant before the change you had to capture the variable in a local inside the loop scope to make it safe to close over.

 

This is esoteric stuff though and unless you are a heavy lambda user, which I am, it has no impact on older code.

Edited by WozNZ

Share this post


Link to post
Share on other sites

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