Recent posts by mrcookies2 on Kongregate

Flag Post

Topic: Game Programming / [Solved]Help with socket policy files.

I’ve fixed my problem. Here’s what I did:
1. Made a socket connection with port 843.
2. Send policy file over 843 port socket.
3. When its connects, make ANOTHER socket connection on an unused port (which is almost any) 8002, 8801, 950, 7086 etc.
4. Use the second socket to send and receive data.

Wow, that was a bit of a hassle.

 
Flag Post

Topic: Game Programming / [Solved]Help with socket policy files.

Thanks for the help Draco, unfortunately it still doesn’t work. I was thinking, do I need to get the server program hosted on a website, because so far I’ve just been running it from my computer.

 
Flag Post

Topic: Game Programming / [Solved]Help with socket policy files.

I’ve written a C sharp server program and a as3 client program. They work fine when I run the flash client in debug inside IDE, but not when I move the client anywhere which I’ve discovered is because I need to send a policy file to the flash client. However, after the server sends the policy file it executes the Socket.Receive(byte[] b) function but with nothing to receive, and the client never connects to the server (connect function never calls) but no error messages. My best guess is that the policy file is wrong but I’ve tried altering it in many ways, none of which have worked.
C sharp server:

private static TcpListener myLis;
private static Socket socket;
public static void Main(string[] args)
{
	myLis = new TcpListener(IPAddress.Parse("192.168.0.5"), 8002);
	myLis.Start();
	socket = myLis.AcceptSocket();
	
        // some code removed to keep post short-ish
	if(Regex.IsMatch(receivedText, "<policy-file-request/>\0"))
	{
		Console.WriteLine("matched policy file request!");
		String policyFile = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +
			"<!DOCTYPE cross-domain-policy SYSTEM \"http://www.adobe.com/xml/dtds/cross-domain-policy.dtd\"&gt;" + 
			"<cross-domain-policy>" + 
			"<site-control permitted-cross-domain-policies=\"all\"/>" + 
			"<allow-access-from domain=\"*\" to-ports=\"*\" secure=\"false\"/>" + 
			"<allow-http-request-headers-from domain=\"*\" headers=\"*\" secure=\"false\"/>" +
			"</cross-domain-policy>\0";
			Char[] characterList = policyFile.ToCharArray();
			byte[] toSend = new Byte[characterList.Length];
			for ( int po = 0; po < characterList.Length; po ++)
			{
			        toSend[po] = (byte) Convert.ToByte(characterList[po]);
			}
    			socket.Send(toSend);
	}
	// code that was here received and read 3 bytes sent by client to check connection is working
}

Flash Client simply connects to server and sends 3 bytes on the connect event. I have been running the client by right-click menu, open with internet explorer.
Thank you for your time.

 
Flag Post

Topic: Game Programming / One game a month

I’m in too. @MrcookiesC
Good luck everyone.

 
Flag Post

Topic: Kongregate Labs / Unity Contest - Update game version ?

I have question: if you update a game that was uploaded quite a while ago will it move to the front again or something so it can be viewed again because if not it doesn’t seem like theres much point to updating. Replies are appreciated :)

 
Flag Post

Topic: General Gaming / Left 4 Dead: If you could create a zombie what would it be?

Engulfer:Swallows survivors whole then can use the survivors weapons to shoot the other survivors(but cannot move because that might make it unfair during mobs), is very inaccurate, when killed just drops off the survivor and cannot damage the survivor that it swallowed.
ps:infected ignore the swallowed survivor.

Weevile:Clings to a survivor’s back but the survivor acts normally not even reallising that it is on there, the only way that it can be found out is if Teammates look at that person’s status at bottom of screen(probably should also have it that the victim’s life bar draining away is not shown to him/her.EDIT:does continuous damage like other special infected

 
Flag Post

Topic: Collaborations / Ideas for game

You could make a tower defence I know how to make them work(I think) + Icould help with what sort of towers and creeps you should have ect.

 
Flag Post

Topic: Kongregate / More ideas for Kongregate

I added this cause I thought the suggestions topic was getting a little overcrowded.
Anyway my biggy is that it would be enormusly awesome if Kongregate allowed games to be uploaded in .exe format. If you’re not going to do this plz tell me why.

 
Flag Post

Topic: Kongregate Labs / Help!

O lol I started again from scratch and it turns out I had the wrong curly brakets( { and } ) eg class Ship extends MovieClip
> > >}< < <

 
Flag Post

Topic: Kongregate Labs / Help!

Im stuck on shootorial #1- The ship appears but it doesn’t move note:-(ive checked the code several times)

Im using vista and CS4