Topic:   GMOD?   (Read 21079 times)


0 Members and 1 Guest are viewing this topic.

Mystor


  • GMG-er

  • **


  • Posts: 696

  • I am the myst that consumes us all.
GMOD?
« on: May 17, 2008, 09:28:00 AM »
Online games no longer seem to be "in" in GM land anymore?

I was wondering what you would liek me to do to make GMOD the best ever.

If you don't know what GMOD is, check my sig.

Mist
"I'll lie to him."
"And if that doesn't work?"
"Then I'll tell the truth. We're allowed to do that, in emergencies. We can't plan for everything, you know."
   -Colonel Graff, Ender&

Silverwind


  • ^ This guy is amazing.

  • ****


  • Posts: 2805

  • For the glory of my maker
Re: GMOD?
« Reply #1 on: May 17, 2008, 09:41:58 AM »
GMOD's a wonderful achievement, it's just that most GM users aren't designing online games. I'd still love to use GMOD for LW when we 4.0 comes out, I just keep forgetting how it works. ::)
I survived the spammage of 2007

Mystor


  • GMG-er

  • **


  • Posts: 696

  • I am the myst that consumes us all.
Re: GMOD?
« Reply #2 on: May 17, 2008, 01:45:31 PM »
I was going to write a custom system for lw...

Anyways, Basically what GMOD is is a large array in the cloud...

Mist
"I'll lie to him."
"And if that doesn't work?"
"Then I'll tell the truth. We're allowed to do that, in emergencies. We can't plan for everything, you know."
   -Colonel Graff, Ender&

GMG Tim


  • Administrator

  • GMG-er

  • *****


  • Posts: 465
Re: GMOD?
« Reply #3 on: May 17, 2008, 11:46:52 PM »
Same with GM High Scores-- but that was sort of just a proof of concept. I believe Mistron could work on his system to be flexible enough to include a high scores system (from what I see, I believe that could already be achieved). Maybe I'll get rid of GMHS, since Mistron seems to have taken the idea to a whole new level. =)

Ghost

Mystor


  • GMG-er

  • **


  • Posts: 696

  • I am the myst that consumes us all.
Re: GMOD?
« Reply #4 on: May 18, 2008, 07:47:18 AM »
GMHS is a whole lot more simple, however.
GMOD is really simple.
(NOTE THIS MAY BE A LONG POST)
saveDTA.php (php file)
Code: [Select]
<?php
include"connect.php";
$p = $_REQUEST['id'];
$val = $_REQUEST['v'];
$key = $_REQUEST['key'];

$dataf = mysql_query("SELECT * FROM `data` WHERE `key` = '$key'");
$datar = mysql_result($dataf,0,"data");
$datar = convert_uudecode($datar);
$datal = unserialize($datar);

$datal[$p] = $val;

$datats = serialize($datal);
$datas = convert_uuencode($datats);

$dataf = mysql_query("UPDATE `data` SET `data` = '$datas' WHERE `key` = '$key'");
echo "Success";
?>
I believe that the convert_uuencode and convert_uudecode functions may mess some things up, so I might rewrite some of the code...
data.php (php file)
Code: [Select]
<?
include"connect.php";
$key = $_REQUEST['key'];
$p = $_REQUEST['id'];

$dataf = mysql_query("SELECT * FROM `data` WHERE `key` = '$key'");
$data = mysql_result($dataf,0,"data") or die ("bad ID");
$data = convert_uudecode($data);
$datal = unserialize($data);
echo $datal[$p];
?>

If people are still interested in GMOD I will rewrite it, including more features :)

Mist

EDIT: I was just coping GMHS anyways, I never knew that curl... well... was there!
« Last Edit: May 18, 2008, 07:48:40 AM by mistron »
"I'll lie to him."
"And if that doesn't work?"
"Then I'll tell the truth. We're allowed to do that, in emergencies. We can't plan for everything, you know."
   -Colonel Graff, Ender&

EqwanoX


  • Administrator

  • GMG Extraordinaire

  • *****


  • Posts: 1180
Re: GMOD?
« Reply #5 on: May 18, 2008, 11:57:30 AM »
i dont get it, what does GMOD and GMHS do?

ill tell you why online games arent "in" anymore, mostly because online games cant be played online! they have to be played through a local area network or both computers have to be directly connected to each other, also online games are complicated to design

Silverwind


  • ^ This guy is amazing.

  • ****


  • Posts: 2805

  • For the glory of my maker
Re: GMOD?
« Reply #6 on: May 18, 2008, 01:21:52 PM »
GMOD can do two things:

1: Store the value of a variable on the internet.
2: Retrieve a value from the internet and store it in a variable.

That makes online games incredibly easy. It's just like reading a text file with the FILEIO command, it's that simple. The only problem is that the command is a few lines long, so it uses allot of code if you're storing lots of variables. (the stats of every player in an online RPG for example. *cough, LW, cough,* *choke!* *gasping for dear life...*) ;D
I survived the spammage of 2007

