Page 1 of 2
Pointing to a game save over a network.
Posted:
Tue Jun 16, 2009 1:34 am
by Oman
Hello... its been awhile...
In my house i have 4 computers. On one computer i have 4 games that each create a save file for the other game to read (made with GE of course). What i would like to know is if its possible for me to open game 1 on computer one, game 2 on computer 2, etc... and have each game read from the save files on computer one.
I have attached the game i am working on. If you open both the first .exe and the second on your computer (arrow keys move) you will see what i am trying to say. The only difference is that i want the second exe open on a different computer but reading from that save folder.
I have tried running the game over my wireless network at home buy opening game two on cpu two and game one on cpu one, But the second computer wont correctly open the game because it is not on its hard drive.
Any fixes would be welcome. Thanks!
Re: Pointing to a game save over a network.
Posted:
Tue Jun 16, 2009 2:07 am
by skydereign
What you are trying to do is completely valid, though I don't know how much windows likes networking. It would work fine as long as all computers are loading from a shared directory. That way they can all load the same variables. Though, I don't see your loading, not that I looked to far into it. If there is a shared folder on the network, they should run the game properly... You might need to change the network settings of either the folder or the computer.
Re: Pointing to a game save over a network.
Posted:
Tue Jun 16, 2009 2:18 am
by Oman
I already tried creating a shared folder with the files in it which allowed everyone access to read and write. Thats when the game didn't work... if you have two computers u are welcome to try it...
Re: Pointing to a game save over a network.
Posted:
Tue Jun 16, 2009 3:06 am
by pyrometal
You may encounter bugs if one computers tries to overwrite a file at the same time another is reading it... Not sure how you should go about that though...
Re: Pointing to a game save over a network.
Posted:
Tue Jun 16, 2009 3:35 am
by Oman
Yes, but it works fine when i run it on all on one computer....
Re: Pointing to a game save over a network.
Posted:
Tue Jun 16, 2009 3:39 am
by pyrometal
Then you should be fine! Unfortunately, I can't test the networking for you, good luck finding someone who can!
Re: Pointing to a game save over a network.
Posted:
Tue Jun 16, 2009 3:56 am
by Oman
Iv'e just tried to run a much less complicated game from my other computer over a network and it fail too. So it looks as though GE exe's wont run over a network setup... Is it possible to use the loadVars funtion to point to where the file is. rather then just the root directory (eg. "loadVars("c/programfiles/users.. etc...","savevarname");
Re: Pointing to a game save over a network.
Posted:
Tue Jun 16, 2009 5:01 am
by skydereign
It works fine for me... Do you have a shared directory that each has access to?
Re: Pointing to a game save over a network.
Posted:
Tue Jun 16, 2009 12:10 pm
by makslane
Try map a drive to the network shared folder, and execute the gae in that drive in each machine.
Re: Pointing to a game save over a network.
Posted:
Tue Jun 16, 2009 3:05 pm
by Oman
I mapped the drive and it worked just fine.
It's a little slow though. Next im gonna try and adhoc network to try to increase the speed. If it works reasonably well then we r in business for local multiplayer!!! yippee
Here's a toast to dungeon running with your friends! lolz Thx guyes!
Re: Pointing to a game save over a network.
Posted:
Wed Jun 17, 2009 7:22 pm
by Rux
You've inspired me to create a simple chat program, that you can chat with people over the network.
I wonder if the following plan could work...
First of all, you could create rooms, and just name them whatever you want. It will save a file.
or you could join a room, by typing whatever the created room was.
Then on the next screen, there would be two choices, to be the red talker, or to be the blue talker.
The buttons will constantly load the saved file every second (or less) and check to see if a var is 0 or 1. If its one then the button will turn invisible, if 0 it will stay visible. When you click on one, it will save it as 1 then when you leave the chat room, then it will save back to 0. (Of course this will leave lots of bugs like what if two people click it at the same time, but that would be a rare occasion) Once in the room, there will be a the to segments, the blue seg. and the red seg. after each will be the previous sentence you said. On the bottem there would be a chatbox, where you type, and hit a button to say it. It will check if you chose blue or red, (there would be a non saving var that is set when you click on a color) it will save the message to a string. You may not see the message immediately, because I think it would be better to have it read the file every second.
Now to connect each exe, you'd put it on one persons PC then the other would navigate through the network and click on the exe, since GE only saves where the exe is, it will effect the save file.
This was very hard to explain, but would it be possible? I'm going to try it, I just want to know before I start. Im just concerned about it loading and saving so much.
Re: Pointing to a game save over a network.
Posted:
Wed Jun 17, 2009 8:11 pm
by skydereign
Well, both loading at the same time shouldn't be a problem, my test was done where both were saving and loading there own variables. I was using draw, but it could have been my setup. I am pretty sure that would work, though I think the blue button is unnecessary. Or you could set a limit of chat users.
Re: Pointing to a game save over a network.
Posted:
Wed Jun 17, 2009 8:39 pm
by Rux
Im just using a simple chat mode, instead of a scrolling screen, only the most recent chat will be displayed, this is just practice, later I might try more advanced techniques. BTW when Im done my program I'll post it in the development forum, and maybe post the source in game demos.
Re: Pointing to a game save over a network.
Posted:
Sat Jun 20, 2009 2:52 am
by Oman
Hey guys just a quick update on this.
I have found that updating every 200 milliseconds works best in my case. The slower the better. I have yet to try an adhoc but I'm almost certain it wil work even better.
Ur chat idea is way more then possible as long as u remember how to save text to a variable. Tricky but possible.
Thanks for your help guys... Finally, true multiplayer on a network! Albeit very simple lolz
Re: Pointing to a game save over a network.
Posted:
Sat Jun 20, 2009 4:39 am
by skydereign
It doesn't have to be simple, you could make a very complex multiplayer game, as long as you make the load and save clean. The part that makes it multiplayer is the loading and saving variables. It is possible with the built in save and using other methods.