Tuesday, May 25, 2010

About C / C++ / C#: Challenge 35 is Heating Up

If you can't see this email, click here

About.com

C / C++ / C#

Fundamentals

Tips & Tools

Going Pro



From David Bolton, your Guide to C / C++ / C#
With four marked entries so far and a fifth one to mark there is still time to get your entry in for the Knight's Tour programming Challenge with a week still to run. The Interesting discovery of the Week is the DragonFireSDK which lets you develop and debug iPhone Apps on Windows. Details below. See you next week!

Location, Location, Location!
Thanks to Google releasing yet another API, software can now determine where it is physically located with a high degree of accuracy. I've mixed feelings about this as it can be used to lock software to a location "This money counting App is not permitted to run outside of Fort Knox" or "Residents of xyz country are barred from running this software".but equally it could be useful say for scavenger hunts and other uses. Originally an acquisition called Dodgeball for mobile devices, it was bought by Google in 2005 and with the increased accuracy of IP geo-location can now also be used with desktop PCs. That's not quite perfect though and requires an Internet connection, plus Google don't keep location logs so I'm not too worried by it. Latitude uses a restful architecture. Restful is a slightly vague term (ReST = Representation State Transfer) meaning you access it like a web address. The OpenRasta framework is an open source framework that is built on .NET that lets you create development of restful web sites and services. You access the Latitude API URIs in this form. https://www.googleapis.com/latitude/v1/resourceID?parameters The Developer's Guide is a pretty good way to get started. All the data from Google Latitude is returned in JavaScript Object Notation (JSON). You'll also find that json.org is a good place to find information on JSON) with 20 odd links to code in C, C++ and C# to handle JSON. It's an increasingly popular alternative to XML.

Develop iPhone Game Apps on Windows
DragonFireSDK Sample GameThis is one of those rarities where I mention a commercial product or service because I think its of interest to readers. Disclaimer: I have no involvement financial or otherwise with them. Apple's clause 3.3.1 forbids iPhone development except in C/C++ or Objective-C and binaries can't be linked against any other runtime. So if someone provided a SDK that maps C/C++ (written on a Windows PC) to Objective-C and a build service that takes your build and returns a fully compiled Mac Binary then it should be fully compliant. The proof of the pudding is that there are several Apps in the App Store built using it already. That's what DragonFireSDK does; it's not free but it's not very expensive either for something that lets you develop and debug . There's a fee of $49.95 for the Starter Kit which includes the Windows library and an iPhone Simulator for Windows. The iPhone Simulator is built into your App when developing on Windows so you can debug your code and see it run. You can later upgrade to the Ultimate (or $50 or buy it immediately) for $99.95) that lets you submit to the App Store. Test Builds cost $1 (you get 10) and each submission to the App Store costs $10. DragonFire have published their API documentation online so you can view it before buying which is very good. It certainly simplifies game development and is a C API rather than C++ specifically. The API is well thought out though focuses on games to start with so the overall functionality of the iPhone (APIs etc) that are exposed is probably only 10%-20%. I get the feeling they will be expanding it as time goes on; They have a labs section where users can try out new features before they are incorporated. The skeleton framework for all games using DragonFire is that it has to implement three functions: AppMain() for the game code initialization code, AppExit() is called when the game is terminated so the App can save state and everything etc and OnTimer() which is called 30 times/sec so is where you put logic and rendering code etc. It's effectively the game loop. The only snag of course with DragonFire is that it uses a reduced set of iPhone OS API calls. The current set of DragonFire SDK calls doesn't include any networking or URL fetching so multi player games aren't currently feasible. That said I think they've done an amazing job with it!

Programming Challenge 35 Marking Early
As there are several entries already, I thought I'd start marking them early and all three are very fast ranging from the slowest 0.00273168 by Sean Jordan to the current fastest so far from Gaurav Sarode. Mind you I haven't verified the Knight's Tours moves yet (I will!). There's plenty of time left to enter (or re-enter) but I won't be posting source code until after the competition has finished in about two weeks time. Have fun!

Code Library for C, Objective-C, C++ and C#
This is the code library with all examples, free downloads for this topic.

 


C / C++ / C# Ads
Featured Articles
Development Projects from Initial Design to Completed Code
Reviews of Software - Tools, Compilers, Editors etc
Book Reviews
Top Tools, Utilities and Resources
Glossary of Programming Terms
Never Programmed Before? Start Here

 

More from About.com

Great Stuff Kids Love
From the hottest tunes and best online videos to favorite books and classic toys, here are our top picks for the kids in your life. More >



Join About.com's User Panel!
Share your opinions and help us make About.com more relevant, informative and enjoyable to use. More>




This newsletter is written by:
David Bolton
C / C++ / C# Guide
Email Me | My Blog | My Forum
 
Sign up for more free newsletters on your favorite topics
You are receiving this newsletter because you subscribed to the About C / C++ / C# newsletter. If you wish to change your email address or unsubscribe, please click here.

About respects your privacy: Our Privacy Policy

Contact Information:
249 West 17th Street
New York, NY, 10011

© 2010 About.com
 


Must Reads
Programming Challenges
About C, C++ and C#
C++ for Beginners
C++ Programming
Intro to OOP

Advertisement

No comments: