Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - kkg

Pages: [1]
Issues Help Desk / MySQL - constant connection
« on: June 01, 2011, 12:27:02 PM »
Just a quick question regarding having a server that extracts user information from / writes information to a database.
Should I practice:
1) Opening a connection when the server starts, close the connection when the server closes
2) Open a connection only when the database needs to be used (possibly frequently) and close it immediately

I'm not really aware of the raw behind a connection with a SQL database, so I'm not sure of the security consequences etc etc
I would assume 1) is a lot faster also.

Note: If you are offering a suggestion, could you offer it for two different situations: where the database is local to the server and where the database is hosted online?

Thanks yy0y0y0 xoxoxo

Function Peer Review / [GML] Word-breaking, multi-line RPG chat script
« on: February 12, 2011, 01:52:29 AM »
Okay. So I have a function here that I made by myself, but I have a feeling it is unhealthily inefficient.
Basically, It is a function that takes the string you give it and the maximum length of characters allowed on a line, and breaks the message up into segments that will fit into two lines. If it goes over two lines of text, it creates another portion of it that will carry over to the next "message".
Max allowed characters: 10
String = "Here is a typical message."
This will output:
string1: "Here is a#typical"
string2: "message."

Typical was placed on the second line because although 10 characters had not been reached on the first line, it was a whole word in itself (makes sense obviously)

ANYWAY, here is the script I'm using (feel free to optimise it and/or write your own in replacement :p)
Code: (GML) [Select]
///scr_text_filter_word(string text, real character_line_limit)
text = argument0;
var maxlength, textlength, usestring, usetext, i, currentpos, endword, newline, attemptbreak;
maxlength = argument1;
usetext = text;
usestring = "";
done = 0;
ii = 0;
currentpos = 1;
endword = 0;
newline = 1;

while (done == 0) {
    if(string_length(usetext) > maxlength) {
        for (i = 1; i <= string_length(usetext); i += 1) {
            if(attemptbreak == 1) break;
            currentpos = i;
            if(string_char_at(usetext,i) == " ") {
                for (iii = 1; iii < string_length(usetext)-currentpos; i+=1) {
                    if(string_char_at(usetext,i+iii) == " ") {
                        endword = iii;
                if(currentpos + endword > maxlength) {
                    var newtext;
                    newtext = string_copy(usetext,1,currentpos);
                    if(newline == 1) {
                        global.g_showmessage[ii+1] = newtext;
                    else {
                        newtext = string_insert("#",newtext,1);
                        global.g_showmessage[ii] = global.g_showmessage[ii]+newtext;
                    usetext = string_copy(usetext,currentpos+1,string_length(usetext)-currentpos);
                    attemptbreak = 1;
    else {
        if(newline == 1) {
            global.g_showmessage[ii+1] = usetext;
        else {
            usetext = string_insert("#",usetext,1);
            global.g_showmessage[ii] = global.g_showmessage[ii]+usetext;
        done = 1;
        global.g_msgtot = ii;

Off-Topic / Post a picture of yourself!
« on: May 26, 2010, 09:44:42 AM »

This was taken in December, when I had long hair. Since then I shaved my hair getting sponsored by numerous people for a Leukemia foundation. I don't currently sport any pictures of me in my current state. I'll get some to you guys later.

This is about as close as you'll get (I'm doing a cheat gainer if anyone is into acrobatics)

Issues Help Desk / C++, Linux and 39DLL.
« on: May 14, 2010, 01:25:50 AM »
Okay, so let's face it: The only two languages I can use are PHP and GML. I'm making a multiplayer game in Game Maker. I want to make the dedicated server run on linux. The only method of multiplayer I know is 39DLL. I have extensive knowledge of GML and I know what all the functions of 39DLL do if it is of any help.
The only thing I know about 39DLL is it uses Windows sockets. I don't know what Windows sockets are or how they work (yay).
I know GML very well if that helps :P

I have the following options available to me:

1. Use the .cbp for the 39DLL and somehow fix it(alter it, w/e) to use Linux socket libraries, and keep making the game in 39DLL.

2. Use libting(, learn how to make a DLL out of it, make the game using my own DLL from that library, and then learn how to use it in C++ and compile a C++ Server natively in Linux.

3. Run the C++ Server in WINE on Linux (I don't even know if this would work :D).

4. Just make the server for Windows and spend the extra money on a Windows VPS instead of a Linux VPS (this is last resort T_T)

5. Somehow write something in Linux that will communicate with my game on Windows. This is probably the same option as 1 :P

As I have zero experience in C++ and shit, I'd like to know not necessarily which would be the easiest course of action to take, but the best overall. I'm not afraid of learning :) The only problem is, the only way I actually learned what I know now was through already made engines. I would then tinker with variables and functions until I knew what they did to the engine, then rewrite the engine myself seeing if what I knew worked. My understanding is C++ is so ridiculous that I probably have zero hope of learning it using the same method, so :P
Any explanations of how anything [internally] 39DLL works would be fantastic.

This isn't a topic saying "MAKE ME AN ENGINE", it's a topic for recommending the correct path.

Thanks! ^_^

Oh and also, to get the 39DLL project files :

What's the best way for a newbie fag to make a server in Linux that will communicate with a 39DLL GM game?

General ENIGMA / C++ Socket Based Networking
« on: November 21, 2009, 06:27:44 AM »
I think I read somewhere on one of the topics that a member here was planning to write a socket based networking system for ENIGMA. Is that still supposed to be happening? I would love if could stop using WinSock haha ;D Anywho I know zero percent about C++, so I doubt I'd be able to offer much assistance, but I suppose if somebody wrote the system the least I could do is port(script, don't hurt me) it into EML(E++, whatever you guys are calling it :P) functions.

In the mean time I suppose i'll just use ting (, but if one of you are making one i'll scrap it :] I'd just like to know that i've got cross platform socket based for my (OBVIOUSLY INCREDIBLE AND COMMERCIALLY SUCCESSFUL :P) games :]

Keep up the hard work guyz, you're all doing really well from what I'm reading!

If you guys need any help with anything (I know zilch about anything but PHP and GML :P), I do graphic designing in my free time so if that's of any use to you guys just send me a PM or something.


General ENIGMA / Hardware Acceleration
« on: November 07, 2009, 09:55:05 AM »
Hum. I know it uses OpenGL, which should answer my question of ENIGMA using hardware accelerated graphics..

But how fast will functions such as surfaces from GM work in ENIGMA? I always remember having to limit game processing in order to have a simple surface effect going else the game would be running a stable 4 fps :P

Any response is a good response :]

Unless it's like "cheese" or something.

Pages: [1]