PDA

View Full Version : Writting a book on game development



WILL
26-10-2004, 12:12 AM
Has anyone thought of writting a book on game development with Delphi/Kylix, Free Pascal or any or all of the above?

Honestly, I've seen 2 books that were released and not much else. I seriously think thats what we could use to promote the community. And get others into the fold.

cairnswm
26-10-2004, 05:21 AM
I would love to get involved in a project like this. I wanted to do it about 18 months ago but basically chickened out :)

It could be done as a set of formalized tutorials - think of it as an online course where each 'course' stream would create a set of online e-books.

So how do we get it going?????

Traveler
26-10-2004, 08:21 AM
Because of my (extensive) tutorials about delphiX, I've had several people asking me to consider writing a book. But next to the fact that DelphiX probably isn't the right package to base a book on (although I probably could convert them to any other package), I simply don't have the time.

Right now I'm working on the new PGDev website nearly every spare hour I have. Like many of my projects it's taking far more time that I origionally thought it would take. (Not that its a problem the more time I spend on it, the better it gets). Point is, I've come to realise that I can't work on more than one project at the time. And to be honest, I'm dying to get my hands dirty again on a new game project. (Not that that is going to happen soon, I promised to finish a few other old projects first).

WILL
28-10-2004, 02:14 AM
Well your idea seem great cairnswm, though I think that a published solid copy would benifit those that go to the book shelves aswell. However that may depend on the publisher aswell.

:!: DelphiX would not be the best thing to base a book upon at all. In fact I don't think that any specific API should be focused upon at all. Prehaps a chapter or two on SDL, OpenGL and DirectX may be an idea for a 'Beginner Level' book, but anyone seriously thinking of buying a book for the use of developing high-end games would be interested in another one of these books. Something more in-depth like algorythims and methods of more advanced game design would be much much more helpful.

The idea of a series wouldn't be bad like that of Premier Press' 'Game Development Series' that is quite popular as of late. I also believe that it should be non-compiler specific aswell. In fact having a bit of an insight to the different 'Pascal' compilers might also be warrented aswell. Though we'd have to specify what language the example source would be listed in.

ie. Lets say you were writting a portion about using Object Models in your game and were specifying a part of code to illustrate your method. You'd have maybe 2 figures each with either Object Pascal or Pascal(Free Pascal's variation) of what you were trying to illustrate.

Also improper referances to Delphi as a language it's self should be eliminated completely as we don't want to confuse an already 'bias and confssion-latten' base of programmers as it is. We should set the record straight for them in our own efforts.

:idea: I like cairnswm's idea mainly because a single book wouldn't do much of us as much good as some comprehensive series that we could grow our own experience from the first one we pick-up. The only issue is, what area of programming should we start in? :idea:

I think that using Object Pascal's object classes in writting would be a great start. How many articles, tutorials or times have you heard people just talking about getting further into the fundimentials or more advanced aspects of game programming instead of lightly brushing on a set of APIs and treating them like the Holy Grail to making games with a specific Pascal compiler? I say we, as a community of programmers aim higher.


After that potentially long-winded set of my personal oppinions, here is my list of potential book ideas for someone to write for the avid Pascal game programmer. Please expand on there is you can.


The List:

