Official Fangame Help Topic


I see, it has some registered only functions in it.

looks at code

hum…it look like all those registered functions are there for aesthetic reasons only.

I can rewrite for you if you what.



anyway, this is for my starfox game. (GM7)

i made it so that clicking left mouse button creates the bullet. im trying to make the bullet travel towards the target, but it just travels diagonaly down left, for some retarded reason.

i have no idea how to resolve this.


If you post an example I can fix it.



the green lazer needs to shoot in the direction of the target thing.


Hows this? is it alright?


DL broked


filefront’s down…my downloads arent working too.


filefront works now.

thanks arkanine :slight_smile:


no prob.


I changed the topic a little–From “Official Game Maker Help Topic” to “Official Fangame Help Topic”. Obviously the primary focus is still going to be Game Maker, but if you have other fangame-related questions (other programming languages, design help, quick questions or requests, etc.) this would now be the place to go.

Oh, and yes, fangame still means “game made or being made by a user”. It doesn’t necessarily have to be a fangame fangame.


Do u mind letting me see sum of u’r sprite work?
Also, do u have the registered ver.?
U might be thinking I do…No.
Can u program pause screens and\ or time lines?
Anyway, I bet I can match u’r 2-D skills at Game Maker.
I’ve did Game Maker for like 2 years(estimate) and STILL 50, 50.
Please contact me anytime if u’d like.

Note that I only read 1 1/2 of reasons of
u say u’r “kinda half good”.
Also, I’m gonna put u on my friend list thingy. So, when u contact
me(Or seprate posts) tell me if it’s alright with u.




Sorry for a ~month bump!

I’m kinda new at lighting stuff in Gamemaker.

The fourth screenshot, (bottom right) has these ceiling lights; That’s the kind of light I want to know how to achieve. I tried a code of my own, but I can’t get my light sprite to become slightly transparent like the one in the screenshot.

Any GM users know what to do?



That will get you circle. Cut in half for semi-circle.


Hmm. It’s too bright and doesn’t match my game’s style. How would I be able to use my own sprite as a light instead?

Thanks! :stuck_out_tongue:


Well, you could just change the color, size, or shape of that circle. But because it’s in bm_add, if you put it over something with the same colors in it, it’ll appear brighter than if you stick it over, say, black.

But to use your own sprite for the light, just keep in mind that in bm_add, the darker, the more invisible; the lighter, the more visible. So use black and fade in to the color you want at the center or whatever you want for the sprite. I suggest just sticking with a circle or a primitive shape and sticking it over whatever you want to glow, though.


Thanks! The light looks better now, but the sprite of the bulb doesn’t appear.

EDIT: Nevermind, I added this:



Two things might cause that:
A.) The bulb is covered up by the light. Draw the light before drawing the sprite. If they’re separate objects, the depth of the light object should be above the depth of the sprite object.
B.) You had no draw event before in the bulb object and just added one now. Once there’s a draw event, Game Maker doesn’t draw the assigned sprite for the object and instead draws what’s in the draw event. So, just add “draw_sprite(sprite_index,-1,x,y);” in the draw event.

Edit: Lol k, you got it. >_>


I’ve recently finished spriting and programming my HUD; all thats left to make now is a map. I think I remembered Ed making a tutorial on them, but I’m really unsure on what I should do. o_o It seems impossible, but I know it’s not because P2D has one. -_-

Does anyone know how to make one, or has anyone else successfully done it already?


I have… but it’s a little long to say how to make one in one post. Especially since there are an infinite number of ways you could go about doing it. I’ll try to set you up with the basics, though. (Assuming your game will use item symbols on the map)

The most convenient way to build the map of your area is just to make a bitmap of the map. Like this one from Zero Mission:
CENSORED (somehow this ZM screenshot turned into porn)
(Yes, the boxes should be that small)

You’ll have to choose a size in pixels for each map box in the room (so one map box might represent maybe 320x240 pixels in each room)

That way, you can add little unique pictures of bosses and ships and whatnot without making separate graphics for them, and you don’t have to input all the coordinates for each box and all that. Draw it out and insert it in your game.

Then, for each room’s creation code (Room -> Settings -> Creation code), you’ll want to say where that room is located on the map. (So like, “global.room_x = 13; global.room_y = 18;” or something, for the coordinates of the upper-left box of the room on the map)

You’ll also want to make sure the game knows what area you’re in and initializes all the item locations on the map and such, but only when you first enter a room from that area. So, create a “init_area_*” script for each area you have so far (replace * with the number of the area), and call the one corresponding to the room’s area in every room’s creation code. Each script should look something like this:

if (global.area != *) // Replace * with the number of the area {    // Set the map being used to the right image    // Initialize whatever else for your map system    // Like item symbols    // Then end with this:    global.area = *; // Replace * with the number of the area }
This way it’ll only call once for a given area, so it doesn’t spend all the time setting up the area each time a room loads.

Past there, you’ll want global arrays storing:

  • The boxes the user has been in on the map
  • Where each item is and if it’s been collected
  • Any other symbols that may change during the game

And then, you’ll want one object for the mini-map (if you have only one HUD object, which you should, put drawing and calculation for the map in there–otherwise, just use one new object). This will find the map box Samus is in based on the room’s coordinates in the area and her coordinates in the room; set the map box as visited (true) in the global array for that; draw a black square in the upper-right corner of the screen; and then draw from the box up one and left one from Samus’s box to the box down one and right one (nested “for” loops), only the ones you’ve visited, over the black square in the upper-right corner of the screen, putting in each correct symbol for items and whatnot over them.

For drawing the full map, do the same as the mini-map, only draw from the upper-left box to the lower-right box. If there’s too much slowdown going on, draw it on a surface when the map loads and then only draw that surface for each frame.

Yeah, it’s a lot to do and keep track of. Keep in mind that when I knew exactly what I was doing when I made one (well, I didn’t, but I figured out each next step for making it as I made it so it didn’t really matter), it took me a few hours. So… Don’t expect it to be a quick thing. I could just give you a ton of code, but then you’d have to do a lot of adapting to make it work in your game depending on how your game’s main systems work (so I’d probably have to explain how it works anyway), and plus you wouldn’t learn anything from that, would you? :stuck_out_tongue:

Call when you run into a snag or get lost in my monster wall of text. It doesn’t explain or mention quite everything, so…

Oh, and by the way, game-wise, Game Maker can do anything that C++ can, just slower. Never think anything’s impossible. :stuck_out_tongue:

Here’s Ed’s example if you want to compare how he does it to how I’d do it. Do whatever’s simpler, or blend them together, or whatever. It looks like he uses surfaces for the map. His way’s probably easier, but it doesn’t include items or other changing symbols on the map, and you may have to change parts of it to match your game’s main systems.