New way to play! Cross Window Play System!

Started by Icey, Tue 07/08/2012 03:26:31

Previous topic - Next topic

Icey

So I a while back I was wondering here and there if it would be possible if AGS can run 2 games at the same time and have them interact with each other on the same computer. While working on one of my online based games the thought grew more and more and with it as usual an ambition to try the idea out. I knew I was already working on Mile's Adventure and a hell of a lot of other things. So, I said the only way I could try this was if I made something simple and not to too complex to make using 2 games at the same time. So when I started I came up with "blue print" in MS paint. It was with this that allowed me to grasp and I idea of what type of game I wanted to make. my first thought was to make a short PMQ tech demo that used a small puzzle part of one of my other games but made it where it would work using two screens. However the idea was scraped and I eventually changed the game to a Shard Hunters tech demo.



Shard Hunters was organically supposed to be a MAGS game but was never finished. It was a simple game but I was already busy with something else so I dropped it cause I thought I wasn't gonna finish it on time.



Cross Window Play System, is the name of the the "new way to play!". Both games runs like any other AGS games but it's the way the play that's different. The way both games interact with each other is the .tmp files made and deleted by 1 or the games. Whether you got a new item or are low on HP, the games will always be interacting. It not that hard to script the everything, it just takes a clear head and a lot of planing. Once you learn how script in AGS and use it's file function stuff then the rest it is just logic.



Something like this would be used by 1 game if a Quit Game button was clicked.

Code: AGS
if (!File.Exists("CrossExit.tmp"))
{
  File *output = File.Open("CrossExit.tmp", eFileWrite);
  output.WriteString("You will die!");
  output.Close();
}


Then this would be used by both games under repeatably_execute.

Code: AGS
File *output = File.Open("CrossExit.tmp",eFileRead);
{
	if (output == null)
  btnAbout.Text = "1";
else {
//  output.WriteString("test string");
  //output.Close();
	File.Delete("CrossExit.tmp");
  QuitGame(0);
}


This would close both games at the same time and delete the CrossExit.tmp file so that it does not mess with the games on their next launch, like closing them as soon as they load up.


Though game was made to test something, would you use this type of play style for 1 of your games? I don't think it's really that much to script but the then again that mostly depends on the type of game your trying to make.

Crimson Wizard

Cunning idea icey. ;)
An attention should be paid to how organize opening and reading files in an optimal way so that this won't slow game down too much.


Next thing to implement in AGS: named pipes.  :=

Gilbert

Interesting idea, though it would be more useful if two people plays two games interactively on two systems through networking, or that you have a number of different "Game A"s and "Game B"s available so you can mix and match by launching different games on each "side" each time and get different responses (kind of like how in some of the NDS games you can actually insert some selected GBA games into the GBA slot to access additional contents, or, well, Sonic 3).

Personally I think this is more practical.

CaptainD

I can see this being an interesting idea particularly for playing a game that involves time travel.  Typically you change modes within the same game, but this way you could have the same locations available in 2 time zones open simultaneously.
 

Eric

Quote from: Iceboty V7000a on Tue 07/08/2012 11:00:40
Interesting idea, though it would be more useful if two people plays two games interactively on two systems through networking

Someone recently suggested a pair of games where one featured the player as a criminal, and the other saw the player as a detective who had to identify the other player's in-crime actions. That sounded interesting to me, and this system implemented over a network could facilitate that sort of game.

Crimson Wizard

Quote from: Eric on Tue 07/08/2012 13:09:52
Someone recently suggested a pair of games where one featured the player as a criminal, and the other saw the player as a detective who had to identify the other player's in-crime actions. That sounded interesting to me, and this system implemented over a network could facilitate that sort of game.
That was me  :=

But that definitely should be implemented via networking, not sharing one file in game directory.

Icey

Thanx peeps :)

@Crimson Wizard: I'm going over all the stuff at real time. The only thing is right now I'm trying to figure out a way to get both games to read what they have to and delete what ever it is right after. I theory, but I have yet to test it out.

@Iceboty: So that's how DS games work, sounds really complicated but possible. Also I'm gonna check out that Linus game.

You know if anyone wants to try the system out I plan to release the templates for both games so hopefully someone could make something different :)

TomatoesInTheHead

A slow, laggy, but easy way to implement networking with this would be to run the game in a shared dropbox folder, I think.

SMF spam blocked by CleanTalk