:arrow: Game Design Under Pascal (using Pascal based Object Models and Game-State engines)
:arrow: 3D Games with Object Pascal (concentrate on not only 1 but all 3D graphics APIs each having it's own chapter or more to demonstrate eaches interfaces and ways of doing things, plus focus on formats and considerations of 3D game programming at large)
:arrow: Isometric game Engines in (Object)Pascal (Obviously covering all aspects of the Isometric game engine and how to works)
:arrow: Design a Great Multiplayer Game! (All sorts of informaton on how to design an online game with (Object)Pascal)
:arrow: Cross-Platform games (Maybe the least exstensive of my little list, but it can cover how to do cross-platform game development with Delphi/Kylix and/or Free Pascal; ie. things like installers, APIs available, OS enviroment differences, tricks, etc)

cairnswm
28-10-2004, 05:18 AM
You definitly missed:

:arrow: 2D game programming with Pascal

I would be very happy to join any team that wants to do this. I'd even be prepared to run the team if we have enough people wanting to contribute.

Ultra
28-10-2004, 01:23 PM
If the goal (at least one of many) of this book is to prove that Pascal is as capable as C++ in creating games I think it should be about 3D rather than 2D simply because it's considered to be more advanced. With that said I'm personally not sure if I'd like a book on 3D better than one on 2D.

Also focusing on more than one Pascal dialect might be a bit hazardous. The book will be harder to read since you have to check which dialect the example code use (even if we make it clear it's gonna be harder, though maybe not too much :?). Another problem is the differences in the dialects, if we have an example in FreePascal dialect then the reader may not be able to understand how to convert it to the Delphi dialect. Last point is that if this if gonna be a community written book then it might not be a good idea to force everyone that contributes to learn several new dialects...

Another thought. Would this book be about creating the next Quake and using Pascal to show how to do it or show that Pascal is the only way to do it (i.e. will the focus be on the algorithms or the language)? I know this can't be answered right now but it must be know before anyone starts to write.

Oh, and someone seemed to miss:
:arrow: AI for Games using Pascal
:arrow: Create your next Game Scripting Language with Pascal (I'd definitely would want one of these :wink: )

cairnswm
28-10-2004, 06:58 PM
Most game dev books look at the beginner game developer. We could maybe do something like

Free Game Development with Pascal

And focus on FreePascal and aim at people who want to create games without spending any money.

Robert Kosek
28-10-2004, 07:04 PM
:lol: I'd buy it!! I've been looking for stuff like that ... but since "pascal isn't a game programming language" OI! Every C/C++ guy I've talked with spouts the same junk about pascal, let's show 'em who's got the power! :wink:

Not that I could write something like that. Golly, I can't even write a complete simplistic game. :oops:

noeska
28-10-2004, 07:35 PM
There is no game withoud sound, so it should have chapter that deals with sound. The options for freepascal are: openal and sdl.

Also no game without some sort of collision detection.

Title suggestion:
Game Developement with Object-Pascal

It should minimal show
- available compilers
- 2D
- 3D
- Sound
- GUI
- File Acces - File Formats
- AI
- Collision (2D-3D)
- Game engine flow

Also i think classes should be used whenever posible showing classes with inheritance. (The Power of Object-Pascal)

The danger is that there are lots of topics needed for game developement and each of them justifies for its own book.

I would be willing to write a chapter on sound programming.

cairnswm
28-10-2004, 07:52 PM
Sorry, a single chapter on Sound Programming just isn't enough :)

We want ast least 3 chapters from everyone. How about doing something on 3D collision detection :)

3D programming would need to include model loading :)

Robert - we all had to start somewhere - have you tried writing Hangman yet? Its a great place to start! Or try do something like my Barbar game (I did it day before yesterday again to test FreePascla and VGFX - got it as far as making him run and die and then decided that was enough).

Robert Kosek
28-10-2004, 08:17 PM
Actually I had looked past hangman, etc. I didn't think to write that, probably 'cause I have high hopes. :)

I'll try hangman then maybe a Barbar style game, though I'm not a pixel artist.

WILL
29-10-2004, 01:02 AM
If the goal (at least one of many) of this book is to prove that Pascal is as capable as C++ in creating games I think it should be about 3D rather than 2D simply because it's considered to be more advanced. With that said I'm personally not sure if I'd like a book on 3D better than one on 2D.
Indeed a book on writting 3D games in Ibject Pascal is long over-due and should be written aswell. In fact if we only write one great book from our discussions here, it would still not be enough. I'm not saying to start a whole series, mainly because to do so hap-hazardly an in an amature-type format would only enhance the bias, but in fact if more books were written we'd need a few 'singles' first to kickstart the interest.


Another thought. Would this book be about creating the next Quake and using Pascal to show how to do it or show that Pascal is the only way to do it (i.e. will the focus be on the algorithms or the language)? I know this can't be answered right now but it must be know before anyone starts to write.
Hands down, algorythims. Don't we have enough books holding our hands teaching us all about the Object Pascal language? :P If I look at another book on how to do the exact same damn thing in a new version of the same damn compiler, I'm gonna puke! (maybe 1 book on Free Pascal I could stand out of exception however)