GMG Tim


  • Administrator

  • GMG-er

  • *****


  • Posts: 465
Re: GMOD?
« Reply #7 on: May 18, 2008, 03:38:16 PM »
GMHS allows you to store high scores online, so you can compete against other people on the internet. Yes, the internet, not a LAN.

Ghost

EqwanoX


  • Administrator

  • GMG Extraordinaire

  • *****


  • Posts: 1180
Re: GMOD?
« Reply #8 on: May 18, 2008, 03:52:42 PM »
holy shit so with this we can actually have two players play simultaniously online?
« Last Edit: May 18, 2008, 03:53:52 PM by EqwanoX »

Silverwind


  • ^ This guy is amazing.

  • ****


  • Posts: 2805

  • For the glory of my maker
Re: GMOD?
« Reply #9 on: May 18, 2008, 04:40:41 PM »
Yes, but I think there'd be a sufficient amount of lag due to the computer constantly connecting to the RedRasor server to make RPGs annoyingly slow, assuming the game displayed multiple players on the screen at the same time.

What GMOD would be great for in RPGs:

1: Online item auctions.
2: Shared constant data, such as treasure chests. (meaning if one player looted a treasure chest in the game, it would be empty thereafter for all players around the world)
3: High Score boards.
I survived the spammage of 2007

Gan


  • Administrator

  • ^ This guy is amazing.

  • *****


  • Posts: 4411
Re: GMOD?
« Reply #10 on: May 18, 2008, 06:02:45 PM »
I'm thinking of using GMOD to make a single room chat game in SC (Because I don't own GM and have no experience in scripting with it).

Just want to experiment, test how well it works.

-Gandolf
« Last Edit: May 18, 2008, 06:03:02 PM by Gandolf »

Gan


  • Administrator

  • ^ This guy is amazing.

  • *****


  • Posts: 4411
Re: GMOD?
« Reply #11 on: May 18, 2008, 06:55:06 PM »
Sorry for double posting but I have a question about a sort of coding that will help a lot.

Just wondering, how do you get the value of a variable in SC? (If anyone knows)

For Example:

Code: [Select]
Let online = 1

If online < 1 then
Blah...
else
CREATESPRITE Val(online), "man"
End If

Would the Val(online) work? Or is their some code that will put the value of the variable there?

Thanks,

-Gandolf
« Last Edit: May 18, 2008, 06:56:02 PM by Gandolf »

Silverwind


  • ^ This guy is amazing.

  • ****


  • Posts: 2805

  • For the glory of my maker
Re: GMOD?
« Reply #12 on: May 19, 2008, 02:31:28 AM »
I thought GMOD only worked with GameMaker, but I'm not entirely sure. It stands for GameMaker Online Data.

GMOD's code is very different from your example. Here's a tutorial: http://www.redrasor.com/gmod/docs.php

Hey Mist, do you need a Key per game? Or per value you wanna store on the server?
I survived the spammage of 2007

Gan


  • Administrator

  • ^ This guy is amazing.

  • *****


  • Posts: 4411
Re: GMOD?
« Reply #13 on: May 19, 2008, 06:46:00 AM »
This is the actual code I used:

Code: [Select]
let dkey$ = "1211153622"
let pid$ = "online"
BEGIN APPLESCRIPT dkey$ pid$
return do shell script "curl http://www.redrasor.com/gmod/get.php -d key=" & dkey & " -d id=" & pid
END APPLESCRIPT data$

if online <1 then
let online = 1
let dkey$ = "1211153622"
let pid$ = "online"
let v$ = "online"
BEGIN APPLESCRIPT dkey$ pid$ v$
return do shell script "curl http://www.redrasor.com/gmod/set.php -d key=" & dkey & " -d id=" & pid & " -d v=" & v
END APPLESCRIPT
LET block$ = "22;43"
CREATESPRITE 1, "man"
else
LET block$ = "22;43"
 
CREATESPRITE 1, "man"
 
//I move the sprite to the top left corner of the board.
MOVESPRITE 1, 195, 40
 
//Now I say, the square he is on right now, is square 11.
LET location = 11

let dkey$ = "1211153622"
let v$ = "location"
BEGIN APPLESCRIPT dkey$ pid$ v$
return do shell script "curl http://www.redrasor.com/gmod/set.php -d key=" & dkey & " -d id=" & pid & " -d v=" & v
END APPLESCRIPT

I used that other example to summarize it. Though this code is unfinished.


-Gandolf

Gan


  • Administrator

  • ^ This guy is amazing.

  • *****


  • Posts: 4411
Re: GMOD?
« Reply #14 on: May 19, 2008, 08:22:28 AM »
Good News, it seems that Mistron's GMOD will work in SC. You just have to go around a few obstacles. Here is the post: http://www.silvercreator.net/cgi-bin/yabb/YaBB.pl?board=SC;action=display;num=1211152082;start=0#5

-Gandolf