ID:151784
 
I apologize ahead of time for asking a question that has already been asked, and even after going through mountains of threads I didn't seem to find a solid answer.

Is it possible for me to host a BYOND game, completely accessible by normal connection means (dream seeker) that also hosts a webserver accessible from a browser? Or when you enable DMCGI does it prevent normal client connection?

And while I'm on the topic: Since DMCGI can only be ran from linux (grrrrr) any tips on a good linux VM that allows normal network activity?
AJX wrote:
I apologize ahead of time for asking a question that has already been asked, and even after going through mountains of threads I didn't seem to find a solid answer.

Is it possible for me to host a BYOND game, completely accessible by normal connection means (dream seeker) that also hosts a webserver accessible from a browser? Or when you enable DMCGI does it prevent normal client connection?

I'm about 99% sure the answer here is "no". Nadrew, Tom, or others might be able to correct me, but don't count on it.

And while I'm on the topic: Since DMCGI can only be ran from linux (grrrrr) any tips on a good linux VM that allows normal network activity?

I wouldn't recommend going about it this way. You're better off getting a webhost that gives you SSH access to install BYOND locally. I did get DMCGI working on NearlyFreeSpeech, but it won't work with MySQL.
In response to Airjoe
Actually, you can run a DMCGI world using DreamDaemon, anything outside of CGI/Topic() will execute normally. However, when someone were to connect to it in DMCGI mode the people connected in non-CGI mode wouldn't even know it since they wouldn't actually be in the same world.

DMCGI starts a new instance of DreamDaemon each time someone loads the page and the instance dies when the page is finished doing what it needs to do. So the parent world running in non-CGI mode is a completely different one than the one(s) being executed in CGI mode.
In response to Nadrew
Nadrew wrote:
DMCGI starts a new instance of DreamDaemon each time someone loads the page and the instance dies when the page is finished doing what it needs to do. So the parent world running in non-CGI mode is a completely different one than the one(s) being executed in CGI mode.

Ahh crap. So basically any datums I have in the primary world are inaccessible to any players who connect? (without saving/loading them that is)

And that being the case then it wouldn't be possible to have a web based game where players actively interact with one another because each one would have their own world running?

What about communication between the child worlds? Any way to directly communicate from child to parent? (I can't imagine that Topic/Export() would work as the different worlds would be... wait... what port do they use? That doesn't make sense... You can't have more than one world running on a simple port.... AAAAAH)

I'm lost. I'm going to stop asking questions until the first 2 paragraphs are answered. <_<
In response to AJX
AJX wrote:
And that being the case then it wouldn't be possible to have a web based game where players actively interact with one another because each one would have their own world running?

It would be possible, because the server would be running multiple worlds. As such you can load save files directly on the server.

What about communication between the child worlds? Any way to directly communicate from child to parent?

Yes; using world.Export() you can communicate directly with the parent provided that you know the port number it uses.

I don't know exactly how it works for child worlds though. It could either be that they're assigned a random port for communication, but it's more likely that the DMCGI world is not actively hosted at all. In that case you may need to use world.OpenPort() to open it up so that the master server can talk directly to the child world.

Since it's a DMCGI world though, it may be possible to have it open up a port from the start by specifying the "-ports" parameter in the executor variable (see the top of CGI.dm in hub://Dantom.CGI).


Note that a DMCGI world isn't really a true BYOND world. Pretty much it involves using hub://Dantom.CGI as a wrapper of sorts. The only client/mob in existance by default is the user who requested the page. The world is only up so long as the request lasts, so once CGI/Topic() finishes the world will close-- I don't think it's possible to keep a DMCGI world open for long since a longer delay = more of a wait for the player.
In response to Android Data
Android Data wrote:
AJX wrote:
And that being the case then it wouldn't be possible to have a web based game where players actively interact with one another because each one would have their own world running?

It would be possible, because the server would be running multiple worlds. As such you can load save files directly on the server.

But active changes could create conflicts... You'd have to be very careful about the order of processing things, checking what a player is currently doing very carefully, etc. Whereas if it was one central world you wouldn't have that problem.

What about communication between the child worlds? Any way to directly communicate from child to parent?

Yes; using world.Export() you can communicate directly with the parent provided that you know the port number it uses.
Provided that... there is the problem.

I don't know exactly how it works for child worlds though. It could either be that they're assigned a random port for communication, but it's more likely that the DMCGI world is not actively hosted at all. In that case you may need to use world.OpenPort() to open it up so that the master server can talk directly to the child world.

See this is where I entered the realm of wtf? And if that is the case and the child worlds aren't actively hosted then how could they possibly communicate with a user out in the vast internetz.

Since it's a DMCGI world though, it may be possible to have it open up a port from the start by specifying the "-ports" parameter in the executor variable (see the top of CGI.dm in hub://Dantom.CGI).

Note that a DMCGI world isn't really a true BYOND world. Pretty much it involves using hub://Dantom.CGI as a wrapper of sorts. The only client/mob in existance by default is the user who requested the page. The world is only up so long as the request lasts, so once CGI/Topic() finishes the world will close-- I don't think it's possible to keep a DMCGI world open for long since a longer delay = more of a wait for the player.

Isn't a true BYOND world...? This is a bit contradictory to everything else that has been said. I think what I need to do is just get my own system running and just start testing stuff.
So after dicking around with trying to get DMCGI working and all of this I came to a blatantly obvious realization that I should have figured out when I first started: BYOND by itself cannot host websites, you have to install apache first... -.-'

That piece of information somehow eluded my grasp when I began this venture, and now with my Ubuntu VM I'm left with a minor headache on the issue.

So can someone tell me if my basic summary of the situation here is correct:

Step 1: Get teh linux
Step 2: Install the apache
Step 3: Do some fancy shmancy config modifications
Step 4: Put .dmb files in your apache folder to represent .html/.cgi files.
Step 5: Have teh websites.

Unfortunately before I came to this realization I had a very diluted vision of what DMCGI would be able to do for me. I had hoped I would be able to HOST a BYOND world, where a byond player could connect using dream seeker and interact in whatever way I wanted, and then a web browser could come along and connect via a web address and do some cool shenanigans too using the information that had been gathered in the game.

I have one other question... Just how impossible and "thats never ever going to happen"-esque is my aforementioned scenario?
In response to AJX
It's not impossible in the least. You'd host one 'normal' BYOND world alongside your hosted DMCGI DMB, and you just need to transfer "the information that had been gathered in the game" from the BYOND world to the DMCGI one, which should be a breeze if they're hosted in the same server. You can just store it in a savefile or text file and read it from there, and/or you can communicate with the BYOND world by sending info requests from the DMCGI one using world.Export(127.0.0.1?topic).
In response to Kaioken
Or the more obvious solution, you use MySQL for the game and the data is readily available at all times to any amount of DM worlds, C/C++, ASP.NET, PHP or whatever else have you.
In response to AJX
You could have saved yourself some trouble by visiting the DMCGI Guild.