Forums

Post youre tips and tricks :D


Subscribe to Post youre tips and tricks :D 62 posts, 23 voices

Pages: 1 2 3

 

Aug 28, 2007 8:38pm

pumpkin pumpkin 5657 posts

well yeah! The title says it al!
Share tips and tricks you use for youre game! I doesnt matter if theyre good or bad... Well yeah if theyre som simple basics dont post them... but thats the only rule... errr... HAVE FUN!

draw_sprite(healthbar, global.kinhealth, view_xview[0]+2,view_yview[0]+1);
this is my favorite trick ^_^ it creates a functioning megaman style health bar! With some variation in the sprite you can create Real Zelda lifes and stuff like that ^^

 

Aug 28, 2007 8:46pm

emofire emofire 16 posts

image_alpha is a handy way to make things half see through.
Its best to set it to about 0.4 for the best effect.

 

Aug 28, 2007 8:47pm

icedraven icedraven 93 posts

Well this isnt exactly a trick but since alot of people ask about menus this may help them.

I find when making menus you dont need to do all that much, a few nice sprites or just a nice background, set yourself some paths if you want movement and just use the old fashioned press Enter etc to move to another room (which is yet another menu perhaps with controls, game objectives etc). Same if you want something at the beginning of your game, just do the starting street with a nice bit of instruction ontop and press any key to progress.

Yup, nothing fancy, advanced nor even complex but will solve some issues people have with menus. Its a little bit of a cheat to avoid actual control on them but it gets the job done,.

 

Aug 28, 2007 8:57pm

Ulrik04 Ulrik04 356 posts

instead of using cruled bracers ( { and } ) you can use begin and end
example:
if (x < 100) begin instance_create(x,y,obj_something); instance_destroy(); end
instead of
if (x < 100) { instance_create(x,y,obj_something); instance_destroy(); }

can be useful in some ways :P

TWILIGHTPHANTASM.COM! NOW! MUAHAHA! MUAHAHAHAHAHAA!
*drinks tea*

it's the eye of DO_OM

 

Aug 28, 2007 9:32pm

ConnMon ConnMon 33 posts

Hmm.....

view_hborder=view_wview/2 -obj_player.sprite_width
view_vborder=view_hview/2 -obj_player.sprite_height

w/e sprite u put in the 'obj_player' is always in the center of the screen. Also, it needs to be run after every sprite change.
AND!!!

spin+=10
x=obj_Player.x+lengthdir_x(obj_Player.sprite_width*1,spin)
y=obj_Player.y+lengthdir_y(obj_Player.sprite_height*1,spin)

tht makes the object u run it with go in a cirlce around w/e sprite u put in for 'obj_player.'

 

Aug 28, 2007 9:57pm

drizzt7 drizzt7 4170 posts

image_angle=point_direction(x,y,instance_nearest(x,y,enemy).x,instance_nearest(x,y,enemy).y)

will make the thing you put it in look towards the nearest object (in this case, enemy)

Work in progress:

 

Aug 28, 2007 10:09pm

NT NT 6160 posts

Quoteglobal.yourname=get_string('Hello, what is your name?','nobody')
show_message('Hello ' + global.yourname +'. Welcome to the game!')

Nobody is the default name, the line before is the question.

It asks the player for a name :) I've been getting PMs about this O_o

 

Aug 28, 2007 10:10pm

LeGuy LeGuy 866 posts

Um...you can set the gravity to an object?

Seriously, I wish that was possible...is it? Can someone tell me how???

*jumps up and down in seat*

www.leguy.webs.com

 

Aug 28, 2007 10:13pm

NT NT 6160 posts

gravity=0.5

...or however much you want...

 

Aug 28, 2007 10:15pm

LeGuy LeGuy 866 posts

I said that wrong: Of course you can make an object be affected by gravity, but I want to know if it is possible to set an object as the source of gravity, like you know, if you put a square in the middle of the screen, you'll move toward the square, no matter what your position?

www.leguy.webs.com

 

Aug 28, 2007 10:42pm

ConnMon ConnMon 33 posts

yah u can do tht, it was the second set of code in my earlier post...

 

Aug 28, 2007 11:05pm

littlechihiro littlechi... 255 posts

registry_write_real
registry_read_real
registry_read_string
registry_write_string

I use those often for putting unlockables in my games

 

Aug 29, 2007 10:01am

smp smp 1074 posts

i know how 2 turn ketchup into steel... lol just kidding.


click it

 

Aug 29, 2007 11:22am

darkdude darkdude 2096 posts

