Advertisement

Advanced Game Programming book not working

Started by December 07, 2016 05:59 AM
6 comments, last by WozNZ 7 years, 11 months ago

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?

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.

Advertisement

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.

They did not change the syntax much, they have a lot of additions.

Inspect what kind of .Net version and API version.

If that's C# I suspect you're reading about XNA or DirectX Binding/Direct API.

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.

Developer with a bit of Kickstarter and business experience.

YouTube Channel: Hostile Viking Studio
Twitter: @Precursors_Dawn

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?

Advertisement

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.

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.

This topic is closed to new replies.

Advertisement