Oh, and someone seemed to miss:
:arrow: AI for Games using Pascal

AI, how could I have forotten that. :? I personally would love to have an Object Pascal book soley on AI, all aspects for gaming including Neural Nets and Genetic Algorythims.

noeska: I personally would love to read a FULL book on Sound using Object Pascal code myself. The topic can be expanded upon so much. And there is a ton of things to cover to get a really in-depth knowlage of it.

Robert: Why don't you try a cool project like a 'Game of Life' as it's called or some other basic game model and see if you can take it and expand from it with your own inovations and ideas. A lot of game developers start out like that. Online-Game Of Life?


Sorry, a single chapter on Sound Programming just isn't enough :)

We want ast least 3 chapters from everyone. How about doing something on 3D collision detection :)

3D programming would need to include model loading :)
I honestly think that all of these things deserve their own books with at least 300-400 pages min. However, you could make a HUGE mega-book from multiple authors, but it'd have to be something like 1000-2000 pages or something like that.

As great as that 'Delphi Graphics and Game Programming Exposed' was, it was very narrow was at best a beginners book. And by far too short!

'Delphi Developer's Guide to OpenGL' was a much better book in my opinion because it was more specific and although it focused on only 1 API, it stuck to that one API and did not try to be the 'great solution' for Delphi game developers. A book written like that seem more like propaganda then something that is useful, lasting and reusable.

cairnswm
29-10-2004, 05:32 AM
OK

3 Authors = 3 Books

Noeska - Sound
William - 2D
WILL - 3D

:)

I'm happy to add sound to my book though :)

Robert - I also have high ambitions - so I tried to write a WarCraft equivilent - OK so that didn;t work - I tried to write an Isometric Puzzle game - that didn;t work - so I tried to write a 2D puzzle game and that didn;t work - so I wrote Barbar!

(When I say it didn;t work - I mean I did not yet have the skills to do it).

So I wrote Barbar, TimePilot, and Pirates (Battleships) - then I felt I could try something new and I wrote my first 2D Puzzle game (Farmer Joe's Matching Yard). No I feel I could try something more. (My next game will be similar to Gold Miner Joe http://www.arcadelab.com/miner.html)

The point is - learn to do the basics before your try the advanced stuff. It allows you to actually achieve something while you progress.

cairnswm
29-10-2004, 05:57 AM
I'll try hangman then maybe a Barbar style game, though I'm not a pixel artist.

Nor am I - thats why sites like : http://www.reinerstileset.4players.de:1059/englisch.htm exist!

MikeS
30-10-2004, 03:49 PM
I'd be happy to add 1 or 2 chapters about properly designing and preparing a game. In another words, how to make a game design document. While it doesn't exactly add to the object pascal part of the book, it may be good if this is intended to be a beginners book for game programmers.

:)

WILL
30-10-2004, 07:08 PM
3 Authors = 3 Books

Noeska - Sound
William - 2D
WILL - 3D

I would not be able to write anyone a book on 3D. In fact if you intend for us here in the PGD community to write a book it might be best, as you suggest, for us all to write one huge super book for Novices. (Though I would like to see more advanced books being put out there using the Pascal language.)


I'm happy to add sound to my book though :)

Well if multiple authors are contributing then we should have enough coverage of many topics and categorize them accordingly.

Though with that, we have to be able to say "No" to a chapter if it's not what we are looking for of not up to the programmer level we require. A beginner book would be a waste of our time. There is enough materials out there(and here for that matter) for that and I would not want to work on such a project. Besides I think that online tutorials and items from within our 'Library' will be pleanty to click through to find what those beginners want. We need to start catering to Novice and Advanced users that want to use their skills in new ways. There is a strong lack of materials for these more experienced Pascal types to progress with and learn, grow and develop from. And thats the whole point of being a programmer, right?

Now if I did contribute to the project that cairnswm is wanting to get off the ground(I was only trying to stimulate the idea amoung all of you guys ;)) I would not be able to write anything much beyond helping to edit or proof-read(which I believe are quite important aswell). I just have way too many projects on my plate(one of those being the designing of the new PGD site) and a full time job in the military aswell.

