| Introduction |
| What is GM Knowledge Base? |
| What's New? |
| NEWS BLOG |
| I Need Your Help! |
| Thanks to. . . |
| Functions |
| Computing Things |
| Real Valued Functions |
| random(x) |
| choose(val1,val2,val3...) |
| abs(x) |
| sign(x) |
| floor(x) |
| ceil(x) |
| frac(x) |
| sqrt(x) |
| sqr(x) |
| power(x, n) |
| lengthdir_x / y (len,dir) |
| String Handling Functions |
| string_length(str) |
| chr(val) |
| string_copy(str,index,count) |
| string_char_at(str,index) |
| string_upper(str) |
| string_lower(str) |
| Gameplay |
| Moving Around |
| xstart |
| ystart |
| hspeed |
| vspeed |
| direction |
| motion_set(dir,speed) |
| motion_add(dir,speed) |
| move_wrap(hor,vert,margin) |
| move_towards_point(x,y,sp) |
| move_bounce_solid(adv) |
| move_bounce_all(adv) |
| position_meeting(x,y,obj) |
| Instances |
| instance_number(obj) |
| instance_position(x,y,obj) |
| instance_place(x,y,obj) |
| instance_create(x,y,<object>) |
| instance_destroy() |
| Deactivating instances |
| instance_deactivate_all(notme) |
| Timing |
| sleep(numb) |
| alarm[0...11] |
| Rooms |
| room_goto_previous() |
| room_goto_next() |
| game_end() |
| game_restart() |
| room_width |
| room_height |
| room_caption |
| score / lives / health |
| score |
| Generating Events |
| event_perform(type,num); |
| event_perform_object(obj,type,num); |
| User Interaction |
| The Mouse |
| mouse_x / mouse_y |
| The Keyboard |
| keyboard_check(key) |
| Game Graphics |
| Sprites & Images |
| image_index |
| image_speed |
| image_angle |
| Drawing Sprites & Backgrounds |
| draw_sprite(sprite,subimage,x,y) |
| draw_sprite_stretched(sprite,subimg,x,y,w,h) |
| draw_sprite_tiled(sprite,subimg,x,y) |
| draw_sprite_ext(sprite,subimg,x,y,xscale,yscale,rot,color,alpha) |
| Drawing Shapes |
| draw_point(x,y) |
| draw_line(x1,y1,x2,y2) |
| draw_triangle(x1,y1,x2,y2,x3,y3,outline) |
| draw_circle(x,y,r,outline) |
| draw_ellipse(x1,y1,x2,y2,outline) |
| draw_set_color(col) |
| Fonts & Text |
| draw_text(x,y,string) |
| draw_text_ext(x,y,string,sep,w) |
| draw_set_font(font) |
| Advanced Drawing Functions |
| draw_point_color(x,y,col) |
| draw_line_color(x1,y1,x2,y2,col1,col2) |
| draw_rectangle_color(x1,y1,x2,y2,col1,col2,col3,col4,outline) |
| draw_circle_color(x,y,r,col1,col2,outline) |
| draw_triangle_color(x1,y1,x2,y2,x3,y3,c1,c2,c3,outline) |
| Drawing Surfaces |
| surface_create(w,h) |
| surface_free(id) |
| surface_exists(id) |
| surface_get_width(id) |
| surface_get_height(id) |
| surface_get_texture(id) |
| surface_set_target(id) |
| surface_reset_target() |
| surface_getpixel(id,x,y) |
| surface_save(id,fname) |
| surface_save_part(id,fname,x,y,w,h) |
| draw_surface(id,x,y) |
| draw_surface_stretched(id,x,y,w,h) |
| draw_surface_tiled(id,x,y) |
| draw_surface_part(id,left,top,width,height,x,y) |
| draw_surface_ext(id,x,y,xscale,yscale,rot,color,alpha) |
| draw_surface_stretched_ext(id,x,y,w,h,color,alpha) |
| draw_surface_tiled_ext(id,x,y,xscale,yscale,color,alpha) |
| draw_surface_part_ext(id,left,top,width,height,x,y,xscale,yscale,color,alpha) |
| draw_surface_general(id,left,top,width,height,x,y,xscale,yscale,rot,c1,c2,c3,c4,alpha) |
| The Window |
| window_get_fullscreen() |
| window_set_cursor(curs) |
| window_mouse_get_x() |
| window_mouse_get_y() |
| window_mouse_set(x,y) |
| Sound & Music |
| Basic Sound Functions |
| sound_play(index) |
| sound_loop(index) |
| sound_stop(index) |
| sound_stop_all() |
| Splash screens, highscores, and other pop-ups |
| Pop-up messages and questions |
| show_message(str) |
| show_message_ext(str,but1,but2,but3) |
| show_question(str) |
| get_integer(str,def) |
| get_string(str,def) |
| message_background(back) |
| Changing Resources |
| Sounds |
| sound_replace(index,fname,kind,preload) |
| Files, registry, and executing programs |
| Files |
| file_text_close(fileid) |
| file_text_open_append(fname) |
| file_text_open_read(fname) |
| file_text_open_write(fname) |
| file_text_read_real(fileid) |
| file_text_read_string(fileid) |
| file_text_readln(fileid) |
| file_text_write_real(fileid,x) |
| file_text_write_string(fileid,str) |
| file_text_writeln(fileid) |
| Executing Programs |
| execute_program("prog","arg",wait) |
| Creating Particles |
| Simple Effects |
| effect_create_below(kind,x,y,size,color) |
| effect_create_above(kind,x,y,size,color) |
| Multiplayer Games |
| Communication |
| Setting up a connection |
| mplay_init_ipx() |
| mplay_init_tcpip(addr) |
| mplay_connect_status() |
| mplay_end() |
| mplay_ipaddress() |
| Creating and joining sessions |
| mplay_session_create(sesname,playnumb,playname) |
| mplay_session_find() |
| mplay_session_name(numb) |
| mplay_session_join(numb,playname) |
| mplay_session_mode(move) |
| mplay_session_status() |
| mplay_session_end() |
| Shared Data |
| mplay_data_write(ind,value) |
| mplay_data_read(ind) |
| mplay_data_mode(guaranteed) |
| Players |
| mplay_player_name(numb) |
| mplay_player_find() |
| mplay_player_id(numb) |
| Messages |
| mplay_message_send(player,id,val) |
| mplay_message_send_guaranteed(player,id,val) |
| mplay_message_receive(player) |
| mplay_message_id() |
| mplay_message_value() |
| mplay_message_player() |
| mplay_message_name() |
| mplay_message_count(player) |
| mplay_message_clear(player) |
| 3D |
| Primitive Types |
| Going to 3D mode |
| d3d_start() |
| d3d_end() |
| d3d_set_hidden(enable) |
| d3d_set_perspective(enable) |
| Easy Drawing |
| d3d_set_depth(depth) |
| Drawing Polygons in 3D |
| d3d_primitive_begin(kind) |
| d3d_primitive_end() |
| d3d_primitive_begin_texture(kind,texid) |
| d3d_vertex(x,y,z) |
| d3d_vertex_color(x,y,z,col,alpha) |
| d3d_vertex_texture(x,y,z,xtex,ytex) |
| d3d_vertex_texture_color(x,y,z,xtex,ytex,col,alpha) |
| Drawing Basic Shapes |
| d3d_draw_block(x1,y1,z1,x2,y2,z2,texid,hrepeat,vrepeat) |
| d3d_draw_cone(x1,y1,z1,x2,y2,z2,texid,hrepeat,vrepeat,closed,steps) |
| d3d_draw_cylinder(x1,y1,z1,x2,y2,z2,texid,hrepeat,vrepeat,closed,steps) |
| d3d_draw_ellipsoid(x1,y1,z1,x2,y2,z2,texid,hrepeat,vrepeat,steps) |
| d3d_draw_floor(x1,y1,z1,x2,y2,z2,texid,hrepeat,vrepeat) |
| d3d_draw_wall(x1,y1,z1,x2,y2,z2,texid,hrepeat,vrepeat) |
| Statements |
| break |
| continue |
| do |
| exit |
| for |
| If |
| repeat |
| switch |
| while |
| with |
| Tutorials |
| Game Maker |
| AI |
| Alarms |
| Arrays |
| Binary |
| Expressions |
| Gravity |
| Masks |
| Particles-V5.2 |
| Scripts |
| Gaming Help |
| Tank Handling |
| RPG Tutorial: Part 1 |
| Questions |
| How do I make my player move? |
| How do I get my player to shoot? |
| How do I have my character facing and moving left when the left key is pressed, and right when the right key is pressed? |
| How do i have my player shooting left when facing left and right when facing right? |
| How do I make the player stay inside the game area WITHOUT the use of walls? |
| How do I make the player jump? |
| How do I make the player invulnerable for a small time? |
| How do I pace the amount of bullets instead of a continuous stream? |
| What's happened to view_left and view_top? |
| How do I wrap from one side of the screen to the other? Like Asteroids? |
| How do I make my own high score 'Room' |
| How can I have a platform the player can jump through and land on? |
| How do I stop my player and enemy getting stuck to one another when they collide? |
| How do I have the player's bullet shoot from the gun he's holding instead of near the top of his head? |
| When my character stops, how do I show the standing part of his walking animation? |
| How do I make my enemy move back and forth across a platform? |
| How can I make an object jump at a random position, like a teleport? |
| Extras |
| Programming Concepts |
| Common Game Making Flaws |
| Condensing Variables |
| Flexible Coding |
| Naming |
| Sorting |
| ASCII Table |
| Order of Events |
| N - Type Blog |
| Useful Links |
| User Feedback |
GML Knowledge Base © <2005> MadLad Designs