Jump to content


peter henry

Member Since 26 Feb 2011
Offline Last Active Today, 10:00 PM

Topics I've Started

Ds_List Vs Instance (Multiplayer)

30 April 2013 - 04:38 PM

Hi mates!

 

Well, the question is about multiplayer games (online).

 

What is the fastest (processor)? What uses less memory (RAM)?

 

- Store each socket id in an instance and send/receive messages in their Step events. (I think it uses more RAM and less CPU )

 

- Store each socket id in a list and loop through it (using only one object) to send/receive messages. (I think it uses less RAM and more CPU)

 

If my english is bad, sorry me.


Phftp

09 March 2013 - 06:50 PM

Hi guys!

Features

- Get the current directory name.
- Create directories.
- Delete directories.
- Set the working directory.
- Rename files.
- Delete files.
- Download files.
- Upload files.
- GET request (no vars).
- POST request (with vars).

phFTP() -> inits the DLL

----------- FTP ------------
Start(host, port, user, pass) -> connect

Bye() -> leave

CurrentDir() -> current dir

CreateDir(name) -> create a dir

DeleteDir(name) -> delete a dir

DeleteFile(name) -> delete a file

SetDir(name) -> enter in a dir

RenameFile(old_name, new_name) -> rename a file

Download(name, '') -> download a file ('' represents the current local folder)

Upload(name, '') -> upload a file ('' represents the current server folder)

----------- HTTP ------------

HttpGet('http://site.com.br/LOGO.png') -> GET request

HttpPost('http://site.com.br/index.php', 'nome=Pedro&forum=GMBR') -> POST, with some vars

To do:

Listing
Rename folders
Download all files of a folder
Etc

I accept requests for new functions.

Credits:

Pedro Henrique (Peter Henry) -> I created this DLL and the scripts (included in the example)
Laurent -> SFML (C++ lib) creator

Download

Game of the Year

18 December 2012 - 04:10 PM

Hi! I'm here to inform you that the GMBR community is promoting an annual contest, which will be elected in the best games of the year.

Rules:


- Tool used: Game Maker
- No theme. Just be a game.
- The game must be completed.
- One game per person / team.
- DLLs / Extensions are allowed.
- The game should have been done in 2012.

Specifications:

- The forum GMBR staff will choose 15 games. These will go to a popular votation.
- To participate, post your game topic link here. I will post the links on the GMBR forum. So you do not need to register there. But if you want, we appreciate.
- GMC members may vote.

Awards:

Not set. Probably licenses (GM: 8.1/GM: S).

GMBR forum - gmbr.forumeiros.com
YoYoGames. Thank you for your patronage.

[Brazil] Vacation Contest

03 December 2012 - 02:57 PM

Hi! I am Pedro Henrique, an admin of the Game Maker Brasil - Forum (GMBR).

A game creation contest (Vacation Contest) started on 04/12/2012.

The duration is 20 days (+6 days). The contest final date is 30/12/12.

Teams will be allowed.  But only one person can subscribe the game and win the prize.

YoYoGames allowed me to create this topic. The awards (licenses) will be given by YoYoGames:

1st - GM Studio Standard + Other prizes (no commercial value)
2st - GM 8.1 + Other prizes (no commercial value)
3st - Other prizes (no commercial value)

URL: http://gmbr.forumeir...-ferias-2-humor

Time: http://www.timeandda.../city.html?n=45

THEME: Humor

The game should generate laughs.

English version: http://translate.goo...-ferias-2-humor

Problem when drawing text

30 December 2011 - 06:27 PM

Hi.

I'm having a problem when I draw a text. I'm using a script I adapted, but this script is not working properly. The typed text should be added to the end. But it is not happening. Look at my script, to know what it is:

// cpos initial value: 1
// texto initial value: ""
if keyboard_check_pressed(vk_left) cpos = max(1, cpos-1);
if keyboard_check_pressed(vk_right) cpos  = min(string_length(texto), cpos+1);
//Upper case or lower case
if keyboard_check(vk_shift) addShift = 0; else addShift = 32;
//Add spaces
if keyboard_check_pressed(vk_space)
{texto = string_insert(' ', texto, cpos); cpos+=1;}
//Delete parts of the text 
if keyboard_check(vk_backspace) && string_length(texto)>0
{keyboard_clear(vk_backspace);
texto = string_delete(texto, cpos, 1);
cpos-=1;
}
//0<cpos<=string_length(texto)
cpos=median(cpos, 1, string_length(texto))

//Pular linha
if keyboard_check_pressed(vk_enter) 
{texto = string_insert('#', texto, cpos); cpos +=1;}
//Inserir #
if(addShift==0 and keyboard_check_pressed(ord('3'))) 
{texto = string_insert("\# ", texto, cpos); cpos += 2;}

//Letras
var char;
char=keyboard_key;
if char>64 && char < 91
{texto=string_insert(chr(char+addShift), texto, cpos); cpos+=1;}

if char>47 && char<58
{
if addShift==0
{
switch(char){
case 48: char=41; break;
case 49: char=33; break;
case 50: char=64; break;
case 51: char=35; break;
case 52: char=36; break;
case 53: char=37; break;
case 55: char=38; break;
case 56: char=42; break;
case 57: char=40; break;
  }
}
texto=string_insert(chr(char), texto, cpos); 
cpos+=1;
}
//Outros caracteres
if(keyboard_check_pressed(192)) {
if addShift = 32 { texto = string_insert('`', texto, cpos); cpos += 1;} else { texto = string_insert('~', texto, cpos); cpos += 1;}
}
if(keyboard_check_pressed(vk_add)) {
if addShift = 32 { texto = string_insert('=', texto, cpos); cpos += 1;} else { texto = string_insert('+', texto, cpos); cpos += 1;}
}
if(keyboard_check_pressed(vk_subtract)) {
if addShift = 32 { texto = string_insert('-', texto, cpos); cpos += 1;} else { texto = string_insert('_', texto, cpos); cpos += 1;}
}
if(keyboard_check_pressed(219)) {
if addShift = 32 { texto = string_insert('[', texto, cpos); cpos += 1;} else { texto = string_insert('{', texto, cpos); cpos += 1;}
}
if(keyboard_check_pressed(221)) {
if addShift = 32 { texto = string_insert(']', texto, cpos); cpos += 1;} else { texto = string_insert('}', texto, cpos); cpos += 1;}
}
if(keyboard_check_pressed(220)) {
if addShift = 32 { texto = string_insert('\', texto, cpos); cpos += 1;} else { texto = string_insert('|', texto, cpos); cpos += 1;}
}
if(keyboard_check_pressed(ord(';'))) {
if addShift = 32 { texto = string_insert(';', texto, cpos); cpos += 1;} else { texto = string_insert(':', texto, cpos); cpos += 1;}
}
if(keyboard_check_pressed(222)) {
if addShift = 32 { texto = string_insert("'", texto, cpos); cpos += 1;} else { texto = string_insert('"', texto, cpos); cpos += 1;}
}
if(keyboard_check_pressed(188)) {
if addShift = 32 { texto = string_insert(',', texto, cpos); cpos += 1;} else { texto = string_insert('<', texto, cpos); cpos += 1;}
}
if(keyboard_check_pressed(191)) {
if addShift = 32 { texto = string_insert('/', texto, cpos); cpos += 1;} else { texto = string_insert('?', texto, cpos); cpos += 1;}
}
if(keyboard_check_pressed(190)) {
if addShift = 32 { texto = string_insert('.', texto, cpos); cpos += 1;} else { texto = string_insert('>', texto, cpos); cpos += 1;}
}

sleep(15);
return texto;

Draw:
draw_text(10,10, script())

That's it.