i made a way to change the controls of my game
i want the game to show the current keys something like
UP: W
DOWN: S
LEFT: A
RIGHT: D
right now the game shows
UP: 84
DOWN: 83
LEFT: 65
RIGHT: 68
i could just use chr() but that returns nothing with keys like the arrow keys, ctrl, alt, etc.
how could i do that
- Game Maker Community
- → Viewing Profile: Topics: oslash
oslash
Member Since 24 Oct 2011Offline Last Active Dec 15 2012 02:59 PM
Community Stats
- Group GMC Member
- Active Posts 32
- Profile Views 938
- Member Title GMC Member
- Age Age Unknown
- Birthday Birthday Unknown
-
Gender
Not Telling
0
none
Friends
oslash hasn't added any friends yet.
Topics I've Started
returning a key name
04 May 2012 - 02:01 PM
changing window shape
16 January 2012 - 06:54 PM
hi again
now i wanted to change the shape of my window
i already checked "dont draw a border in windowed mode" but no matter what i do, the game keeps being a rectangle
if i uncheck the "draw a background color" it draws black, how do i make that color transparent
now i wanted to change the shape of my window
i already checked "dont draw a border in windowed mode" but no matter what i do, the game keeps being a rectangle
if i uncheck the "draw a background color" it draws black, how do i make that color transparent
[39dll] reducing lag in movement
15 January 2012 - 07:40 PM
hi guys
i'm trying to reduce lag on my mmo but no matter how hard i try i always get a lot of lag, even on a local network
i tried to send the less amount of packets possible this is what i got (the game has a 8-way movement system)
step event
so this code uses 6 bytes and only send packets when you press or release buttons
when i test on localhost it runs great but even on a local network it gets laggy
any suggestions?
i'm trying to reduce lag on my mmo but no matter how hard i try i always get a lot of lag, even on a local network
i tried to send the less amount of packets possible this is what i got (the game has a 8-way movement system)
step event
if global.pause=false
if global.battle=false
if global.chatting=false{
if keyboard_check(global.k_up){
dv=1;
}else if keyboard_check(global.k_down){
dv=2;
}else{
dv=0;
}
if keyboard_check(global.k_left){
dh=10;
}else if keyboard_check(global.k_right){
dh=20;
}else{
dh=0;
}
}
dir=dv+dh
if dirtemp != dir{ //if button conbination changes
dirtemp = dir;
stat=1
switch(dir){
case 0: d=0; //----stop----
case 1: d=1; //----move up----
case 2: d=2; //----move down----
case 10: d=3; //----move left----
case 11: d=4; //----move up-left----
case 12: d=5; //----move down-left----
case 20: d=6; //----move right----
case 21: d=7; //----move up-right----
case 22: d=8; //----move down-right----
}
clearbuffer();;
writebyte(M_MOVE);
writeshort(x);
writeshort(y); //refresh position
writebyte(d) //move direction
sendmessage(global.socket);
}so this code uses 6 bytes and only send packets when you press or release buttons
when i test on localhost it runs great but even on a local network it gets laggy
any suggestions?
launcher for a MMO
12 January 2012 - 02:03 PM
hi, im currently doing an MMO
i made a launcher that is an autoupdater, you can also change some option on it
just now is missing the function to launch the game
theres a way to force the game to be launched through the laucher?
like sending variables from a game to another?
something like if i run game.exe instead of the launcher i get an error message saying "please use the launcher"
i made a launcher that is an autoupdater, you can also change some option on it
just now is missing the function to launch the game
theres a way to force the game to be launched through the laucher?
like sending variables from a game to another?
something like if i run game.exe instead of the launcher i get an error message saying "please use the launcher"
packing files
02 January 2012 - 01:33 PM
i'm trying to pack some sprite and scripts (gmspr and gml) into a only file for some kind of downloadable content for my game (new characters, new levels)
what is the best way to do it?
theres ay way to add them to game maker without extracting them?
i dont care about compression since the files are small enough, but maybe i could use some crypting
what is the best way to do it?
theres ay way to add them to game maker without extracting them?
i dont care about compression since the files are small enough, but maybe i could use some crypting
- Game Maker Community
- → Viewing Profile: Topics: oslash
- Privacy Policy
- GMC Rules and Forum Rules ·



Find content