Sorry to those of you wanting to help write a beginner book, but there needs to be a higher progression scale amoung Pascal programmers. On the bright side, you have something to aspire to after you have covered enough of the basics(more so than what you will have now). And if you are still fixed on writting a beginner book maybe you can convince the good Mr. Cairns to have a 2nd book poject going with a beginner book along with the seperate Novice book that is being written?

savage
11-11-2004, 10:45 PM
This sounds like a great project!!! It seems that you will be able to cover all the essentials of game development using the great language that is Object Pascal.

WILL
30-04-2005, 08:45 AM
It has been quite a while since this topic has been discussed. Are all the interested parties still game? Pardon the pun. :P

Cairnswm, you still want to work on that big book idea of yours?

MikeS
01-05-2005, 03:25 AM
I'd be happy to add 1 or 2 chapters about properly designing and preparing a game. In another words, how to make a game design document. While it doesn't exactly add to the object pascal part of the book, it may be good if this is intended to be a beginners book for game programmers.

:)

I'm still game.

:)

cairnswm
01-05-2005, 12:26 PM
I would stil love to do it but havn't given it much thought for quite a while.

I havn't had much feedback on my 2D articles that I did, so I dont really know if I'm on the right track :)

WILL
05-05-2005, 05:56 AM
Idigicon (http://www.idigicon.com/) has great possibilities for publishing materials! In fact they use the same services they use for manuals and instructions for their own home-brand products made by the Coders Workshop.

Perhaps a deal can be struck to publish through them?

It's not a bad way to go...


As for your tracks and such, here is what I would personally recommend;

I'd just look at whatever text books or programming, etc books that you have on hand. Or maybe go a library or local book store if you are short handed of examples and see how the 'professionals' do it. Check out how far they explain the surrounding theory behind what you're trying to teach or explain and how much they insert their own personalized dialoge. It's kinda like looking at someone elses code and learning in the same way. :)

You're not writting this thing for robots afterall, but you also don't want to end up making a joke and story book either. :lol:

I think the best way to aim your material is to stick to the game theory and avoid getting too wrapped up in APIs, platform specific areas and anything that will distract too much from the task at hand. If you want to cover different APIs or platforms, I believe the best way is to make a seperate section or chapter for it. Every book I've read seems to do it this way.

You cannot really avoid the language too much, since how else are you gonna write this thing? So you are stuck having to get into language specifc things, but it might also be best to not get sucked into explainning every function, type or method you are using. Again, I'd recommend a seperate chapter all together for these things. Possibly at the beginning if it really seems like it's required. This way we know what you are talking about before we start using it. ;)

I think, (again this is just what I think not nessissarily the way it is) that writting a tutorial or small instruction is not really the same as writting a book. The tutorial has to be small and is sort of meant to be consumed in smaller chunks. The book on the other hand, while it still can be written so that you don't need to go from cover to cover to do anything, you have all this material to fit into it that you have to organize it a little better so everything is easily found and accessable. The better you break up the materials into their own segments of topics the easier it is for the reader to come back to it and use it as a reference later on. Which is really what most would want (again, my belief) for the ideal programming book.


Hope some of my ideas and thoughts help you in your goal here. I'm dying to be able to see another Pascal-based games programming book out there.

cairnswm
09-05-2005, 07:01 AM
I spent some time yesterday looking through chapter 1 of 'Isometric Programming with DirectX' (The only GameDev book I have).

Basically its 40 pages per chapter, an average of 25 lines of text per page.

The chapter covers an outline of windows programs, but for our book we could do an outline of the game program - language independant - except maybe for a template.

Things to cover

Game Object Initialisation
Sprite Management
Game State
Game Loop
Input Handling per state
Rendering per State
Sound management

all in brief. Sort of explain what they are, what they are used for etc. Later chapters could go into detail on each aspect - possibly a chapter per library as well.

pwill99au
15-05-2005, 03:35 AM
Hi All,


Because of my (extensive) tutorials about delphiX, I've had several people asking me to consider writing a book. But next to the fact that DelphiX probably isn't the right package to base a book on (although I probably could convert them to any other package), I simply don't have the time.

...


