Programming with Visual Basic
Publisher: Sams Publishing
Published: First Printed December 2000
- RRP US$39.99
Reviewed: 3rd September 2001
of whats on offer
who's ever been shopping for computer books in
the past (programming or otherwise) will most
probably have come across the "Sams Teach
Yourself ... in 21 Days/24 hours/10 minutes"
series'. They've been around for quite a while
now, and have a book to cover pretty much every
aspect of the computer market. Being a series
they also follow the same pattern, formatting
and style - if you've read/bought a book from
this series you already know pretty much what
to expect, and you also know if you like this
style or not (I've seen mixed opinions stated
in various reviews).
those of you who have never heard of the previously
mentioned series I'll explain... In this particular
situation we have a "... in 21 days"
format, so you can expect 21 main chapters, with
the intention that you do one every day (although
the later ones will leave you with little free
time in that day!), and then a summary at the
end of each week and introduction at the beginning
of each week.
per standard with computer books we get a complete
CD to go with the code - I for one dont really
like to type all the code straight off the page
(makes my neck ache!), so it's much easier to
load up the code sample from the CD, run it and
then read the chapter and see whats going on.
the numbers we have a healthily sized 640 pages
of text, in 21 chapters and four appendices. The
book itself isn't too heavy and is a good size
for sticking on your desk while typing away, or
hold open at the right page on your lap.
already explained the system/structure of the
book it seems obvious to begin here. The style
makes for a very smooth, flowing read - you dont
have to start at the contents, decide what you
want to read and turn to that page (well, you
can if you want), instead, you start at page 1
and carry on - pausing for the review at the end
of each day/week, you can be assured that if you're
on day #7 (for example), and have already read
day's 1,2,3,4,5,6 you know everything that you
need to know for day #7. The author starts at
the absolute basics for day #1, and builds upon
these each day.
particular style will make any beginner right
at home, which is excellent as this book is aimed
primarily at the beginner level group. That does
not imply beginner programmers, the author makes
the point straight away that this book does not
teach you visual basic, only the game programming
aspects. You need to be a competent/good visual
basic programmer before starting with this book
- I would assume there are various "Teach
yourself visual basic in 21 days" books available
that you would be wanting to read first. Being
aimed at beginners this book will provide no real
interest for intermediate/advanced VB game programmers
- Anyone who's been messing around with games
seriously for more than a year will probably be
able to start right at the back. Whilst reading
through this book and it's code samples I noted
quite a few ways that I would change the code
for the better - maybe it's just my style of programming,
but there are numerous little things that most
intermediate-advanced programmers will pick up
on, and probably have already learnt better ways
of doing it.
example of such a situation can be seen in the
"BrickBlast" demo game for day 7, whilst
it's not a bad little demo game it suffers from
being a little two basic. Firstly it runs too
fast - strange thing to pick up on, but this isn't
explained in the book (particularly strange in
a section titled "Programming Real-Time Games"),
an intermediate/advanced programmer would have
stuck time-based movement or at the least, limited
the frame rate (it's set to go as fast as possible).
Secondly, it's a breakout clone (you know, where
you have a board, a ball and have to bounce the
ball to destroy a wall of bricks), and the "physics"
are non-existant, most intermediate/advanced programmers
would opt for a much more realistic (yet more
complex) method of bouncing the ball around...
key weakness here is that it's almost entirely
based on VB and API functions, whilst this is
great as a learning tool (learning game programming
and DirectX/OpenGL at the same time would be like
trying to climb a brick wall), it's not a good
move in the long run. Talk to any of the more
seasoned VB game developers on the web and they'll
relate stories of how VB is just too slow that
way, and that the ONLY way to write reasonably
speedy games in VB is to use DirectX or OpenGL
(or another 3rd party library). No one seriously
uses the API or the built in functions for making
a full-blown multimedia graphics engine.
mentioned DirectX, whilst I never expected this
book to cover both game programming AND DirectX
programming it does give a basic introduction
to the whole thing. It's questionable whether
this is really worth it - With the information
in this book you can easily use DirectDraw for
2D graphics (forget any coverage of 3D), but unless
you read up on it elsewhere (like this site and
others) you will be completely lost should you
wish to venture further into the API. The few
pages devoted to DirectX would really warrant
4x this many in a detailed book/article.
Applicability - now what do I mean with that title?
well, many game books that I've read (Game Programming
Gems series in particular) are very broad based,
they explain something about physics (for example)
in the general form, such that you can take it
into a full 3D game, or you can take it into a
simple 2D pong game. This is a feature lacking
in this book, maybe, being a beginners book it
really doesn't matter too much; but with only
this book you would be hard pressed to develop
a game significantly different from any of those
demonstrated. It shows AI for a card game, but
can you really apply that knowledge to a real-time-strategy
game? I dont think so. The same goes for any coverage
of maths or physics. If you read this book, get
interested in game development, and decide to
go further then you are likely to chose a book
more along the lines of the game-programming gems
series, which offers this style of functionality.
of the book
content of the book is good, despite my previous
ramblings about it lacking any complicated material.
What is in here is of good quality, and the writing
style makes for easy reading. If you did stick
to plain windows/desktop based games and didn't
venture into the world of DirectX and hard-core
game programming then this game offers pretty
much all you need in terms of functionality/technology.
It begins with an introduction to plain VB graphics
and multimedia functions - Circle(), Line() etc...
and then moves upto the Win32 API calls (which
is where you should really focus your attention
if you dont move onto DirectX), all of which is
explained and demonstrated nicely.
other aspect for the content, in particular the
games demonstrated (there are several complete
games to work through) is the learning curve.
As already mentioned, the order of chapters and
content of each chapter is carefully structured
- and so are the example games. Starting (in chapter
2) with "Face Catch" a really simple
(yet strangely addictive) game where you have
to catch a face that randomly moves around the
screen, and building upto "Moonlord"
(all of week 3) - still a simple game, yet programmatically
much more complex than any of the previous games.
may sound as though I'm giving this book a really
hard time - I feel that I've spent more time exploring
it's weaknesses than it's pluses. But that's to
be expected from my position really, I'm not going
to preach at being the best game-programmer ever,
but I am at the more advanced end of the spectrum,
so looking back on this is a bit like a Maths
Graduate looking back at old high-school maths
notes, it seems so simple! Yet to someone at high-school
level it is obviously not that amazingly simple.
That, in a nut-shell, is it - if you are at the
bottom of the ladder and have an interest in making
your own games yet have no idea how this is a
very good book to start with. It will teach you.
But if you're already a game programmer, or have
spent much time reading articles online you will
probably find this to be a fairly short book.
my usual summary of key points, to help you decide
if this is the right book for you:
Extremely well structured chapters
Useless for intermediate to advanced programmers.
Great for beginner game developers
No substantial coverage/mention of the dedicated
game programming API's (DirectX/OpenGL)
Not too expensive in comparison to other
game programming books
Possibly not much life in it once you progress
into the world of DirectX
Includes all the source code on the CD
You'll need to learn more about AI, Maths
and Physics before stepping up into "proper"
It's in Visual Basic 6 format - one of the
only books in print about game programming
that isn't in C/C++, and being in VB6 format
it makes use of the most recent version
of the language