I've a question that I'm not too sure fits anywhere else.
I've been using Mat Buckland's "Programming Game AI by Example" and am really fond of his statemachines outlined in the first few chapters, so much so that I've used this as the basic framework for all my casual programming projects.
I'm now looking into creating app's that I may later put on the Android market and am wondering what the rules are on using code from textbooks in something you may potentially sell?
That being said, if you want to release the source code (or be ethical), you should probably ask him or the publisher. They will probably say no, but they might say yes (and probably ask for royalties).
Cheers, I wondered if there was a generic sort of rule that applied to these kind of things.
At the point where you publish a book with the code in it may be free for anyone to use or something, the code can after all be downloaded from the link supplied on the back of the book! I'm guessing not though from your responses!
If there's nothing in the book (it would probably be in the introduction) that says something to the effect of "you may use any code in this book and stick it up your nose", then you can't use it verbatim. You can contact the author and ask for permission, or merely use the examples as inspirations for your own code. The concept of state machine isn't owned by anybody, after all.
Aye, in the front it says "No part of this book may be reprduced in any form or by any means without permission in writing from Wordware Publishing inc." but I'm guessing that isn't really intended for the code, given I'd then require their permission to use the code to do the examples etc.
The code in question is in fact mostly on his website, here:
Like you say Helios, it's not a concept specific to him, but it'd feel like reinventing the wheel and likely the wheel being slightly less round than the original and where would you draw the line between "inspired by" and "copying"?
I sent an email, will see if I get a reply, I guess.
Well, yeah, but as a counterexample, there is famously one book series, I believe it's called Numerical Recipes or somesuch, that is mostly examples (sample implementations of numerical algorithms, actually), and none of them can be used without purchasing a licence from the author.
"Please feel free to use the code however you like. There are no licenses with it or anything like that. Just gimme a mention somewhere in the code comments."