Above is a quote from a message by Traveler. My question, to Traveler or anyone else, is, if DelphiX is not the 'right package to base a book on'... then what would be right???

JEDI SDL maybe??? It's about the only one I know of. But there are probably other candidates.

What do ppl think about this???

Regards,
Peter W. :-)))

Traveler
15-05-2005, 12:52 PM
Delphix is nolonger the right package simply because it is too old. I believe SDL (if you want to have a chapter about cross-platform gamedev as well), Omega, Asphyre or one of the other more recent D3D based packages, would be a better choice.

cairnswm
16-05-2005, 05:33 AM
Most of my Game Dev work is now done using JEDI-SDL. I have found it an API level that suits me really well.

I dont have Linux at home (or rather I have the CDs just not an installation). In Two months or so I should get a bonus and hopefully enough to buy a new PC or two at home for my kids - Then my ond P3 600 can become a linux machine and let me really get the Cross Compilation working.

I will do the book as a FreePascal/Lazarus using JEDI-SDL book. Concentrating on 2D with someone else contributing some 3D stuff.

WILL
18-08-2005, 06:49 AM
Lulu.com (http://www.lulu.com/) is a site that allows you to publish books in any quantity you wish. (You can even just publish/sell one!) This may be the perfect solution for writting Pascal game programming books.

The only form of payment you will have to incur is about 20% (if I recall that figure properly) of the sales cost for each book. You set the costof the book. You can make printed or ebook, type of spining, cover art, and so on... You submit your 'manuscript' via a word document or some other such format.

I think because of this site it will allow this type of project to be completed with very little effort on the publishing side. And Sams,
Sybex, WordWare and the rest be damned... :P

cairnswm
18-08-2005, 10:27 AM
lulu.com looks like a cool site.

I'll try put some effort into getting a small book done :)

Raskolnikov
26-10-2005, 07:10 AM
This is something that Pascal could deffinately do with, I've been thinking about writing something along these lines using FreePascal for sometime now except splitting it up into several books:

The first book would cover FreePascal, teaching the language and the use of the associated tools (ie, fpdoc) and software construction principles. The second would cover cross platform development using GTK or even lazarus, if 1.0 happens to be available; the third would teach game programming fundamentals with SDL and finally 3D development with OpenGL and OpenAL.

Now, thats *alot* of work and right now it's just a pipe dream...but damn it'd be cool. The more publicity pascal gets the better and well, as it's users it's up to us to spread the word one way or another.

marmin
27-10-2005, 10:20 PM
I think the best way to aim your material is to stick to the game theory and avoid getting too wrapped up in APIs, platform specific areas and anything that will distract too much from the task at hand. .

Now, imo that is mainly the problem with object pascal game dev. Am I wrong to notice that most people who want to program choose pascal because it has rad tools like delphi and wrappers like delphiX (that is hopelessly old and slow ).

If one wants to seriously program a fast game one has to dig deep in API, a complex game requires to know exactly what the computer is doing. And most programmers turn away from pascal because they get the impression that pascal game dev is outdated and not technical, fast, at all. That's just my opinion. A game that is made with all kinds of wrappers, rad tools, it's just not the real thing..

Why should a c++ programmer has to know all the details and a pascal programmer not? :D

czar
27-10-2005, 10:56 PM
I think you will find that many people who want to write games want to do so for their own pleasure. They do not dream of making Quake 5 and C&C generals 2007. Instead they have idas about making RPGs, platform games and small single screen acrade games. Delphi can make any type of game that can be made in C++, however the wrappers and components make it much easier for programmers to begin making the games they want.

I have been making commercial software using delphi for the last 6 years, mainly multimedia educational gamey type programs and my lack of C++ experience has never been a problem.

marmin
28-10-2005, 05:47 AM
True, there are also people who still use Visual Basic, Quick Basic or even MSX basic to write games and they can be fun, but in no way can that grow into a professional , state-of -the-art game anno 2005, just because the developer don't know actually what is going on in his/her program, and that shows in the end.

Due to the extremely fast CPU's and graphics cards it won't show If one created a badly, inefficient programmed game with all kind of redundant code when using the techniques of let's say 5 ys ago. But it's the programming technique that one takes with him.

And that was my point. 8)
So i think most smart devs will study the C++ code , buy C++ books, and translate it into Pascal or swith to C++ when they get a programmer job. I learnt all my Direct3D API and some WIN32 api by translating C++ code.. (And i still hate teh language that why I am here !!! :D :D)

