Tuesday, March 30, 2010

About C / C++ / C#: Challenge 34 Published

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#
There's still time to get your entries in for Challenge 33 as I won't be marking it until next Monday, April 5. Challenge 34 has now been published and asks you to move numbers on a 10 x 10 grid to form a straight line. Details below. This week, starting today I'm publishing "Ways to make money programming", a blog post each day for a week on a different aspect of programming for money. If I've missed your favorite tell me! Email to cplus.guide@about.com. Have a profitable week!

Oolite - Open Source Elite Clone
Screen shot of ooliteAfter mentioning NAEV last week, I came across OOlite which is a cross platform clone of the original Elite. It's accurate down to the ships, the commander's name and even the Blue Danube music! If you don't "get" the ship docking to the theme of the Blue Danube, watch the film 2001 if you get a chance. it's a genuine Sci-Fi film cliche! Using open source components such as SDL, zlib, jpeg,libpng, libogg etc, the binaries plus resources only add up to 30MB. If you want to try playing with the sources of a pretty simple game this is a good starting point.

Programming Challenge 34 - Complete Straight Lines
Just a few days to get your entry for Challenge 33 in with a slightly stretched deadline now of April 5th as it's a holiday weekend. Meanwhile the new challenge is live and it's about a simple board board game on a 10 x 10 grid. Each cell has a random digit 0-3 and there are 25 of each digit. After rolling a dice you get to make 1-4 moves swapping the numbers between adjacent cells either diagonally or laterally (horizontal or vertical) according to the dice roll. The point is to make the moves so you end up with a straight line of 10 digits all the same (which digit doesn't matter) running vertically, horizontally or diagonally. That's it. Full instructions in the challenge below.

OpenGL Reaches 4.0 + OpenTK
Currently only supported by one set of graphics cards, OpenGL reached 4.0 about two weeks ago. It's one of a set of open APIs that are published by the Khronos Group, a consortium of about 100 member groups.

Given my past Windows centric view of the world, I've been more into the DirectX world as espoused by Microsoft but with non Microsoft mobile devices such as the iPhone having an embedded version of OpenGL (OpenGL ES), I've been looking more in this direction. OpenGL lets you render graphic scenes in code. There's also a high level shading language GLSL that is C/C++ like for coding shaders. Microsoft have their own HLSL language for Direct3D. If you're a .NET or Mono C# developer interested in OpenGL, OpenGL ES, OpenCL (Computation) and OpenAL (Audio Library) there is an open source C# toolkit that you might find interesting. It's currently at release candidate 1 so not far off the final version 1.0 release. It also includes a lot of extra stuff such as GameWindow, GlWidgets, 32 and 64 bit, 3D math toolkit, and several APIs for Input and Display.


Code Library for C, C++ and C#
The Code Library with source code for all examples and 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

 

More from About.com

Disney Trip Planner
Everything you need to plan the perfect Disney vacation -- from when to go and what to do, to saving money and picking a hotel. More >

Join About.com's User Panel!
Share your opinions and help us make 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

Tuesday, March 23, 2010

About C / C++ / C#: Interesting Algorithm - Darts Scoring

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#
Well I'm back from my 7 day vacation in the Middle East and raring to go. I'm pleased to announce the first iPhone tutorial "My First iPhone App" has now been published, complete with source code. The details are below. BTW, if you're new to Mac from Windows, you can gain enormous productivity simply by going into System Preferences/Mouse and enabling the secondary button for all those right click menus etc. Have a Great Week!

My First iPhone App Tutorial Published
iPhone Example AppIt's a very simple App but I'm pleased with it. There's quite a learning curve towards mastery of Xcode, Objective-C, the UIKit and other frameworks so this is just the first step on a long journey and a number of tutorials to follow. The screen shots are from the simulator running on my Mac Mini. The source code and the graphic used are included in the tutorial as a download. I'll be publishing the next C# tutorial in a few days then working on the next iPhone tutorial on property, views and memory management. Hopefully by then the iPad will be out. Remember that all iPhone tutorials also apply to iPod Touch and iPad though inevitably there will be iPad specific tutorials. I've created a new section for the iPhone tutorials below. Oh and before anyone asks, I'm sorry but I'm not available for programming your project!

Darts Problem Revisisted
Reader Ben Jackson wrote an interesting email on calculating the darts scoring problem (lowest score that you can't get with three darts) and included a 170 line C++ program to solve it. With his permission, I've included it here as a download. It uses three methods to compute which scores are impossible for the general case of throwing D darts at a dart board with W wedges and including doubles and trebles. 0, (a miss), 25 and 50 can be switched on via some macros. I've also added it as a permanent link below.

NAEV - Open Source Space Trading Game in C
NAEV ScreenshotBack in 1984 the big game release was Elite, a space trading and combat game that well deserved its accolades and gave it a place in computer gaming history. I played it a lot on the BBC so have a soft spot for this type of game. It's not the most popular game genre but the space trading and combat genre has had a few well known games such as Wing Commander:Privateer, Escape Velocity, and Elite in various other versions. In fact 26 years on from the original, Elite 4 is currently under development by a team including one of the original developers David Braben. But as always its the open source versions that interest me. Written in C, with scripting in Lua, NAEV is an open source version of Escape Velocity and is cross-platform for Windows, Mac and Linux. The initials are Not Another Escape Velocity. There's also a Wikipedia article about the game though curiously that is marked for deletion.

Never Programmed Before? Start Here
For the complete novice to computer programming. Learn how a computer works and how to control it by writing computer programs.

 


C / C++ / C# Ads
Featured Articles
Other Blogs You might find Interesting
Welcome to the C Area with Articles about C Programming
Welcome to the C++ Area with Articles about C++ Development
Welcome to the C Sharp Area with Articles about C Sharp Development
Learn about Commercial Software Development
All about Games Programming

 

More from About.com

Disney Trip Planner
Everything you need to plan the perfect Disney vacation -- from when to go and what to do, to saving money and picking a hotel. More >

Join About.com's User Panel!
Share your opinions and help us make 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

Tuesday, March 16, 2010

About C / C++ / C#: A True Techy Question

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#

A True Techy Question
If you are up on your history of the web then you may know the meaning of the word Mozilla without searching on the web. It's real easy to... Read more

Wiki On a Stick (WOAS) Revisted
I started using WOAS editable portable single file wiki (built from html, css and JavaScript) back when I changed jobs in October 2007 and have now built it up to... Read more

Sparkling your Windows Apps
If you're a Mac developer you may already know about Sparkle, a framework by Andy Matuschak that easily lets you keep your applications uptodate. Now there's WinSparkle, an open source... Read more

Code Library for C, C++ and C#
The Code Library with source code for all examples and free downloads for this topic.

 


C / C++ / C# Ads
More about C / C++ / C#
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

 

More from About.com

Share Your Dog's Tale
Share your tale of what it's like to live with a specific breed of dog - or even a mutt. Your submission will help prospective owners decide what dog breed is right for them. More >

Reader's Choice Tech Awards
Learn what apps, smartphones, email clients, and more were chosen by About.com readers as their favorites. 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