Any code samples open-source-engines, or open source hex tile games, references for writing Hex Tile based Games? - game-engine

Using other questions on here I found Amit's Page on Games including a section on Hex Tiles which also links to a game coding wiki here.
I am looking for suggestions:
(a) libraries, engines or code samples in any language. I have found one in python, PGU+pygame, but looking for more.
(b) open source hex-tile tactics or strategy games.
Because google can find things for me, what I'm hoping is that you have actually used one. So if you googled and then posted, then this is nothing better than let-me-google-that-for you. Much appreciated if (i) you have used it, (ii) seriously, any language at all is okay, C/C++, python, java, flash/flex, whatever.
Related question and another related question but .net

Battle For Wesnoth is a complete, open-source, turn-based strategy hex-based game. Its written in C++. Quite a good game too.
I'm sure there would be something valuable in there, although I've only have a brief browse of the source myself.

I used PGU a number of years ago to make a hex based game for PyWeek, you can take a look at the code if you want to. :)
http://www.pyweek.org/e/PySwec/
I've got a more updated version at home which is quite a bit better but unless you actually want to play the game you should be fine with that. :)

Based on another question here on stackoverflow, there is XConq, an open source turn based tile game.

Related

Begin game programming basics [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Closed 6 years ago.
Locked. This question and its answers are locked because the question is off-topic but has historical significance. It is not currently accepting new answers or interactions.
My 11 year old kid brother wants to learn to program games. He has never programmed but would like to learn programming. His interest lies with games and game programming and he understands that it can be difficult but he wants to do that. So, obviously, I turned to SO folks to know what you feel on how he should go about it. Remember, please suggest on
Areas that beginners can choose,
how to begin in that area,
what to read in the beginning,
initial languages in the beginning etc.
Once the beginning part is taken care of, you may also suggest the intermediate and advanced stuff but this question is about very beginning level. If there are areas like Web games Vs. console games Vs generic computer games, then please advice on the areas. As I said he has never programmed, he might want to try all the areas and choose the one he likes the best. I hope this is not too much to ask for someone who is in this field but if this question is huge, please advice on how to break it into multiple questions. ~Thanks.
I started my programming career writing games when I was 15 and it was a lot of fun (even though I wrestled with C++ for 3 years just because "that's what's used for writing games"). My two cents:
Start with a programming language that is easy to use (NOT C or C++)
Get a beginners book for that programming language (not directed at games)
Decide on some API or environment that provides what's needed for writing games. I started out by doing snake, space invaders etc in the console, but any 2D-environment will do (stay way from 3D for as long as you can; there are much more important things to learn first). SDL/GLUT for OpenGL has bindings in almost any language. Pygame for Python looks promising too. Using HTML5's canvas-element, you could even write the programs in the browser using JavaScript. Im not sure what's best these days, but there you have some suggestions.
Find a community for inspiration and help when stuck. I used gamedev.net. Since we're on stackoverflow, gamedev.stackexchange.com should also be a natural choice :)
Start small. Very small. I mean really tiny. Then take small steps to new challenges. Please don't write an MMORPG.
The game design and graphics are fun, but focus on the programming (for now at least). When you've written a simple game, learn how to do the same thing better.
Set a goal. Imagine the game that you'd want to make. Don't try to make that one immediately, but make sure that each new thing you learn or make takes you one step closer. Don't learn what you don't need so to speak (there's simply too much too learn).
I wish you and your brother the best of luck, I never regret going down the path he's about to take!
For a beginning game developing enthousiast I think you can't go wrong with the combination Python + Pygame. Python is a great, elegant (and easy to learn) all-round language and lots of great tutorials are available for Pygame which explain the basics of (mostly) 2D game programming.
There's this post on Gamedev stackexchange where the poster is in literally the same position.
Quoting my answer from there:
I'm also 15, so I guess that could help? :P
I've recently started learning Python
(been doing C++ for a year or so), and
I'm finding it much easier to learn
than C++. There's a lot less pitfalls,
and you need little code to get
something on the screen - what I find
makes you want to continue.
And there's wrappers like Pygame and
Pyglet over SDL/OpenGL for the
graphics side.
And before he starts making simple
games, I would advise learning a
language for at least a couple of
months. (Of course, text based games
like guess the number and hangman are
good exercises during this time)
And for what to read; I can advise Invent With Python. It goes from learning the language in a very gamedev way - which is a good step to making sure he stays interested; I doubt many kids his age are going to want to learn all about variables and loops, moreso being able to make a game - all the way to seamlessly introducting PyGame and graphics.
It could take some time until he can program a proper game...
But as I see it, he should start with Java as it is easy to learn and good for basic games.
Starting out he wouldn't be able to do much more than a guessing game, but he shouldn't get frustrated, this will take time.
I think you should buy him a book on java, and start from the basics.
You would get many different answers on this one as it is mostly personal opinion...
Teach him the basics of programming: variables, declarations, properties, methods, arguments, classes, arrays, loops. I suggest C# as a starting language, it seems simpler than C or C++ to start with, in my opinion. Once he understands those concepts it shouldn't be extremely hard for him to jump in and follow some XNA tutorials on a simple game like pong or something.
Game Development, part of the Stack Exchange, is a great resource for these types of things. It's loaded with posts like this one.
How about instead of forcing him to learn a language first, get him involved in using a framework where he can readily see results to maintain an interest. Something along the lines of RPGMaker could be sufficient.
My reasoning for this would be that, yes, you want him to learn the basics of making games and introduce programming as well, but you don't want to burn him out on the formalities of a language.
If he is 14, then he is of high school age (assuming US based...), and there is a good chance that there are programming courses available to him there. Let him whet his teeth on those to grind out the difficulties of introducing programming, and then once he is interested in expanding beyond the bounds of the toolset introduce him to the answers posted by the other users.
My two cents...I've seen kids give up on programming before because they jumped right into game making and quickly got frustrated...
In the beginning, make sure you keep it fun. Try mocking old games like 1-stage of contra or air hockey. And use a programming language with easy implementation of timer. Because timers, I think are the easiest way to show some visible effects. I would recommend visual basic or objective-c (I know many people won't agree, BUT it is that damn easy with the power of Xcode). Thumbs up ! Have fun.
I agree with ChristopheD about Python and Pygame. When it comes to languages Python is great for beginners because it is very high level therefore so easier to understand and the syntax is clean and simple. And Pygame is a great library for learning game programming.
Eventually he'll want to move into C++, which as I understand is the go to language for game development. But Python and Pygame would be a better start, especially for an 11 year old.
A good series of easy to read online books are the following three:
http://greenteapress.com/thinkpython/thinkpython.html to learn Python
http://inventwithpython.com/ this site has two books, what to make games in plain Python and the other to make games using the Pygame library for Python. Once he gets through these three books he should be able to start making his own games in Python using Pygame and then eventually move on to more serious game development langauges/tools.
Write some simple scenarios for a game such as Wesnoth is maybe a good start.
Learning basis of programming is also important. A langage such as python is probably a good start.
The language is clear and easy to learn and teach.
And it is very extentable.
This is a -very basic- game source code (Butterfly adventure 1.0) made with javascript to start learn programming. Only basic codes (variable, if, switch, function, event, etc.) used.
It may be useful to start learning game development.
Play the game link
Source code link
Video tutorials (Only in Turkish) link
Screenshot
Have fun.
IMHO he should start learning C.
then switch to OpenGL later once he has the grip of basic C constructs.

How do I start off with a VB.net 2D game?

I'm trying to make a 2D game in VB. As a first step I'm going to make a playing field (a form) on which I will put a character. The character should be able to move up, down, left, and right when you press the arrow keys. How do I start off with this and what should I start off with learning?
I already know the basics in how to make normal apps with buttons, text boxes, labels and so on but I don't quite get how I should start off with something like this.
Also I wonder about XNA and VB.Net. Can you use them together or is XNA only for C#? I found some stuff while googling suggesting that XNA for VB.Net had been released.
I would personally use XNA for a game. XNA is specifically built for the purpose of building games, they have amazing tutorials on how to create 2d and 3d games, and it is free to download XNA.
Yes they do work together. There was a pretty sweet site I came across:
http://www.alanphipps.com/VisualBasicdotNET-XNA.html (Edited: This link is dead now)
which I think will help you alot. As for learning, I would look into how to program in c#, I find that it is much easier to program with, and has a lot more people who use it to help you. If you dont know how to program in object oriented languages, I would first learn that, maybe with another language just so you get the hang of it, c++ and java are good starter languages for that. In terms of creating games, there is a wealth of information on that, and it would be especially helpful to review the XNA tutorials page:
http://create.msdn.com/en-US/
http://www.xnadevelopment.com/tutorials.shtml
I hope this helps! Good luck and remember to have fun!

How to learn C and Objective-C [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
I am learning programming. I plan on learning C and Objective-C this summer. I bought the C for Dummies book but it is a complete waste of time. It's way too many pages! Are there any good books I should read? Or should I just learn C from websites? What would be the fastest way because I really want to learn it fast and start learning Objective-C too.
Thank you
Also, how long does it take to learn C? Until I move to Objective-C 2.0
There's no need to rush. Learn at your own pace and find your optimal way of learning.
If reading is your thing, then try to read some books and take it slowly.
If you find a concept you grasp, practice. If you find a concept that you don't quite get, experiment. Once you think you understand the concept, try re-reading the material to see if you understand it the second time.
I found out that I wasn't really good at learning though books -- I generally had to get the first kick-start with a structured lessons in a classroom. A semester course at a community college on Java was able to nudge in the direction of being able to begin effectively learning on my own. See if there are any programming courses offered in your school.
(Although at your age it may be a little bit difficult to find -- I didn't get any formal classes until community college -- my high school did not offer any programming courses.)
One of the things to be careful of is learning it the wrong way.
Rushing through material, or reading poorly written, inaccurate learning material can lead to a situation where you'll need to "un-learn" the concepts and re-learn it the right way.
In that respect, the K&R book (The C Programming Language by Kernighan and Ritchie) would be the "right way" of learning, but it's not a very approachable book. That isn't to say that it is the definitive book on C -- but even after programming in C for a couple years, I still try to take read it a bite-size at a time.
But then again, I can't really think of other "great" sources for learning C. My recommendation would be to take a look at K&R and work on a few pages at a time. Don't think about reading it like a regular book -- read one section, try it out. Do it little-by-little. Once again, don't rush. Work at your own speed.
And be sure to write code. Without seeing it working, it's going to be difficult to learn programming. And don't have huge expectations at first, as most of learning C at the beginning will involve programs that deal with only text.
Once you get a handle of things, try to write clean code that is readable by others -- that should be a motivation to write clean and clear code, and it will force you to think harder about what you're doing.
It's going to be a long adventure, so take it a step at a time. Good luck!
For learning C, I highly recommend Learn C on the Mac, by Dave Mark. Not only is it aimed at beginners, but it also teaches you a lot about the important fundamentals of programming and computer science (e.g. data structures, recursion, etc.). It's very accessible, well-written, and easy to read. Plus, I found the examples engaging and interesting to work with. After that, if you really want to solidify your foundations in C, I'd recommend trying to moving on to The C Programming Language. It's a challenging book, so take it slowly. If you find yourself having too much trouble with it, I'd say you can just skip to Objective-C, and then come back to The C Programming Language later, once you've gained more familiarity with programming in general.
A lot of people will probably recommend The C Programming Language (a.k.a. "K&R") as your first book to read on C. No doubt it is a very well-written C book (and it's short too—only around 200 pages), but I'd say it'd be a little intimidating as a 12-year-old's first exposure to C: it's pretty dense and hardcore. You can tell that it's definitely aimed at an older audience with a strong background in computers/engineering. But nevertheless, if you already know the basics of programming, reading K&R will give you invaluable insight and understanding of C. You should definitely read it at some point in your programming endeavors.
Anyways, for Objective-C, if there's only one book I could recommend, it would most definitely be Cocoa Programming for Mac OS X, by Aaron Hillegass. It's really not that long (~400 pages or so, although I'd reckon that a lot of that is due to the number of illustrations in the book), and you can get some pretty cool projects up and running in an afternoon. It's very clear and easy to read, the examples are practical and interesting to follow, but most importantly, it's got this right blend of not being too intimidating while still managing to provide you with solid information. Plus, it'll teach you more than just Objective-C: I found that I had learned some very useful design patterns, for example, by learning how some of the components of Cocoa worked.
When I look at the title of this question, I am guessing you are 12.
I started programming when I was 13 (I am now 14).
I found that learning depends on what kind of a learner you are!
I hate reading, I have the attention span of a moth and I learn best from videos. Therefor, I am a "visual learner". Try to find out what kind of "learner" you are, then do it that way. Remember, the easiest way is the fastest.
PS, here is a little tip. It may be frustrating (aseptically at our age). If you get frustrated, just put it down for like 10 minutes. Then come back and do research on what your learning. Programming WILL get very frustrating at times.
EDIT:
By the way, I like to learn through video :p
Stanford University posts online the lectures, class notes, and assignments for CS193P (an iPhone development class). If you don't know C or Objective-C at all, it might be tough, but I highly recommend this if you intend to do iPhone development.
I think I've read every Cocoa and Objective-C book out there, and most enjoyed Aaron Hillegass' Cocoa Programming for Mac OS X.
I would take a look at The C Programming Language (K&R C). It's much less than 1000 pages and I think you'll find it well worth your while. As htw said, books do serve a purpose in that they provide a thorough and structured approach. K&R C in particular will give you real insight directly from the creators of C.
That's not to say you shouldn't Google things, read open source code, write little practice programs, etc. It all helps. Just remember to be patient. There's a lot out there.
Checkout out http://www.cprogramming.com/ or and online K&R type book
Don't be impatient; take your time. Follow tutorials, dissect short snippets of code, you'll get the hang of the language. Most importantly, write code yourself and learn from your bugs/errors.And follow Stack Overflow ;)
I've been where you are. It wasn't fun. This is what saved me:
(Apparently new users aren't allowed to post hyperlinks, so google for "steve summit C", use either the first or the third link, and then click "introductory C programming class notes")
It's a C class by a guy named Steve Summit. Super easy to follow, much easier than K&R, imo.
Also, it's free, and there aren't any ads. I loved it. It's how I learned C. I hope it'll do the same for you.
There is nothing so educational as a piece of code you can run and tweak. Code examples in books can be really bland and not very applicable. The exception to this rule was the Perl Cookbook which is jammed packed with really useful little snippets for your perl programs.
The topics (or 'idioms') in it were so useful and so applicable across languages that some smart folks have taken to replicating them in different languages. Each has a varied level of completeness, but it's interesting to see how different languages do the same things.
Take a look here http://pleac.sourceforge.net/ for nuggets of programming wisdom that you can shake a stick at. At the very least its interesting to see how simple things written in one language require reams of code in another.
Were I starting to learn programming again I would probably pick something easy and forgiving, a dynamic language, like Python, Ruby etc. Once you get your head around the basics in one of these (flow control, data structures etc) it will make learning C/Objective-C so much easier. Also you'll find that you'll want to write once-off tools and scripts to help you in your Objective-C development that would be tedious and time consuming to write in C but are a matter of lines in a modern dynamic language. Never hurts to have another tool in your belt.
Good luck
Honestly, I learned Java as my first programming language (I discovered it in high school and decided programming was fun and it was what i wanted to do)
I just now picked up Obj-C in a few weeks, reading a little bit from some books, but not a whole book, and using the internet a lot if i can't figure out the syntax (format/grammar of how the program should be structured and written) for something etc.
How fast you can pick up a language depends on how much you understand the fundamentals of programming. You will only get better at it with time and practice.
If you can understand the fundamentals of programming in general then you should be able to apply it to any language, the hard part is learning and remembering the syntax of different languages. Like in Java, you don't have to do memory allocations, but in C, C++ and Obj-C you do. I've never written a C or C++ program, but now that I've learned and written some programs in Obj-C (i've been making iPhone stuff, it is fun) I'm sure I could pick up C and C++ like it's nothing.
You don't have to learn C first in order to learn Obj-C is what i'm trying to say. But it never hurts to know multiple languages.
It is all about your level of understanding how a program works, how to structure one. I love objective-C because it is Object Oriented like Java so it was easier for me to understand and learn quickly, just had to get used to some of the differences in syntax
(I'm also getting close to graduating from college now so I'm surrounded by programming stuff, from procedural languages like ada to object oriented like java, and knowing the nitty gritty behind the scenes stuff that makes a program work, so understanding and learning a new language has gotten a lot easier for me, you start seeing how they relate and don't relate and it is cool)
It is great that you are starting so young. I'm sure you'll pick up on this stuff real fast, and if it is something you really enjoy, it will be even easier.
Good Luck! and have fun! programming can be so frustrating... like, spending 3 hours debugging when you find out it was because you if statement used a grater than instead of grater than or equal too or something like that. but, once you are done with the program, it is so rewarding, and then you just want to make it better and better haha.
I dunno if this helped at all, I hope it did, somehow...
=)
the way i learned quickest was to watch short video tutorials.
If you really want to start with C, I would start by just reading the first three or so chapters of C for Dummies, just to get a feel for how the language works. After that, I recommend going through web tutorials. Good web tutorials will have short code that explain specific functions, and the like.
As a 13-year old, though, I recommend starting with PHP. It's a simpler language to learn than C, but it's based off of C, so it won't be hard to make the transition, whenever you do so.
Different people have different preferred ways of learning. You can see that in the variety of responses above.
So how do you like to learn? Do you like to sit by yourself with a book and a computer? Do you like to sit in a classroom and absorb learning? Do you prefer set exercises, or mini-projects?
When I learn new programming languages, I find it helps me if I have a small application or problem to work on. I prefer to have a problem to work on. If you have a little project of your own that you always wanted to do, use that. If not, as someone above suggested, join a robotics group. Set up a web page and write some programs to do stuff for that.
Look on the web for programming challenges. Google has a fun one every year.
If you want an idea, write a sukoku checking program. Then later, write a sudoku solver!
I like to use a variety of books, rather than just sticking to one or two of the ones suggested above. Find a book whose style you like. Try a few from the library until you find one or two that really click for you.
Personally, I like O'Reilly Publishing books for their chatty and readable style. I learnt C from Deitel, which is more of a classroom style textbook, but it has lots of examples and discussion points.
As you work through examples on your computer, you might wonder how things change if you tweak the code. I learn a lot by first running the example code suggested in a text, but then changing it to see what happens. If I get what I expect, it's a sign that my understanding is pretty good. If I get something unexpected, I try to figure out how I misunderstood what I did.
One last suggestion. Why not start with Python rather than C? I hear that a lot of schools are teaching Python to their kids. The reasons I suggest this are:
Python is pretty easy. You don't have to lay out memory, declare variables and such. No tedious bookkeeping.
Python gives you a nice growth path. You can start off just writing script style programs, using the built in types like lists and dictionaries. Then you progress to using new modules as you need them, and advance into object-oriented coding using classes. There's some functional programming stuff in there too, which you can start learning once you have the basic mechanics of the language under control.
I just love visiting new parts of python all the time.
You can get a lot done in python. It comes with a whole lot of built in modules to do almost anything you like - email, web, xml, graphics, gui, etc.
:)
When I was learning to program in C, I found that Practical C Programming was a good resource. It's a very approachable book with lots of examples.
The fastest way in my view is through learn through websites.
Set a goal of what you want to do and start a simple project
Instead of reading too many books theoretically,google what you want to know to get it instantly as you go through your project.This way you get PRACTICAL knowledge.
Watch online videos as well.Check out my question on VIDEOS here
Ask whatever you don't understand on stackoverflow. We're here to help :)
Follow these steps and I can assure you that you will be a great programmer soon!
Cheers!
With others, I highly recommend Kernighan and Ritchie—perhaps the best language book ever written. I'd also recommend that you slow down and enjoy yourself: don't be wide and shallow; start out narrow and deep. If you like programming, you will want to master the craft rather than be in a hurry. This essay by Peter Norvig explains how not to be in such a rush.
P.S. I started programming at age 12 with APL/360. I had a blast and have been doing it ever since—35 years and counting. Good luck and don't forget to have fun!
By far the best way (and usually the fastest) to learn programming is to find a good mentor. That's easier said than done. But I think you'd be surprised how many people would be willing to help you out. My advice would be just don't be afraid to ask.
If I were you I would find a local FIRST robotics team and see if you can hang out for some of the coding. Odds are you'll be working on a similar problem and will have some support from people who have a decent amount of experience. That's what I would have done, anyway.
I started learning to program in Basic in about 1981 when I was 10. Not many years later it was 6502 assembly to try to get more speed out of a 1 MHz Apple IIe clone.
Pascal was a revelation in 1988 - programming without line numbers.
Modula-2, C, Eiffel, Miranda, Haskel, and Prolog at university as well as scripting in any number of languages.
C++ professionally for about 6 years.
C#, then Java, Ruby, and now back to C# for the last 18 months.
Python somewhere along the way.
My advice, pick the language that is best suited to the problem you need to solve today.
The first problem you have is to learn the basics ie how to break down a problem and express it in a clear and concise manner. I suggest you choose something other than C. I recommend Python as the online documentation is excellent and the libraries are great and you will spend more time writing interesting code and less time trying to figure out why your code stopped due to a segmentation fault.
When you've got the basic concepts under your belt, try some assembly and learn what's going on under the hood. If nothing else, you'll learn how fast CPUs really are. C is a good step after that. I also suggest you try Java or C# before Objective-C.
As to how long before moving to Objective-C, it really depends on how talented you are. If you're really good, then once you've learnt your 3rd or 4th language you'll can be more productive than most coders within 6 weeks of starting a new language (although changing language families (ie imperative, functional, object oriented) takes longer). If you're no good then don't expect to get past the first. Hopefully you make it into the first category.
In addition to whatever books and websites you end up using, you might consider looking around your area for local support groups. Many areas have a Linux user group or a group for Java or Ruby programming. Professional programmers use these groups to help each other with their programming problems, but the groups are generally friendly to young people and beginners. Don't feel embarrassed or awkward because of your age and inexperience. Most people will admire your initiative and curiosity and be happy to help you when you run into problems.
Assuming you have some basic programming knowledge, Cocoa Dev Central have a series of articles that explain basic C then Objective-C, in a somewhat-less-than-1000-pages way..
Learn C for Cocoa, then Learn Objective-C
Shouldn't take even an hour to go through. The articles don't cover anything remotely advanced, but if you're learning ObjC to write OS X applications, the ObjC bit is basically trivial, it's Cocoa that is difficult to learn!
If you want to learn Objectif-C to create iPhone application, don't waste your time on C and learn Objectif-C now, then a book on iPhone programming. It will be more than 1000 pages but if you want to program in your life, you have to be used to read these types of book.
I created an online interactive C tutorial, you can start using it without installing an IDE.
http://www.learn-c.org

Do you think you need some simple tutorials on Microcontroller programming?

This is not 100% programming related. But I think this is somewhat useful because it is addressing a minority in the SO community.
Microcontroller programming is one of the interesting areas in programming. I saw some topic here requesting the Resources for starting / learning / discussing about PICs.
Example topic
Since I have plenty of knowledge and experiences in this area I am thinking of publishing some resources that helps a novice to learn them from the basics. It will be not just a theoretical publication and will be based on example projects. I hope to start this over a new blog + forum so the users can dynamically interact with each other. I came in to this decision because I found very small amount of Sites that a novice can start learning and work collaboratively.
What do you guys think about this? Have you ever experienced such difficulty? Do you think you can get some use of that? What are the things you like to see on the site?
I would be thankful If you are not going to close this as NPR. I just want to do some service to other microcontroller lovers :)
There are already a few such tutorials on the net (e.g. this one from SparkFun), another one might be a valuable addition, but only if it is better or different in some way.
What will you offer that is a real improvement?
Some suggestions:
Don't assume I have windows
Have some side discussion of difference between various MCU and/or supporting electronics. Discuss some of the trade offs
You'll need a pretty general tutorial to suck people in, but the real value added might be in a specialized focus after the start
Build up to something useful and/or geeky cool
A unit on component integration (i.e. I can buy a Polar style heart rate receiver, and a MCU and a USB interface. How do I get them talking to each other so I can build an exercise data logger?)
What every you do, I'm looking forward to it (just learning embedded stuff in my spare time...).
There are the excellent tutorials at www.mikrocontroller.net, but they are in German.
If you could create something similar for an English speaking community, that would be great.
Yes! The more resources out there for helping with embedded software (microcontroller programming) the better.
It can be quite daunting to start with, especially if you've only written software for PCs or similar in the past. There are lot more constraints (e.g. on RAM and code space), and a whole load of things you need to know that don't apply to non-embedded software.
As others have mentioned here, there a number of websites that cover different aspects of this; some others are OnARM, for ARM processors, the related STM32 Circle, and Jack Ganssle's articles on his website and on Embedded.com.
Though embedded systems are an enormous market (just think how many such devices there are in your house, or in your car), my impression is that there is a lot less coverage of the subject on the web - and on Stack Overflow - than for non-embedded.
So, I look forward to seeing the fruits of your labour!
Something else that's worth to take into account when targeting beginners, is to directly provide pointers to useful resources, such as suitable simulators/emulators, or even addresses/webpages where you can easily order a starter kit or even free samples of some chips.
For example, most semiconductor manufacturers provide free samples of their products, e.g. see microchip.com or atmel.com.
Ideally, an introductory course would be based on working with such a hardware simulator or emulator in the beginning, so that the project and all relevant experience may directly map onto a real device once the beginner is interested in moving his work onto a real chip, providing pointers to freely available resources, or very affordable starter kits can be very useful.
This would ensure that beginners can get started as easily and cheaply as possible.
Maybe for the different ARM7 and CortexM3...?
Here everyone asumes there is a lot of information, but it is spread all over the net and without any red line what so ever...
But if you take AVR there is quite a lot of stuff over at http://www.avrfreaks.net, and I guess that PIC has quite a lot as well.
I have written many such examples myself but they are scattered and not organised and probably rarely read (one time the folks at avrfreaks borrowed something). StackOverflow might curb this but SO could in theory be used. Ask a question about boot code for an arm whatsit, then answer your own question with example code and text on how and why it works. The SO tags would be nice in that you could do a search on "boot" "arm" "embedded" and then one on "boot" "avr" "embedded", etc and get similar example programs for different platforms.
Personally I would go more in the direction of creating an example archive of complete programs for specific microcontroller versions (in typical uses), instead of making yet another "general" tutorial. E.g. one of microcontroller x/y that enables a serial port, one that configures a few digital outputs (setting TRIS and friends), how to set up common frequency/oscillator options etc.
When I started with PIC, (very short PIC16, then PIC18 then 24F and now dspic), one of the main problems is that all the examples are either only fragments or describing very general principles.
A tutorial is no good, if it takes more skills to get the examples actually working than the tutorial teaches.
I usually couldn't find one single complete program for exactly my controller, or even for the slightly wider group (that only vary in number of pins and memory/flash).
The initial program was always the problem, but sometimes later I had the same problem (initializing a certain peripheral) all over again (e.g. the encoder) It is specially frustrating if is the first run of a new micro controller line, and you might not be 100% sure of your hardware.
Unfortunately that takes some coordination, from a forum, an user group or so, since nobody has all devices, and all variants to wire them up (e.g. different oscillator options).

Coming up to speed on the programming environment [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I'm not a full-time software guy. In fact, in the last ten years, 90 % of my work was either on the hardware or doing low-level (embedded) code.
But the other 10% involves writing shell scripts for development tools, making kernel changes to add special features, and writing GUI applications for end-users.
The problem is that I find myself facing significant holes in my knowledge, often because it's been years since I've done "X", and I've either forgotten, or the environment has changed.
Every so often, there are threads on TheDailyWTF.com along the lines of "WTF: the guy spent all day writing tons of code, when he could have called foobar() in library baz". I've been there myself, because I don't remember much beyond the #include <stdio.h> stuff (for example), and my quick search somehow missed the right library.
What methods have you found effective to crash-learn and/or crash-refresh yourself in programming environments that you rarely touch?
Ask developers you know that work in the environment that you are interested in.
Search the web a lot.
Ask specific questions in relevant IRC channels (Freenode is great).
Ask specific questions on StackOverflow and other sites.
There really isn't any substitue for being "in the daily flow" of the programming environment in question. Having a good feel for the current state of the art is something you only get from experience, as I'm sure you can verify in you own areas of expertise.
i try to keep up with general news about languages i'm interested in but aren't necessarily using at the moment. being able to follow the general changes helps a lot for when you have to pick it up again.
beyond that, i personally find it easiest to grab an up to date reference book, and code a few basic things to get me used to the environment again, ie as a web programmer i'd make a simple crud app, or a quick web service/client.
For frameworks/APIs (such as a JavaScript framework or a widget library):
Quickly scan through the entire API documentation; get a glimpse of all that's out there instead of picking the first method that seems to fit your needs.
If available, glance at the source code of the
framework to see how the
API was intended to be used. Seeing what's behind the curtain helps. And also
some of the methods will have been used
internally, showcasing their true intents.
Don't necessarily always trust existing code (Googled, from co-workers, from books) since not everyone does the due diligence to find out the most proper way to use an API. Sometimes even samples in API documentation can be out-of-date.
In newer full-featured environments like Java, .NET, and Python, there are library solutions to almost every common problem. Don't think "how can I program this in plain C", but "which library solves this problem for me?" It's an attitude shift. As far as resources, the library documentation for the three environments I mentioned are all good.
The best solution I think is to get a book on the topic / environment you need to catch up on.
Ask questions from developers who you know who have the experience in that area.
You can also check out news groups (Google Groups makes this easy) and forums. You can ask questions, but even reading 10 minutes of the latest popular questions for a particular topic / environment will keep you a little bit "in the know".
The same thing can go for blogs too if you can find a focussed blog. These are pretty rare though and I personally don't look to blogs to keep me "in the know" on a particular environment. (I personally find blogs most popular and interesting in the "here's something neat" or "here's how I failed and you can avoid it" or "general practice" areas.)
In addition to the answers above, I think what you are asking for will take a significant amount of your time, and you must be willing to spend that time to achieve your goals. My method would be pretty much the same as Owen's answer; get a reference book or tutorial and work through the examples hacking in changes as you go to experiment with how any given thing works. I'd say as a bare minimum, allocate a hour to do this every other day, in a time that you know you won't be interrupted. Any less, and you'll probably continue to struggle.
The best way to crash-learn is simple, simply do it, use google to search for X tutorial, open your favorite browser and start typing away. Once you reached a certain level of feeling with X, do look at other people things, there is lots of open source out there and there must be someboby who has used X before, look at how they solved certain problems and learn from this, this is an easy way to verify that you are 'on the right track' or that you're doing things or thinking in patterns that other people would define as 'common sense'.
Crash-refreshing something is much easier since you have a suspended learning curve already, the way I do this is to keep some of the example you did while writing or keep some projects you did. Then you can easily refresh and use your own examples.
The library issue you mention here well, only improving your search skills will improve that one (although looking on how others solved this will help as well)
Don't try and pick up every environment.
Focus on the one that's useful and/or interesting, and then pick a few quality blogs to regularly read or podcasts to listen to. You'll pick up the current state of the environment fairly quickly.
Concrete example: I've been out of the Java world for a long time, but I've been put on a Java project in the last few months. Since then I've listened to the Java Posse podcast and read a few blogs, and although I'm far from a Java guru I've got back up to speed without too much trouble.
Just a though. While we are working on our code we know that we need to work very hard to optimize the critical path, but on non critical path we usually don't spend to much effort to optimize.
From your description you are working 90% on embedded and 10% on rest, lets assume that in 50% of the rest you are spending more time that needed. So according to my calculation you are optimizing about 5% of your work flow ...
Of course the usual google/SO/forums search is useful before you doing something new, but investing more than just that is waste of time for my opinion, unless you want to waste some time just for fun or general education ... :), but this is another story.
By the way I'm in same position and last time i needed some GUI and used MFC (because i used it sometimes 10 years ago :) ) and i perfectly understand that i probably will get better results with C# and friends, but the learning curve just not justify this especially knowing that i need mix the C code with GUI.