There't not much fundamental difference in those languages (although I like pascal better myself) , I was only referring to the fact that most Pascal beginners don't seem to get over the wrapper stage, wich is fine of course but in the end that can not grow into professional game dev.

czar
29-10-2005, 02:55 AM
There't not much fundamental difference in those languages (although I like pascal better myself) , I was only referring to the fact that most Pascal beginners don't seem to get over the wrapper stage, wich is fine of course but in the end that can not grow into professional game dev.

I don't think I agree. If you want to work with a games company then you should use c++. But how many people in the world are going to get a programming job for a commercial game company? Not very many. So where are most jobs going to be for programming, not with games. If you want to program the latest and greatest games it is prbably much easier to work in c++.

I am lucky I have a job that allows me to write games and other multimedia programs. We have recently switched from DelphiX to Omega. We have 2d and 3d games and game like environments. Wrappers are fine, there is no need for direct api type stuff.

One of the programmers on our team has made his own engine that allows both 2d and 3d games. So he knows most about directx programming in our team.

Success is not whether you use a wrapper or not or whether you use c++ or delphi. It is the end result. How good is your software. Do users find it enjoyable to use. They don't much care what it was written in and if the code was super duper. The software we write at work is used by 8,000 children every week in centres all over the place.

WILL
03-01-2006, 03:44 AM
I think the best way to aim your material is to stick to the game theory and avoid getting too wrapped up in APIs, platform specific areas and anything that will distract too much from the task at hand. .

Now, imo that is mainly the problem with object pascal game dev. Am I wrong to notice that most people who want to program choose pascal because it has rad tools like delphi and wrappers like delphiX (that is hopelessly old and slow ).

I think that the people who think that all there is as an advantage to the Object Pascal language is Delphi-like RAD tools and DelphiX-like do-it-all-for-you components is sorely misguided and obviously not a very good programmer. And in that sense those that only see current day Pascal from that angle (Mostly those that look at the language like it's just a tool named Delphi.) that make that rather discusting mistake.

These new programmers need to see more of the innovators and pioneers' work and get inspired. Those that want to stick to lego-like game development will either stay or stray away, but those that want to get serious have to have something to go to.


If one wants to seriously program a fast game one has to dig deep in API, a complex game requires to know exactly what the computer is doing. And most programmers turn away from pascal because they get the impression that pascal game dev is outdated and not technical, fast, at all. That's just my opinion. A game that is made with all kinds of wrappers, rad tools, it's just not the real thing...

Really depends on how cutting edge it is. A nice simple Windows game can require little more than a neat little set of components and a not-so-CPU-intensive game engine. Those are fine, but if you are trying to be innovative and push the envelope with the industry then you will require to be quite the tinker freak. ;) And that is where those zanny C people and funky nay-sayers get lost.


Why should a c++ programmer has to know all the details and a pascal programmer not? :D

No reason what-so-ever, hence the need of a good ole game programming book using Object Pascal instead of C for a change.

LP
03-01-2006, 04:50 AM
Just to add few words to this conversation...

I think that this book idea is good and most likely I would've bought it myself. :)

My only suggestion is that you explain clearly OOP concepts, inheritance and all the specifics to Pascal language. From what I've seen on Afterwarp.Net, many people still lack information on how to design classes well (for instance, a word "reintroduce" or "dynamic" is pretty unknown among many Pascal programmers).

If you guys need any assistance with writing some blocks about using inline assembly or even MMX/SSE specifics (well, if you decide to add this to optimization section) - you know where to find me. :)

Also, I agree that sticking to specific API (not only DelphiX, but even Direct3D or OpenGL) is not a very good idea. The specific API is choosen to fit the needs of market and project requirements, so by explaining an API like OpenGL you almost bind the reader to that API. However, some basic information about various APIs and links to some development and download sites would be handy.

Finally, what I would suggest is excluding DelphiX not only from the book, but also from any conversations. It's very limited in the concept and rather outdated.