QuoteI said that wrong: Of course you can make an object be affected by gravity, but I want to know if it is possible to set an object as the source of gravity, like you know, if you put a square in the middle of the screen, you'll move toward the square, no matter what your position?
{
gravity_direction=point_direction(x,y,square.x,square.y);
gravity=1;
}
voila`


I'm watching you...

 

Aug 29, 2007 2:21pm

pumpkin pumpkin 5657 posts

wth? XD

imahe_alpha seems to be realy usefull... heh :)

 

Aug 29, 2007 6:22pm

pumpkin pumpkin 5657 posts

yeah O_o...

hmm... more tricks... eeeer... nope... i could post some prety good bozz au but its long :P

 

Aug 29, 2007 9:26pm

Droid Droid 389 posts

If you have a splash screen, and your game is still being worked on, don not, I repeat, do not put the splash screen included in the game till it's final, otherwise it actually corrupts the file. NOTE: This is referring to a video splash screen.

I probably pop in and out of the site at months at a time. I think I have a Game Designer block every once in a while. Or is the coke going too much to my head?

 

Aug 29, 2007 9:39pm

elfdud7 elfdud7 587 posts

sweet darkdude... i am somehow going to fit this into one of my games...

mama mia! (this italian guy actually said that to me) this signature is crap, you know? i have a no fancy a picture, you know? http://www.yoyogames.com/games/show/61722

 

Aug 30, 2007 12:38am

gatz827 gatz827 415 posts

The following is a script I made about 10 minutes ago, at the moment it works best when you have zoomed in to about 150-200 percent,
Quote
radius = argument4
centerx = argument2
centery = argument3

for(i = 0; i <= argument0;i+=1)
{
neg_y = -1+(floor(random(2))*2)
neg_x = -1+(floor(random(2))*2)
area_x = round(random(radius*2))
area_y = round(random(radius*2))
distance = sqrt(sqr(abs(area_x))+sqr(abs(area_y)))
if(distance < abs(radius))
{
draw_point_color(centerx+area_x*neg_x,centery+area_y*neg_y,argument1)
draw_point_color(centerx+area_x*neg_x+1,centery+area_y*neg_y,argument1)
draw_point_color(centerx+area_x*neg_x-1,centery+area_y*neg_y,argument1)
draw_point_color(centerx+area_x*neg_x,centery+area_y*neg_y+1,argument1)
draw_point_color(centerx+area_x*neg_x,centery+area_y*neg_y-1,argument1)
}
}

copy the code into a new script and make the aruguments as follows:-
Quote
argument0 = 20 (or however many sparkles you want)
argument1 = lt_gray (or whatever color you want
argument2 = x (or wherever you want the center of the x to be)
argument3 = y (or wherever you want the center of the y to be)
argument4 = 32 (or whatever you want the radius of the area the sparkles are to be)

You put it in the draw event

It basically makes a circle area of sparkles, and can be used whenever you want something to be surrounded in sparkles...

 

Aug 30, 2007 2:47pm

Creative Pixels Creative ... 246 posts

Perhaps the next update of GM should include this... I dunno. One of those annoying window's vista thingys where when it scripts to delete a file, it has one of those ALLOW or BLOCK things... Or wait that would be annoying, and then people could just use file_write or blah to screw up improtant scripts... :S Soo... basically run games in safe mode?

Hungry for some simple but addictive gameplay? Check out Copter Cavern!
Post your high scores in the comment box!

 

Aug 30, 2007 2:52pm

darkdude darkdude 2096 posts

how can you run a game in safe mode?


I'm watching you...

 

Aug 30, 2007 2:54pm

Creative Pixels Creative ... 246 posts

Gamemaker > File > Perferences > General Tab > Run Games in secure mode, not executing programs

EDIT: But it only protects game you run as a GMK... And im not sure if it stops file writing or deleting...

Hungry for some simple but addictive gameplay? Check out Copter Cavern!
Post your high scores in the comment box!

 

Aug 30, 2007 2:58pm

Creative Pixels Creative ... 246 posts

Okay, maybe it does... A quote from the manual.

"Run games in secure mode. If checked, any game created with Game Maker that runs on your machine will not be allowed to execute external programs or change or delete files at a place different from the game location. (This is a safeguard against Trojan horses although success is not guaranteed.) Checking this means that games that utilizes external files etc. won't be running correctly. The setting only works while Game Maker is running. So if you run the game independently of Game Maker, for example as an executable stand-alone, it is NOT run in secure mode. "

Hungry for some simple but addictive gameplay? Check out Copter Cavern!
Post your high scores in the comment box!

 

Aug 30, 2007 3:07pm

pumpkin pumpkin 5657 posts

um can we stop talking about crashing computers now? :P

 

Aug 30, 2007 3:09pm

darkdude darkdude 2096 posts

@creative pixels: but that doesn't protect you against .exe games you download from the site o_O


I'm watching you...

Next page

Pages: 1 2 3