Tools | Bookmark & Share | Make MrWhy My Homepage
MrWhy.com
Go
MrWhy.com » Videos » Programming Robotron in C# part 4
Programming Robotron in C# part 4
Programming Robotron in C# part 4
Report
Programming Robotron in C# part 4
I'm sure you can see what's been added here! Yay! We have a player! Surprisingly the player movement and firing code was easy as pie to implement. Looks good eh? I dumped DarkGDK's frame-rate code (by turning Sync OFF) and wrote my own timing algorithm which is far, far more accurate - I want 60FPS, not the 55 or 65 that DarkGDK seems to give me. I haven't "done" collision detection yet because I'm thinking of the best way to implement pixel-perfect image collision. BlitzATron's (A Blitz Basic remake) collision detection was a bit off and I don't want this to go the same way. DarkGDK doesn't have image collision detection, so I have to write my own and it will probably be very, very, VERY slow... unpack image to memblock, get pixel value from image A, test for pixel collision in image B at position X, Y... repeat. Yuk!!! Anyway before I can get round to that my OCD is fretting over the prettiness of the code and its legibility (I plan to give the code away for a very very small fee - or maybe zilch - when I'm done so other people can learn from it. What do you think? A good idea? Or crap?) I'm seeing flaws in the code such as hard coded values that should be in constants or registry keys/ a .config file, and there's a bit of duplication in code too. Thats what happens folks when you don't design your program first and just jump right in! Just as well Visual Studio 2008 allows you to refactor quickly, because if I was back in the Turbo Pascal days I would be spending all day renaming variables and methods. I can definitely say I'm happy with how this project is going though.
Channel: YouTube
Category: Science
Video Length: 44
Date Found: February 08, 2008
Date Produced:
View Count: 30
 
MrWhy.com Special Offers
1
2
3
4
5
 
About Us: About MrWhy.com | Advertise on MrWhy.com | Contact MrWhy.com | Privacy Policy | MrWhy.com Partners
Answers: Questions and Answers | Browse by Category
Comparison Shopping: Comparison Shopping | Browse by Category | Top Searches
Shop eBay: Shop eBay | Browse by Category
Shop Amazon: Shop Amazon | Browse by Category
Videos: Video Search | Browse by Category
Web Search: Web Search | Browse by Searches
Copyright © 2011 MrWhy.com. All rights reserved.