Dev - Mag - 08
Dev - Mag - 08
Dev - Mag - 08
SOUTH
APPRENTICE!
A F R I C A’ S
Interview with co-writer
Jacob Habgood
FIRST
XNA
GAME
IS HERE!
DEVELOPMENT
MOBILE GAME
DEVELOPMENT:
MAGAZINE
TOOLING UP WITH
NETBEANS
04 - DIGITAL STOMPIES
FEATURE
06 - IT’S ALL ABOUT XNA
REVIEW
09 - PYGAME
SPOTLIGHT
11 - JACOB HABGOOD
DESIGN
13 - BLENDER TUTORIALS: PART 4
POSTMORTEM
19 - THE MAKING OF NONEX 2: PART 1
TECH
27 - AN INTRODUCTION TO PATHFINDING
MOBILE
30 - GAME DEVELOPMENT IN JAVA: NETBEANS
TAILPIECE
33 - RAGE REPORT
COMIC
38 - DIGITAL MAYHEM
21 11 33
16
H
ey all, due to endish circumstances, our editor has been out of action for
this month. No fear, however, as Dev.Mag will proudly march on regardless! RANKING OFFICER
We have some special stuff lined up for you this month, including the Stuart “GoNzO” Botma
opening of a new Projects section in the mag.
Something that we’ve been thinking about recently is the idea that some of our SECOND IN COMMAND
content can follow the “lead by example” philosophy – the idea that entire games, Rodain “ Nandrew ” Joubert
rather than just components of their build, could be examined and evaluated as
they progress.
DESIGN SQUAD
To this end, Dev.Mag has incorporated two new articles this issue, one of them Brandon “CyberNinja” Rajkumar
being an offshoot of last month’s feature known as a postmortem (in which a game’s Paul “Higushi” Myburgh
creators reect upon the successes and failures of completed projects) and a new
series that follows the building process of the game Nonex 2, with the author
highlighting triumphs, challenges and downright pitfalls as the game progresses CEREBRAL SOLDIERS
from chicken scratch to completed product. Simon “Tr00jg” de la Rouviere
Ricky “Insomniac” Abell
We hope you like what we’ve done with this issue, we’ve done our best to revamp William “cairnswm” Cairns
a lot even given oppressive circumstances, and I hope this is reected in the Bernard “BurnAbis” Boshoff
enjoyment that you, the readers, gain from this jam-packed edition. Danny “dislekcia” Day
Andre “Fengol” Odendaal
Deputy Editor
Rodain “Nandrew” Joubert
WEB WARRIOR
Claudio “Ch1ppit” de Sa
Robbie “Squid” Fraser
WEBSITE
www.devmag.org.za
http://www.gamasutra.com/
http://www.next-gen.biz/
Moondance releases Independent Games
Vol 2
Next Generation has assembled a collec-
tion of about 50 books related to game http://www.moondancegames.com/games/
development that are recommended for
NEWS
http://www.gamecareerguide.com
http://www.gamasutra.com/
http://www.rampantgames.com/
NEWS
to most established ideas, coming from an
established game developer.
http://www.actionscript.it/
mobilecontest/mob_rules.html
T
he XNA GSE (Game Studio help game developers create games Games built with managed code
Express) is a set of tools for productively (although there are sim- are not slower than game written in
building managed games together ilarities because it is still based on C++ because they are just-in-time (JIT)
with the XNA Framework. XNA DirectX). MDX 2.0 beta has been complied into native code when it is
GSE is based on the free Visual unchanged since the DirectX April 2006 initially loaded by a process, prior to
FEATURE
C# Express 2005 and to install SDK release and there will be no further execution, and this allows hardware-
game studio on a desktop, users changes nor will it ever be released of- specic optimizations unique to the PC
will need Visual C# Express 2005, cially. The MDX 2.0 assemblies will be and Xbox 360 architectures. Only the
the latest DirectX runtime (or the removed from the DirectX SDK once the most intensive games would benet
August 2006 DirectX SDK if users XNA Framework beta is released. from being written in C++. The three
want to use the DirectX audio cre- (Taken straight from the Microsoft website) most notable features when using the
ation tools) and the XNA Game
www.microsoft.com/xna).
is currently in beta) are device cre- windows form. Drag-and-drop your own Now for the bad news – at the time of
ation, game loop and game compo- game components or ones built by third writing this, you can’t develop games
nents. As soon as you start your parties onto your game and they’re exe- for the Xbox 360, that’s coming out
project you can run your game and cuted and managed automatically with when XNA goes live (for security rea-
see the default cornower blue back- properties developers can manage at sons Microsoft does not release beta
ground that has become the hallmark design time. Game components can be software on the console). Game
and assigning them to other game com- join the Creator’s Club (estimated at
ponent properties in the visual designer. $99 a year) and download and install
Game components help move technical the XNA Framework on their console.
There are lots of opportunities with the the Xbox 360; debugging on the con-
XNA Framework for developers who sole is supported through a remote
of the DirectX tutorials. You don’t
FEATURE
enjoy building their own frameworks debugging connection from a Windows
need to spend time writing code
and engines. Developers can focus on desktop running XNA GSE. Sharing
just to get a handle to the graphics
building unique game components (like your newly developed games on the
device; and you can manage the
physics, scene management or game- Xbox 360 will also not be immediately
device’s properties at design time
genre specic helper functions) which available. Users wanting to play your
through a property window.
will plug easily into other game develop-
ers’ projects with affecting or dictating Below: Graphics Device
There’s also a built-in game loop
tools (www.garagegames.com/products/
becomes available. to develop games for the Xbox 360
torque/x/). Their tools include an environ-
(http://xbox360homebrew.com/)
W
ell, this website provides a user would normally expect. However, supported. Should this be the case
denite “yes” as an answer one is truly blown away by the list of with you, revert to the Python 2.4 ver-
– backed by the power of an awe- projects in development as well as com- sion and keep developing with that
some little tool known as Pygame. pleted games which get released on a until Pygame support is brought for-
REVIEW
regular – sometimes daily – basis, and ward. Take a look at this website, and
Pygame is a Python module which the competitions as well as “Pygame make sure you get your hands on that
dedicates itself exclusively to the Weeks” that get run frequently serve as Pygame module! After that, it’s happy
development of games. All the a motivation to draw in more enthusi- game development all the way.
resources which you need to asts and curious developers. An impor- NANDREW
posal, including tools for graphics, version of Python did not have a cor- www.pygame.org
sible before.
about the tools, skills, and a brief history tures and coloring) and on the game
of games. In the second part, the side lls in the details regarding lights,
is taught making mini-programs along tion, sounds and music, physics, timing
the way, and nally in the last part creat- and other game creation techniques,
ing a game based on the mini-programs all instantly codeable into the blitz3D
The book itself is a good start for game behind creating working code and pro-
developers who want to make that step gramming concepts, and nally using
out of game maker into the program- the rest of the knowledge to create a
ming of full 3D games, even 2D games fully functional game in the last chapter
Author: Eric D Grebler
of course as it goes through all the of the book.
Title: 3D game programming for teens
phases using tools such as Blitz3D,
Publisher: Thomson Course Technology
3Dstudio Max 8 and Corel Draw, which This book is recommended for begin-
REVIEW
Category: Development/Programming
all come with the book as a starting ners who are interested in creating
User-level: Beginner/Intermediate
point to creating functional 3D games. 3D games, but dont have the time
ISBN: 1-59200-900-X
The trial versions of the software are or resources to learn one of the very
Average Price: R 350 - R 380
quite functional considering the price technical languages or frameworks 3D
Available from: Exclusive books , Larger
of the book, and the content starts at games usually use, and you as a
book retailers
the very beginning of game creation, all reader can start creating games right
W
ithout experience in game
game with the free tools, all while teach-
development, programming
ing the principle of creating games in At beginner level this book is a worth-
and 3D graphics, this book will teach
3D, from scratch. while buy, but if you have had experi-
you to create a 3-dimensional game
ence coding games in any language,
in as long as it takes you to under-
With an interesting history on games and understand theory behind creating
stand and complete the training that
and the development of games, it goes games, then this book might be a little
this book offers. In short, the book
on to explaining gaining skills game primitive for your taste. As a game
covers everything in the game devel-
developers usually have, such as pro- maker enthusiast who would like to get
opment process, from the beginning
gramming, graphics, team, math as well a 3D game under their belt and grab
stage of acquiring the knowledge and
as communication. Diving into game the reins right away, this book is a
the skill involved, to creating a full 3D
design theory and teaching with some great start, and provides the tools to
game. As a relatively cheap computer
examples, it goes from there straight get going.
book, it was quite surprising to see
into the anatomy of a game, and sub- FUZZYSPOON
the range it covers, all with examples
sequently starts teaching you to use
and free software to learn with. The
the tools provided to create a game. It
book deals its content in 3 sections,
covers 3D modelling, 3D theory, graph-
the rst being a theory based section
ics theory (such as transparency, tex-
Jacob Habgood
want a more detailed look at what this package can offer, a new book entitled The Game
Maker’s Apprentice serves as a great resource for not only people looking to learn Game
Maker, but also those who want game design hints and tricks in general. TROOJG has
a chat with Jacob Habgood, co-writer of the book alongside Mark Overmars, so that our
What were your intentions regarding The Game Maker’s Beginners of all ages, although you do need to able to read
Apprentice? the book. To quote the introduction: “This book is not speci-
SPOT LIGHT
cally for the young or old, but anyone who loves computer
We wanted to create an engaging and accessible beginners
games and wants to have a go at making them for them-
guide to game development. There are a number of books
selves. We’ve all painted a picture, written a story, and made
out there that claim to offer this, but we didn’t feel it had
a wobbly piece of pottery at some point in our lives, so it’s
really been achieved yet. We went to great lengths in order to
now time to embrace the art form of the future and try making
create something that people would really enjoy owning, with
computer games too.”
colourful artwork and games that were actually fun to play. We
were very pleased with the way it turned out and it ultimately
Are there any useful things in it for the expert Game Maker
user?
not registered?
The best part is actually getting feedback that shows you that
when I get there. What impact does products like Game Maker have on the
Micro Machines (2002), Infogrames some of us are trying to change that. Have a look on Gamasu-
Hogs of War (2000), Atari Europe S.A.S.U. tra or GameCareerGuide and search for articles by Jacob…
Premier Manager 2000 (2000), Infogrames UK Ltd.
Actua Soccer 3 (1998), Gremlin Interactive Ltd. Where do you see the game development industry going
N2O Nitrous Oxide (1998), Gremlin Interactive Ltd. in the future?
Actua Soccer 2 (1997), Gremlin Interactive Ltd. India, probably. :-) No idea what will happen really, but it
Judge Dredd (1997), Gremlin Interactive Ltd. would be nice to see more of an innovative casual gaming
Re-Loaded (1996), Interplay Entertainment Corp. scene. Cheaper, shorter games where developers are able to
Greenies (1995), F1 Licenceware take risks with gameplay. XBox live is an excellent idea in
Certainly will be. you should do something constructive like developing your
own games instead. Game Maker beats being an Elf any day
Favourite next-gen console? Why? of the week!
Has to be the Wii, despite the name. Nintendo games rock. TROOJG
DESIGN
checkerboard.
The board Half the board pieces are not filled in.
Now is a good time to mention the two
We’ll start off with the board itself. For different duplication methods available
the sake of detail, we’ll be modelling the in Blender. Pressing Shift+D, or open spaces in the board. Now create
blocks individually. Delete the original selecting Duplicate from the Object linked duplicates of that block until the
cube, switch to top-view, and create a menu, will make an exact, but entire board is full.
plane. The default 2x2 size will suit us independent double of the object.
perfectly. Pressing Alt+D, or selecting Duplicate The pieces
Linked from the menu, will create a
To give out block some depth, we’ll be duplicate that is linked to the original. Now we have a board, but what about
using a modelling technique known as Therefore any changes you make to the pieces? We’ll be making simple
extrusion. Extrusion essentially takes one of the copies will affect all the round pieces to populate our board, so
the selected faces and pushed them duplicates. This includes changes in the start off by making a circle in Top-View.
outward, giving them depth. Switch to model structure and texture, but not 32 vertices should suffice. Place the
side- or front-view and zoom in closer to scaling and positioning. piece over one of the existing blocks
the block. In edit-mode, press ‘E’ or and scale it until in fits neatly inside the
select Extrude from the Mesh menu to To create the whole board, we’ll need to block. I found a 0.6 scale value worked
bring up a pop-up menu. Select Region do some duplication. Bear in mind that perfectly. Then in front view, place it so
from the pop-up menu to start the every alternate block is a different that it rests just on top of the block.
extrusion process. Move the mouse colour, so we’ll need to be careful how Extrude this block upwards 0.2 to give it
upwards 0.2 units and click to accept we duplicate the blocks. Select the depth. You’ll notice that there is no
the changes. We’ll also taper the edge block in object mode, and create linked ‘Region’ option when you extrude these,
a bit, to make it look smoother. To do duplicates of the block until you’ve filled so select ‘Only Edges’ in this case. This
this, extrude the top vertices again, this every other block of an 8x8 grid. Now happens because the circle Blender
time 0.1 units upwards. Accept the create an ordinary duplicate of one of makes isn’t filled by default. We’ll fill it in
changes and then scale them down to those blocks, and place it in one of the once we’re finished with it.
Now we’re going to give this block a make our job a bit easier. Click this Now that you have the correct faces
little notch in the middle. This is easier if button on the 3D view menu to change selected, simply click the Set Solid
you activate wireframe mode with the ‘Z’ to Face Select mode. button and the problem should be
key. Still in front view with the top solved. When you’re done, you can
vertices selected, extrude the vertices change back to vertex selection mode.
again but do not move them. Finally, by using the same duplication
Immediately press ‘S’ and scale the new procedure described before, place the
vertices to 0.9 size. Extrude these new pieces on the correct places while
vertices downwards by 0.02. Now we fill The Vertex-Selection, Edge-Selection
remembering to make linked duplicates
and Face-Selection buttons.
these vertices to create a new face. of the appropriate pieces.
Press Shift+F, or select Faces, Fill from
the Mesh menu. You can repeat this We’ll need to be careful to select the And that’s all I have space for this time.
DESIGN
entire process to create a notch for the correct faces for this operation, and We’ll finish off this scene next month by
bottom edge too if you wish, but it is not we’ll be using box-select (‘B’) adding textures and cleaning up the
necessary because it won’t be seen in extensively for this. All our horizontal lighting. In the meantime, feel free to
our scene. You can simply fill it with surfaces are the ones that need to be play around with the scene on your own
Shift+F and leave it at that. solid, so carefully draw a box around using the texturing principles learned in
the squares representing the four layers Part 3. As always, the completed scene
The piece will still have rough edges in
of horizontal surfaces. You may need to will be available from the Dev.Mag
the render though, so, in Object Mode,
zoom in a lot to do this. Your selection website at www.devmag.org.za
select Set Smooth from the Editing Tab.
should look like the following when
However, rendering the image now
you’re done: CH1PPIT
displays in some strange results.
Above: Selection
PART 4 :
Adding the Quality Touch 2
A well-polished game stands out when it is played. Not just because of the obvious things that have been added
to the game through the implementation of a proper design, but also because of the time and care that has gone
into making the game a pleasant experience for the user. Often these little things are unnoticed by the player but
their very presence in the game makes the player more comfortable and secure in their new environment.
Mouse Control period in the game. This will often allow is as easy as possible is to enable an
people that are working from home to be autofire feature on the players units,
By adding mouse control wherever involved in the game during their breaks this basically means the player does
possible, the user needs little effort to and their time on the phone. not have to continually bang away at
get immersed in the game. Allowing the the keyboard while playing.
DESIGN
user to use any input device of their
choice will also make it easier for players Friendly Environment Sound Issues
to jump right in and play the game. While
the player may not realise the effort that The game controls should impact the A good rule of thumb is to never have
has been put into the game to allow this players experience as little as possible. multiple copies of the same sound
freedom of choice, they will be able to The control panel and score display effect playing at maximum volume at
choose the input device they prefer to should never obscure the player's view the same time, this creates a sound
play the game with. of the game. By fading or moving the effect overload and will drown out other
control panel as the players units come sound effects that might be relevant to
near it the player will always be able to the player in the game. Another
Pausing control their units on the screen. Another mistake often made when polishing a
method to ensure the players experience game is to not fade out music between
A player who is busy playing may be state transitions. While
disturbed by other members of their the game may fade
family -- in this case, they may just between the relevant
pause the game and come back to it screen in an effective
later. By stopping all animations, game way, the music in the
progress and time-based action within game continues loudly
the game, the player can return to find throughout the transition.
the game in the same state as when By fading the music
they left it. A nice addition is to pause along with the screen a
the game as well as the in-game music more consistent and less
and sound effects when the game is intrusive effect can be
minimised. This allows players to spend created.
a small amount of time over a long
CAIRNSWM
Other Players
DESIGN
At all times, your interface should be simple and scheme consistent and always keep the contrast rule
easy to understand. This means that your interface in mind, since you always want everything to be
must be intuitive – in other words, if users can’t clearly visible. Try to keep everything aligned, as bad
nd something via instructions, they should be able alignment makes interfaces harder to understand. You
to nd by making a logical, educated guess. Don’t must always try to group similar things in groups so
confuse users with jargon, and make sure everything that it easy for the user to nd something according
is labelled neatly. You don’t want buttons with a to the group it should logically belong to. If you are
random picture on them and no
explanation of what they do.
Structure
gles I encounter as I (and two of my buddies) usually found myself eager to climb straight into the
build and nish our new and exciting title, Nonex coding and graphics, and before I knew it I had a half
2. The plan with this is that new developers can nished game that looked kind of good, but lacked a
learn from our experiences, and possibly inspire lot of depth and quality.
others to do the same.
My last gaming effort, “Team Boss” was the exception
PROJECTS
Unfortunately, it will be impossible for me to docu- to the rule. I rst made a game design document, then
ment absolutely everything we do, but we will at least made layouts and concept art. The result is that my
cover the most fundamental areas as well as the game had all the planned elements in it at the end of
areas where we struggled the most. So where to the day. Granted, the game wasn’t that great, but it did
begin? Well, you need a plan of action. A certain exactly what I wanted it to do.
this venture. In an order of steps I planned the sys- You can also see that I do in fact plan to sell this
tematic creation of my game. game when it is released. This means that the game
6 Level design and level concept art. “Nonex 2 is a top-down space arcade shooter with
PROJECTS
9 Final game design document with all concept art will be able to buy and sell items at vendors, and loot
and character sheets included, that conforms to the some in the process of ridding the universe of evil
game requirements document. forces.”
12 Asset implementation. (For those who haven’t played it can download it from
13 Beta testing. (Ofcial game testers) my website http://www.apfstudios.com) with a DOTA
14 Bug xing. bar at the bottom. A bigger inventory and skill tree
15 Beta testing. (Ofcial game testers) than DOTA, but less than Diablo 2. And with ships
16 Release demo. that cast “spells”. All this with a 2 – 4 player co-op
17 Market full version game. multiplayer mode, for added fun.
never occurred to me until it was announced as The design of FFS was a rather interesting pro-
the genre for the NAG Game.Dev Forum’s tenth gression. My original idea (heavily inuenced by my
competition. Historically, I’ve had an eye on the RTS obsessions) was to have an inner ring where
goings-on there, but my involvement has typi- you make buildings, and an outer ring populated by
cally been fairly limited. resources which you harvested in order to have the
PROJECTS
necessary supplies to run your restaurants. The idea
When news came in that there was money to be of resources was dropped completely once I got it
made from game development, the greedy bastard through my thick skull that in this context, there was
within was motivated enough to allow the other part absolutely no fun to be had of constantly building
of me, which wanted to make games just for the sake resource collection ships and dealing with supply
of making games, to get along long enough to nally shortages. Unfortunately, that took with it an interest-
sit down and put forward a proper attempt at making ing offshoot idea where you would be able to design
a game. I had no idea what I was going to make, but
by God, I was going to make it.
come up with, and generally pushed the game’s The game’s design document
pened if it had only been me working on the game. Creation of the game world itself went brilliantly.
“One minute it was just me working away tiles went very smoothly. The ship movement was not
on it, and the next, Louis was there, easy to implement, but drawing from prior mathemat-
exuding enthusiasm and just being gener- ics experience gained on a 3D Game programming
ally interested. That rumour people pass course, I managed to put it together precisely as I’d
around that two heads are better than one seen it happening in my head, which in my experi-
could not do, but what it could, it did well, and didn’t
PROJECTS
fall short as the functional requirements of the game
became more complex.
le… eventually.
Crunch Period Having lost the use of his other nine ngers, ET pressed
on!
What went wrong?
The nal 72 hours of development was a blur of
no idea of the complexities and problems than can have a far better ideas of how I’ll be making interfaces
arise. No doubt I’m being over dramatic, but I’d been in future.
blithely building the game, thinking that adding the
interfaces would be a simple matter, and would take unDelphiX
no more than a couple of days. Fate being the ckle
wench that she is, threw me multiple curveballs of Using the unDelphiX graphics library was both a curse
doom™. and a blessing. The library is fast, fairly well struc-
tured, and works on pretty much every machine I’ve
Finding ways to get game data into the interface ever tested it on. (With the exception of ones with very
controls, and ensure that the data stayed up to date old graphics cards) A week into development, I went
ended up being hacked directly into the interface looking to see if there had been any new develop-
objects themselves. That combined with a hastily put ments happening with the library. A newer version had
together hierarchy of interface controls resulted in been released, which I downloaded and installed. Two
PROJECTS
an enormous amount of bugs and difcult to trace sentences back, I’d made a terrible mistake.
performance issues.
Do not under any circumstances, during the develop-
Finding that conventional techniques failed, ET tried its aws. Every graphics library I’ve ever worked with
other methods of persuasion had its own set of problems and quirks.
PROJECTS
design did not include enough diversity to allow for
the game to remain engaging for the full duration of
No explanation necessary.
We had a little less than two months to create the fully underway, and it will be simply bigger and better
game. I thought the people complaining that it was in every way. There are also plans in the works to
too much time were crazy. The amount of dropped have the completed game published. Let’s see how
In Closing
P
athnding is one of the build- values assigned to these are steadily sented as a picture, your array should
ing blocks of AI program- incremented each time the ooding pro- now look something like this:
ming. Whether it’s a bunch cedure is run on the grid.Each block can
of ying monsters coordinating only be assigned a value once – thus,
themselves with one another in a by the end of the routine, these blocks
3D labyrinth or a couple of ene- should have a value corresponding to
mies nding their way to the hero the number of steps required to get from
in a Pacman clone, working a way the entity to any given block, and from
around obstacles as opposed to here it’s easy to get the AI to do what
TECH
through them is an important task you want with regards to pathnding.
for any reasonably smart enemy.
Although there are many tech- Building a simple A* algorithm
niques for pathnding, this arti- Now that it’s initialised, we can take a
cle will focus on a simple – yet To demonstrate the basic workings of look at messing about with its values to
still highly effective – algorithm A*, we’ll use a 2D maze, a generic AI get ourselves a path. In other words,
designed for the job: A*. entity to use the code on and a generic we run our rst “ood” iteration. For
target which this entity needs to reach. this, we’ll need to set up some loop
Overview of the algorithm to make sure that only a smart path will
work for the entity. Since this is just
A* (pronounced “A-star”), also occa- an introduction to the algorithm, we’ll be i = 0;
sionally known as Floyd’s Algorithm, using a static 10x10 integer array for while s = true
starting with the entity’s grid location to zero. Throw in a few walls by chang- //code to check array at position [x][y]
and then proceeding to “ood” the ing the value of some elements to -1. }
grid blocks around it. The blocks Get a value for the entity and the target //additional code follows as necessary
(which is essentially our grid), and the the entity and -3 for the target). Repre-
tialised as “true”, to make sure that i variable will be increased by one, and the loop keeps iterating, the numbers
we run the ood as many times as from here on you’ll be searching for will keep expanding across the grid
we want. “x” and “y” are grid co-ordi- blocks with the value of (i-1). Thus, on until they reach their target, like so
nates. “i” keeps track of how many the second iteration, i will have a value (keep in mind that the whole ood isn’t
iterations of the ood we’ve made of 2 and you’ll be looking for blocks with shown here):
already.As you may have guessed the value of 1. Each block you nd
already, the rst part of our code will have the four surrounding blocks
checks every block on the grid, from checked for zeroes, and will have the
position (0,0) to (9,9). Since this value of 2 assigned if any are found.
is the rst iteration, we want to be The same holds for the next iteration,
checking for a -2 (the grid position of except that i will be 3. Here’s what your
our entity). Once that happens, we ood should look like after the next few
blocks, it means that this block hasn’t when i = 13, we’ve managed to nd
been touched by the pathnder yet, it. Thus, we save the coordinates of
and we can give it the value of i, the target we’ve hit, terminate our main
which is in this case one. This indi- loops by switching the sentinel value
cates how many steps need to be “s” to false and entering a new section
block already has a non-zero value next to it which has a value of one
(such as -1 for a wall), there is no less than variable i (ie. 12). Store
new value assigned. Your rst step that block’s co-ordinates for use later
should end with the array looking like (preferably in a list structure) and then,
You’ve just learned how to use a simple to check the entire grid on each iter-
algorithm.
– catering for multiple targets, pre-
Using the principles here, it’s easy to ferred targets or unreachable tar-
lowing areas:
NANDREW
– allowing for variable maze sizes
TECH
W
orking in a simple text editor with basic veniently provided to import WIK projects, choose
compilation tools is all good and well, New Project from the File menu. Select Import Wire-
but the development world has mostly moved less Toolkit Project from the Mobile group and click
on from that ‘primitive’ approach (with the Next. Ensure that the correct location of your Wireless
exception of a few hardcore masochists, of Toolkit is specied (typically C:\WTK<version>),
MOBILE
course). Modern toolkits include richly featured choose our Tutorial project in the list and click next.
Integrated Development Environments (IDEs) On the Name and Location page you may want to
that incorporate syntax highlighting, debuggers, change the name of the project to simply Tutorial, and
resource managers and more. This all sounds note the location in which the project will be created.
really fancy and expensive, doesn’t it? Note also that your source les will not be moved to
les will be created; if you had to create a new proj- when this le is compiled, Java won’t know where to
ect from scratch, your source les would be placed nd classes like Graphics and Canvas. This is easily
in the same location as your project les. Make sure xed, just go back to your MIDlet java le and copy all
the Set as main project check box is ticked and click the import statements from the top of it (Ctrl+C).
Finish. You will now see the Tutorial project in the
project explorer in NetBeans, expand <default pack- Now go back to the Canvas java le and paste them
age> node to reveal your java source le. If you keep at the top of the le, before the class declaration.
expanding the tree and double click on any of the Within a couple of seconds, all those angry red lines
elements you will see that this view allows to to jump and blocks will disappear. These early indicators are
to source les, classes, or even individual methods extremely useful, so get used to using them early on.
and member variables. Now that we’ve neatened things up a bit, let’s make
MOBILE
Below: Project Tree
this is proper Java practice. To do this, right click
will compile and build and the familiar emulator will gure out what some of them are for. If you manage to
pop up ready to run your game. Close the emulator ‘break’ something, you can always delete the project
and lets do some nal poking around in the IDE. and re-import it. There is also context sensitive help
We’ve had a look at the source code, and it’s obvi- on each of these options, just press F1 at any time to
ous where you need to look for those, but what see help relevant to what you have selected.
click on the Tutorial project and select Properties for this I would suggest you download the SonyErics-
to open the project properties window. As you can son SDK from http://developer.sonyericsson.com/site/
MOBILE
see there are loads of options but for now open the global/docstools/java/p_java.jsp, and possibly what-
Libraries and Resources page under the Build group. ever emulator matches your own cellphone.
You will see that the import process automatically
added your res folder to be included in the project. At Until then, enjoy digging around NetBeans to see
this point feel free to explore the settings available what it offers.
FLINT
“NetBeans allows us to
at build time. “
TAILPIECE
for Game.Dev, with this year sporting a bigger
stand, bigger prizes and ... well, heck, a bigger
everything, really. And as it turns out, bigger
surrounding chaos made the meetings a little bit less were given hands-on presentations of how neat Game
heartwarming, but still got people motivated to work Maker was, or even got to see just how awesome
together on some of Game.Dev’s projects at rAge: some of the community’s games really were.
Game.Dev (along with your ever-reliable Dev.Mag These weren’t harmless little DVDs either – each
journalist!) naturally wasn’t too busy to pass up the had over 4 gigs of indie games, educational videos,
opportunity of checking out the big hoo-hah sur- podcasts, websites, resources, toolkits, engines, sam-
rounding Microsoft’s brand new console. Aside from ples, tutorials and crocheted sweaters at the wannabe
a very fancy and very exclusive launch party at game developer’s disposal for absolutely no cost.
TAILPIECE
BT Games launch of the console at midnight on the
29th. This included giving away a nice big stack
come up with.
business!
The presence of Game.Dev at rAge has massively assisting Game.Dev or Dev.Mag in any future endeav-
increased since last year, and more events (includ- ours, be sure to visit www.gamedotdev.co.za or e-mail
ing next year’s rAge) are already in the organisa- Dev.Mag at [email protected]. As for rAge – if you
tional pipeline for both Game.Dev and Dev.Mag. It’s saw us there, we hope you had an awesome time!
amazing fun taking part in the Game.Dev activities, If you didn’t go, then make sure you do next time
and hopefully some of you are reading this after around, when it’ll be bigger, better and even more
TAILPIECE
Comp 10 announced its winners at rAge 2006, in front of many enthusiastic game developers and
general rAge attendees. Giant cheques were a feature, although they weren’t quite as cool as the R10
000 in cash prizes that got handed out! The winners were as follows:
www.devmag.org.za
devmag.googlepages.com