Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Multiplayer Games
Plus… Instant Collisions
Ammunition
Arrays & Lists
Clever AI
Registry
And Much More!
work with most any team however) we team plans and the like.
go on to.....
Sharing work
When you are working in a geologically
separated team, you need an efficient
way to store and distribute work, and to Table of Contents
list who will work on what. Editorials
Teamwork - Part 2 ............................. 2
Email can help with this to an extent, The MMORPG Makers ...................... 5
but there are a lot of good (and free) SVN 3D vs. 2D Games .............................. 10
tools out there that can make the SVN is the ultimate way to keep source Tutorials
process a lot easier. code files synchronized between
Arrays vs. Lists.................................... 4
members of a team; it can work for just AI: A Clever Opponent ....................... 6
Basecamp one person (to keep play-by-play File Search Functions ......................... 9
http://www.basecamphq.com/ backups) or for 10,000 people. Ammo .............................................. 15
Game Maker and the Registry ......... 21
Basecamp is probably the most well
Instant Collisions .............................. 23
known online collaboration tool. It lets
Reviews
you manage “projects” (the free version
allows only one project, with unlimited Seiklus (17) ....................................... 11
participants), with events, deadlines and Arena ............................................... 13
Coaster Rider ................................... 27
issues. It works like a specialized forum,
2P Shooter ....................................... 28
allowing team members to track every
detail of the project. Resources
GMR Featured Resources .................. 3
Dev Tools - Dragon Script .................. 7
Script of the Month ........................... 8
Interview of the Month
Best of all, you can get SVN hosting for
Martin “FredFredrickson” Crownover ... 18
free. Two popular sites to get said
hosting are assembla.com and
unfuddle.com.
Conclusion
So what if you want complete game Still can’t find what you want?
examples? Check Simon Donkers out. GameMakerResource.com has links to
His site has a complete collection of full plenty of other Game Maker sites with
working game examples created in examples for you to download; so if you
GM5 and 6 including breakout, snake, can’t find what you want here, jump on
Pacman and more. There are also a few there and browse the rest of the sites in
examples that aren’t full game our listing.
examples there as well.
Remember as with all resources to give
credit where credit is due. Creators
GM Resources deserve credit for their time and effort.
http://xrl.us/gmres
Jason Stockton,
GameMakerResource.com
Know what you’re looking for? GM
Tutorials has a group of creators who
constantly add to the list of examples on
Tinyweb
The tinyweb DLL is a web
the site. There are currently over 200
QUICK REVIEW
browser DLL that allows you to
examples and tutorials ranging from RTS
embed either local .html
examples to fog or even a scroll bar
documents in your game, on
example. Just go to the site and have a
even better, allow your game to
look.
open certain sites within. There
The tutorials are handier for novices as are other browser DLLs out
they provide a bit of a walk through to there, but this one is tiny, easy
go with any examples that they may to use, and comes as an
include with the tutorial. extension, library, and a bunch
No it’s not the GM Resource, its GM of scripts as well. The source is
also included.
Get it now!
EDITORIALS
The MMORPG Makers
I’m not sure if I missed something when the week. The more experienced users fell apart (though if anyone is
I joined the GMC. I think there were a will be coyer about their plan and then interested in reviving it, contact me).
set of rules for new members which I either decide not to follow it through or The truth was, of course, that I knew
somehow didn’t find. It’s a great shame disappear for a few weeks as they work nothing near enough about creating
I haven’t found them really. At least on a starting demo. multiplayer games and I just wasn’t
then I might be able to understand the up to it.
more chaotic of people’s decisions. The truth is that creating a MMORPG
takes an awful lot of work. You need to What I’m trying to say, I suppose, is
In almost every board on the GMC, it is set up servers, understand all the online that you have to know your
possible to find a topic by someone functions inside out and also create limitations. Although you should
wanting to create an MMORPG. This something that’s actually worth playing. always try and do your best, and
person usually would have joined in the Nobody wants to look at their player make a game as well as you can, you
last few weeks, or has been around for standing in a room and not being able to shouldn’t try and do something that
at least a year and a half. There’s rarely move them. you’re incapable of. It just doesn’t
someone in between those times. follow. Having said that, if you can
I tried to make a MMO once. It was do, you should go for it.
The new members will be really going to be a platform game where the
enthusiastic about their project, user could design their character and Gregory
expecting to have a game better than then use it to explore the online world.
big names like RuneScape by the end of When I got to making it multiplayer…it
http://gmc.yoyogames.com
http://markup.gmking.org July, 2007 5|Page
TUTORIALS
AI: A Clever Opponent TUTORIALS
The burden of creating artificial piece of code: Put this code in the create event, too.
intelligence is that it is so hard to
program. Professional developers can
{ And there we go. Now we have our grid
mp_grid_create(0,0,room_width/16, all set up and ready, so the last thing we
take months or even years just figuring room_height/16,16,16);
out AI for a single enemy. Luckily, Game }
do is make the enemy follow the path.
Maker comes with a feature that can Path? Did someone say path? Oh, that’s
help this problem, which is motion That creates our grid. But we want to be
right. Before you go on, make a
planning. able to refer to it. So, we change it into:
completely empty path with nothing in
Motion planning is a simple yet effective { it. Call it pth_move. This may sound
grid_id = mp_grid_create(0,0, funny to you, but you’ll understand.
way of doing ‘search’ AI. In this tutorial, room_width/16,room_height/16,16
you can learn how to make your own ,16);
}
Now, here is the big finale. In the step
search AI and have an enemy chase event of the enemy, put the following:
after you. More information is provided
Now, we can refer to the grid by using
in the GM Manual > GML > Gameplay > {
the variable grid_id. mp_grid_path(grid_id,pth_move,x,y
Motion Planning. This tutorial is for
,obj_player.x,obj_player.y,true);
creating a basic. More can be done, Well, we have created a grid, but that path_start(pth_move,1,0,false);
though. does not mean it does anything. It just }
sits there, soaking up your RAM and
The first thing you need to do is set up a I’ll tell you what this does.
CPU process. So, now we have to make
grid the MP will be worked out on. This mp_grid_path sets the path we selected
it do something.
is simple, and can be done with one (pth_move) and edits it so that it
function. Let’s say that we have an object, becomes a path between the starting
obj_block, that we want our enemy to point (3rd and 4th argument, enemy x
In the create event of your enemy, type:
go around and try to catch the player. and y) to the goal (5th and 6th argument,
{ Here, we use the following piece of obj_player.x and obj_player.y), it sets
mp_grid_create(left,top,hcells, code: the grid that we put this path on,
vcells,cellwidth,cellheight);
(grid_id), and finally, the 7th argument,
} {
mp_grid_add_instances(id, allows diagonal paths (if you want
object,prec); straight lines, set this to false.)
Now, to set this up, we first have to
}
specify the left and top of the room.
The next piece of code simply starts the
This is obviously 0, 0. That part is easy. Let me explain this. The MP grid works path. It starts pth_move at a speed of 1
Next, we have to decide how many cells on spaces that are available and (this can be changed.) Warning: DO NOT
go horizontally. To do this, we must first unavailable. So, to make our enemy go CHANGE THE LAST TWO ARGUMENTS.
figure out the width and height of our around the unavailable spaces, we want This will make the path be un-relative
squares. You will usually want either to set obj_block as unavailable. We can and try to loop. You DO NOT want this!
16x16 or 32x32. Let’s say we’re making also add the grid id, which we defined
a game where the AI searches on 16x16 inside of grid_id. Prec is short for Well, that’s it, a guide to using search
squares. So, the cell width is 16, and the precision. You should usually switch AI. This article only covers the basic
height is the same. Now, we can get precision on to create a better effect. So functions, but you can look in The GM
back to figuring out how many should now, we can modify our code to this: Manual > GML > Gameplay > Motion
go horizontally and vertically. Note that Planning for more information. I hope
{
in order for this to work, the room this guide will be of use to you as you
mp_grid_add_instances(grid_id,obj
width and height must be a power of _block,true); progress in your AI career.
the width and height. So, for hcells and }
EDITORIALS
3D vs. 2D Games
The comparison between 2D and 3D very extendible, multi-dimensional someone would need to make a
games is, to most, striking. Whilst 3D situation whilst 2D is preferred for Pacman or space invaders game in
games give you a sense of depth and simple, smaller games. 3D. If anything, this would take away
three vertices to play with, 2D can only the fun of it – the original, traditional
attempt to give a real-world feel…and The third dimension allows producers of
gameplay element.
tends to fail. games to make various different
extensions to simpler 2D gameplay. A It is the extendibility of 3D games
But why is it that 3D games are more first-person-shooter can give the player that make them so popular to the
popular to gamers of today? Looking at the opportunity to hide behind walls or gaming audience. It's not often that a
the top video game sales at Tesco’s above their opposition; something 2D game is made that has a great
earlier this morning, only one of the which 2D top-down games cannot offer storyline and complex and dynamic
twenty shown did not have a 3D so easily. In racing games too, the third gameplay. With 3D, that's a breeze.
environment. But said game was dimension can give a z-axis, letting cars Thus, you can make a simple mini-
interface based and so was barely 2D go off ramps, or really fly in collisions. game in 2D very successfully but, if
either. you want to make something really
That isn't to say that 3D is the best
vibrant and exciting, 3D is what
The main gaming difference between arrangement to use though. Simple
should be used.
2D and 3D is, in my eyes at least, is what arcade or puzzle games work perfectly
you can do with each one. 3D provides a in 2D. There is absolutely no reason why Gregory
Graphics
Game graphics are those of platform
games can’t really judge them because
that is how old school games should
look, I do not think platform games have
reached their full graphics potential, but
that is no one’s fault as much as those
commercial developers, they got us
http://markup.gmking.org July, 2007 11 | P a g e
REVIEWS
Seiklus (17) Cont. REVIEWS
used to the idea that platform games
should look like this.
Music Conclusion
Sound effects
Turn off your speakers and on with your The game is addictive yes, but it gets
Well, there are very few sound effects in
headphones! How could anyone stand boring after a while, in my opinion the
the game but they are generally ok, the
that much repetition, but on there game achieves greatness if the player
game does need more especially during
“plus” side there are silent areas were wishes to play it more than once which
movement, walking of jumping not just
you get no music, so I urge you if you this one has failed miserably.
when being kidnapped, taking the
are playing this game put on your own colored fire things, or playing the giant It all starts here,
playlists on your music player, the music piano. Michael Sharaiha
at first is stimulating but after a few
minutes of game play it starts to get Conclusion
annoying.
Pros: Enjoyable theme,
gameplay, and overall feel.
Ratings
Cons: Unpleasant to the Game Play
eyes and ears. 10
Overall 8 Controls
Download Size: 2.6MB 6
Download Type: Game .zip 4
Author: clysm, autofish.net 2
Released: 8/15/03 Sound FX 0 Presentation
Get it Now:
http://xrl.us/seiklus
Music Story line
Graphics
12 | P a g e July, 2007 http://markup.gmking.org
REVIEWS
Arena REVIEWS
awkward reaching across your depending on the options you select. If
What they say opponent to the other side of the your opponent dies before you, you
Arena is the two-player game where keyboard. With a vast array of in game win. It doesn't matter whether your
opponents battle within the confines of customisation available and Arena's opponent is killed by sentries, yourself
a random maze. With lots of options amazing random maze generator, each or a combination of the two. If the
and multiple paths to victory, Arena is game really is different. option is selected you can win if at any
never the same game twice. This is a stage during the game you have full
It is possible to win within seconds or
great rivalry game where two good health - of course for this to work
games can last 20, 30 minutes or more - players must not start with full health.
friends can sit down and blast away at
it all depends on how you choose to set There are also circular bases dotted
each other. This is my first original video
up the game and your starting position around the maze, the number of which
game.
in relation to sentries, bases, powerups can be specified in game setup. If any
and your opponent. one player controls all bases they win.
Review
A key aspect of the game is
Arena lives upto and exceeds my
customisation - there is so much about
expectations. I first downloaded this
the game you can modify and this can
game in 2003 and I am still playing it
change the game dramatically. You can
today. Games which have two players'
control the availability of powerups,
controls contained within a single
these consist of double fire toggles,
keyboard often spell disaster, however
bouncing bullet toggles, and coins which
in Arena there are no key clashes, or
represent health.
As well as setting
the number of each
kind of powerup to
be randomly distri- As well as your opponent you also have
buted around the to watch out for the in-game sentries.
maze, you also de- These patrol certain areas of the maze
cide whether or not in a straight line, constantly shooting
the powerups are out. If you get hit by a bullet you loose
replenished during health, but beware sentries will also
the game or if once collect powerups to improve their
they are taken they bullets and increase their health if they
are gone. You can are in their path. Sentries also collect
even export your bases if they come across one, so watch
favourite configur- out!
ation to be loaded
next time you play As a two-player game Arena makes use
Arena. of Game Maker's views function to
enable a split screen, one side following
So, what is the aim each player around the maze. If you're
of the game? There quick you may be able to grab a sneaky
are a number of glance of your rival's location, but
different ways you likewise this makes you vulnerable too.
can win Arena -
http://markup.gmking.org July, 2007 13 | P a g e
REVIEWS
Arena REVIEWS
There are no notable bugs in the game,
the maze generator only creates
solveable mazes, so there is no chance
of being isolated from half of the game.
The only slight problem is that, if you try
hard enough or are unlucky enough, you
can get your ship stuck on the end of a
section of maze wall - however this
occurs very rarely.
CONCLUSION
Customization Music
Phil Gamble, GameMakerBlog.com ■
ADVERTISEMENT
ADVERTISEMENT -
ADVERTISEMENT -
ADVERTISEMENT -
variable ammo:
ammo=50;
Display
To draw the current amount of bullets
the player is allowed to fire, a simple
draw_text function is used:
draw_text(X,Y,string(bullets));
//edit X and Y
draw_sprite(sprite_index,image_index
,x,y);
if (reloads>0)
Limiting the number of {
RELOAD
reloads reloads-=1;
}
Dawn of the Infested, a Game Maker
Getting more reloads game, allows the player to choose
between multiple weapons
A ‘package’ that gives the player some
ammo could simply be an object that Basically, each weapon will have its own
lies somewhere on the ground of that index value, and a new variable will be
world. On the collision event for that added that stores the value of the
object, the player should “take” the current weapon being used.
package – meaning the package object
will have to be destroyed, and the Initialization
The player can obtain packages to number of reloads should be Initialization is now different; the
increase amount of reloads in Falcon
16 | P a g e July, 2007 http://markup.gmking.org
TUTORIALS
Ammo Cont. TUTORIALS
number of bullets for several weapons string(ammo[current_weapon])); break;
//edit X and Y case 1:
must be initialized, as well as the new
SHOOT 2 COMMAND;
current weapon variable:
Reloading break;
case 2:
ammo[0]=50; The variable ammo would be replaced SHOOT 3 COMMAND;
ammo[1]=50; with ammo[current_weapon] instead. If break;
ammo[2]=20; }
you are also monitoring the number of
reloads[0]=5;
reloads[1]=10; reloads, the reloads variable will
reloads[2]=2; become reloads[current_weapon] as Getting more reloads
current_weapon=1; well. The actual reloading increases the
number of bullets for the current
Display Shooting the Bullets weapon, but for increasing the number
This time, only the number of bullets for Same as before, each ammo variable of reloads for a particular weapon, it
the current weapon should be would be replaced with becomes different.
displayed. The value of the current ammo[current_weapon]. This includes the
weapon variable could be used to Different packages exists for different
‘if’ conditions and the subtraction of
return the number of the bullets weapons, and when a player collides
number of bullets for that weapon.
available for that weapon. with a particular package, this package
Now, to choose for what type of bullet only increases the number of reloads
The way this is done is by replacing: to be actually shot, a switch statement allowed for a particular weapon,
is used: whether or not it is the current weapon.
draw_text(view_xview+X,view_yview+Y,
string(bullets)); //edit X and Y Multiple objects could be created for
switch(current_weapon)
{ different packages, each supposedly for
With: case 0:
a different type of weapon. The
SHOOT 1 COMMAND;
draw_text(view_xview+X,view_yview+Y, reloads variable is then replaced by an
array: reloads[#]. The “#” could be
replaced with a fixed number (in this
example 0, 1, or 2) corresponding the
weapon this package is related to.
Conclusion
Many – if not most – of the shooter
games out there take advantage of such
a system of ammunition. I hope this
guide has made it easy for some of you
to create your own shooter game.
Eyas Sharaiha
playing intros and trailers inside the game.
QUICK REVIEW 18 | P a g e
Get it now!
http://xrl.us/2iai
July, 2007 http://markup.gmking.org
INTERVIEW
Martin “FredFredrickson” INTERVIEW
http://markup.gmking.org July, 2007 21 | P a g e
TUTORIAL
GM and the Registry Cont. TUTORIAL
key, you’ll notice the MyGame subkey, this in the registry editor: the created:
HKEY_CLASSES_ROOT key starts with a
containing the real value (REG_BINARY)
PlayTime set to 6. huge list of file extensions, followed by registry_write_string_ext("GameFile ",
an even longer list of file descriptions. " ", "A file type used by my game ");
Now there’s still one thing that needs to Some keys and values are required:
The default value of this key is used as a
be explained: setting the root. Up till
now, we’ve only written values to the A key with the file extension is description for your game file. Now
created e.g. subkeys need to be added to this key. The
HKEY_CURRENT_USER key (which is the
“HKEY_CLASSES_ROOT\.gmf”. first one sets the icon for the file:
default used by Game Maker). This can Whenever a key is created, is
be changed by using the always has a default value registry_write_string_ext("GameFile\De
registry_set_root function. This (which is actually <no value>). faultIcon","","C:\Program
function requires only one argument, a This default value is then set to Files\MyGame\icon.ico");
real value indicating the registry root: e.g. “GameFile”. Now what does
that mean? It is the name of the “DefaultIcon” is the key where the icon file
0. HKEY_CURRENT_USER file description that can be path is stored (you cannot choose this
1. HKEY_LOCAL_MACHINE found lower in the list. Actually, name yourself, it’s predefined). Also note
2. HKEY_CLASSES_ROOT the only thing this key does is that it is again the default value that is
3. HKEY_USERS
refer to a key that contains the used to store the filename of the icon file.
And now, you have full access to all keys
real file association information.
of the registry. A small remark here: as Now the “open” key, that is the key that
This latter key also contains
you might’ve noticed in the examples, some subkeys. contains the information on how to open
subkeys can be passed by using the “\” So how can this be achieved by using the file, needs to be created. The “open”
sign. That way, you can get the value of GM’s functions? Let’s say you have a key is a subkey of a key named “shell”. To
values in subkeys. game that can open the “.gmf” file create it:
extension. The first thing you need to do
Reading values from the registry registry_write_string_ext("GameFile\sh
is set the registry root to ell\open","","Open with &MyGame");
happens in exactly the same way. HKEY_CLASSES_ROOT:
Although these functions allow you to This piece of code creates the “open” key
registry_set_root(2);
read from and write to the registry, they as a subkey in “shell”, which is also created
can’t be used to e.g. get the number of From now on, all data will be written to (you cannot choose these names yourself).
subkeys in a key or the number of HKEY_CLASSES_ROOT. The first key to As you can see, the default value is this
values in a key. Too bad, but the current write is the key named “.gmf”: time set to “Open with &MyGame”. This
functions are more than sufficient to text will be displayed as an item in the
registry_write_string_ext(".gmf","", menu that is shown when the user right-
add some nice functionality to your
"GameFile");
games and programs. clicks the file icon on his desktop. The “&”
sign does something special. It indicates
This piece of code writes a new key
the letter to be used as a keyboard
“HKEY_CLASSES_ROOT\.gmf” to the
Tips ’n tricks shortcut. In this case, it would be the M of
registry and sets the value “GameFile”
“MyGame”. So suppose the menu is open
File association (you can choose this name yourself) to
and the user does not use the mouse to
By writing some data to the registry, the default value .When you want to
select that menu item, then he can press
you can associate files with your game change the default value, you need to
M (not Shift+m) on his keyboard. That will
or program. The registry key where all pass an empty string as the value name
give the same result.
file associations are stored is the to the function.
HKEY_CLASSES_ROOT key. You can check Now the “GameFile” key needs to be
22 | P a g e July, 2007 http://markup.gmking.org
TUTORIALS
GM and the Registry Cont. TUTORIALS
(HOMEPATH).You can view all these
Now there is one key that needs to be startup.
values in the registry editor.
added:
For that, we need to use another Game
The Environment key
registry_write_string_ext("GameFile\ Maker function: parameter_string(n)
shell\open\command","",'"C:\Program This key can also be found in the
Files\MyGame\mygame.exe" "%1"'); The parameter_string function returns HKEY_CURRENT_USER key:
the string of the n-th parameter that
The key is called “command” and is a HKEY_CURRENT_USER\Environment
was passed to the game at startup.
subkey of “open” (you can’t choose Since we gave this parameter index 1, it Interesting values in this key are the
these names yourself). Note that 2 can be retrieved with: user’s language (LANG) and the link to
parameters are passed this time. These
his temporary directory (TEMP or TMP).
need to be put between double quotes. filepath=parameter_string(1);
As a consequence, single quotes must
be used in the piece of code. The first The filepath variable now contains the
parameter is the link to the game’s value of parameter 1. The value of that
executable. The second one is “%1”. parameter is the path to the file the
This requires an explanation. At startup, user opened. And now the problem is
some parameters can be passed to the solved. Windows will open the file with
game. These parameters all have an your game and your game knows which
index. The “%1” value indicates that this file the user wants to open.
parameter will have index 1. Voilà,
The Volatile Environment key
that’s all for the file association. It might
This key can be found in the
be necessary to log off and log on again
HKEY_CURRENT_USER key:
for the changes to take effect.
HKEY_CURRENT_USER\Volatile
Okay, so the file association is done. Environment
Windows knows which icon to display
for the “.gmf” file extension and the It contains some interesting values e.g.
path to the executable to open it. The the current user’s application data
problem is: the game doesn’t know yet directory (APPDATA), homedrive
that it needs to open that file on (HOMEDRIVE) and the user’s directory
Conclusion
QUICK REVIEW
Hello, in this article, you will learn the That code simply defines the variables each pixel to find its destination, 4
common mistakes in 2D shooters. and chooses which entry will take place works great but sometimes it goes
for the variables. Ex: through the blocks, change this around
instant_collide(12,4,90,1000,solid);
to change the performance of the game.
Common Mistakes That example would set the X1 to 12, Y1 Higher value = better FPS, Lower value =
Some of the most common mistakes to 4, DIR to 90,the max distance to worse FPS.
made in these games are the bullets. 1000pixels, and the object to stop at to
Some people use the retro style bullets Now we will add more code into that
SOLID
where the bullets move rather slow, but do{} event so it not only just adds on to
most people don't like waiting for that The SOLID means the range will stop at a variable.
little black ball to move toward their a solid.
Add this code into your script:
target. This is a common mistake in
games. This can easily be fixed with xx = x1+lengthdir_x(dist,dir);
something called "rangefinding" it finds The Script’s “Brain” // just the direction of fire and
a range of pixels and returns true or Now since we know what the code stuff.
above does, we can now go into the real yy = y1+lengthdir_y(dist,dir);
false if the range ends before it hits its dx = xx; // destination X
maximum distance. Most people do not coding.
dy = yy; // destination Y
know how to make this but it is actually We will create a do{} to repeat the code
very simple. The lengthdirs are just a directional
until a certain point. This can be helpful
virtual line, they are updated every time
in games.
the do{} event is run so they add on
Starting the Script Put this code into your game: pixels to the range.
Start with a script in your game, name
the script: "instant_collide". do { The DX and DY are the return values;
dist+=1; these are the Coordinates you will use
Now so it is user friendly and a lot like a later on in the script.
function, we will add arguments to the The dist+=1; means that the script scans
script. Add this code into the script:
x1 = argument0; // Source X
y1 = argument1; // Source Y
dir = argument2; // Direction to shoot
EX: point_direction(x,y,mouse_x,mouse_y);
N_menu DLL
maxdist = argument3; //maximum The N_menu DLL allows the
QUICK REVIEW
distance. so the game dosent crash if it
goes out of the room.
user to create real Windows
obj = argument4; // obj/flag to stop menus for inclusion in a
at. i always enter "solid" (without game/tool. Many capabilities
quotes)
dx = 0; // just to define destination exist for adding images,
x,y submenu items, events, and
dy = 0; more. The example is available
col = 0;
var xx,yy,dist; // make the variables.
only in .gmd, but could be easily
dist = 0; converted to .gm6 and .gmk
through Game Maker. A GEX
Do not include the quotations. Now we extension is also available.
have made our variables, and are ready
to get into the good stuff. Get it now!
24 | P a g e QUICK REVIEW
July, 2007
http://xrl.us/nmenu
http://markup.gmking.org
TUTORIALS
Instant Collisions Cont. TUTORIALS
Now we need to end the do event with distance. so the game dosent crash
a bracket and an until(); if it goes out of the room.
Executing the Script in
obj = argument4; // obj/flag to stop
Insert this code into the script: at. i always enter "solid" (without Game
quotes) Now we want to run the script in-game,
} dx = 0; // just to define
until(position_meeting(dx,dy,obj) or destination x,y
make 3 sprites:
dist>maxdist); dy = 0;
col = 0; spr_block
That checks if the position of the range var xx,yy,dist; // make the spr_player
has hit a solid object, or the object you
variables. spr_bullet (2x2) origin=1x1
dist = 0;
preferred, and it also checks if it do { // we use this do {} statement
Use the settings provided for the
reached its max distance, so the game to keep going each pixel.
dist+=1; // add on to the sprites.
doesn’t freeze if you don’t hit anything.
distance so we dont stop until we
hit something. You can set your player sprite to
xx = x1+lengthdir_x(dist,dir); whatever you want. The same will
Finishing the Script // just the direction of fire and
happen with the block.
Now what we need to do, is make the stuff.
yy = y1+lengthdir_y(dist,dir);
return variables and simply make an Now create the block object, and set its
dx = xx; // destination X
if() event to make it more user dy = yy; // destination Y sprite to the spr_block.
friendly to check if it has collided or not. } until(position_meeting(dx,dy,obj)
or dist>maxdist); Don’t add any code to the block; just
Add this code into your script: if(position_meeting(dx,dy,obj)) { // check the flag "Solid". Then create the
if the destination has collided with
bullet object. Set its sprite to spr_bullet.
if(position_meeting(dx,dy,obj)) { // something.
if the destination has collided with col = 1; // yes it has.
Add a STEP event to the bullet obj and
something. } else {
col = 1; // yes it has. col = 0; // no it hasnt. add a code block. Add this code into the
} else { } Step event:
col = 0; // no it hasnt. return dx; // return it, so we
} can use to draw.
return dy;
The code above checks whether it has
collided or not. This can be useful.
Ultima 3D Reloaded
Now we need the returns. These are
Ultima 3D Reloaded is a 3D
what we need to even create a bullet.
QUICK REVIEW
EX: point_direction(x,y,mouse_x,mouse_y);
http://xrl.us/ultima
maxdist = argument3; //maximum
Graphics
The game has excellent graphics!
Whether it is the Pegasus itself, the
trees, the smooth grass and pieces of
“floating land”, the starts that you need
to collect, or the effects you get when
you collect them. Amazing. I will be a
fool if I gave it anything less than a 9.
Graphic Effects
The game has subtle graphic effects, because it really fits with the game’s
only here and there. The good thing is theme. The game suddenly becomes
not overused, and it is true what they more exciting, more intense, and more the first level. The game’s level design is
say “less is more”… but that’s too little! capturing – excellent work! 9 out of 10. rated 9.
The game gets a 7/10 in Graphic Effects.
Phil Gamble,
GameMakerBlog.com ■
Conclusion
Get it now: http://xrl.us/2pshooter
Download Size: 1.3MB
Author: Jack Sanders
Released: 16 June 2007
Docs
10
8
Overall 6 Graphics
4
2
0
Customization
28 | P a g e July, 2007 http://markup.gmking.org
THE WRAP UP
Until Next Time! THE WRAP UP
And that was it! Issue 5 of MarkUp done for us. The YoYo Games staff is feedback, support, and comments; the
magazine and our first issue since the one of them, and all the MarkUp staff help was truly appreciated!
YoYo Games endorsement went public! thank them for bearing with us, and for
We hope you see this issue as an the wonderful job they carried out. We If MarkUp is to grow, we’ll need your
improvement, as we have got a lot of also appreciate the support that the help! You could help us by contributing
support and feedback from the GMC moderators have shown us. anything to the magazine, whether it is
community. We truly hope this issue articles, art, or any other form of help.
Also a big ‘thank you’ to To contribute to the magazine you could
was satisfying in every way.
GameMakerBlog.com, GMLscripts.com, visit the MarkUp forum here, or by
We started talking to YoYo Games and GameMakerResource.com, and directly contacting either Robin or Eyas
thinking about the endorsement since hopefully soon – GMBase, they’ve been via e-mail (see MarkUp site) or PM.
April this year, and it has been exciting a great help. We also want to show our
so far! But more exciting than knowing gratitude to everyone who has What does the future hold for MarkUp?
what was about to happen, and waiting contributed to MarkUp, including our Well, as our readership increases, we
for the right time to announce it was GMking.org ‘Journalist’ staff, and expect to get more comments,
the feedback we got from the entire everyone else who has wrote for feedback, and hopefully support. We
community once the announcement MarkUp. hope our future issues will be of higher
took place. quality – and that could only happen by
But more importantly, we at your much-valued contributions!
There are many people we’d like to GMking.org would really like to thank
thank for all the hard work they have you – our readers, for giving us Once again, thanks for your support!
The MarkUp Staff
The audcast is approximately 20-30 minutes long, and in it we discuss various issues occurring in the Game Maker world, and
give advice to our listeners when it comes to using Game Maker.
We have received amazing support from the Game Maker Community! The great support has motivated us to continue
working on the audcast and improve it. We’ll be soon talking with some notable community members and we’ll start adding
some fun to the audcast as well!
Thank you for your amazing support so far, and please: keep those suggestions coming.
Markup is an open publication made possible by the contributions of people like you; please visit markup.gmking.org for
information on how to contribute. Thank you for your support!
©2007 Markup, a GMking.org project, and its contributors. This work is licensed under the Creative Commons Attribution-Noncommercial-No Derivative Works 2.5 License. To view a
copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/2.5/ or send a letter to Creative Commons, 543 Howard Street, 5th Floor, San Francisco, California, 94105,
USA. Additionally, permission to use figures, tables and brief excerpts from this work in scientific and educational works is hereby granted, provided the source is acknowledged. As
well, any use of the material in this work that is determined to be "fair use" under Section 107 or that satisfies the conditions specified in Section 108 of the U.S. Copyright Law (17
USC, as revised by P.L. 94-553) does not require the author’s permission.
The names, trademarks, service marks, and logos appearing in this magazine are property of their respective owners, and are not to be used in any advertising or publicity, or
otherwise to indicate sponsorship of or affiliation with any product or service. While the information contained in this magazine has been compiled from sources believed to be
reliable, GMking.org makes no guarantee as to, and assumes no responsibility for, the correctness, sufficiency, or completeness of such information or recommendations.
http://markup.gmking.org July, 2007 29 | P a g e