.com.unity Forums
  The Official e-Store of Shrapnel Games

This Month's Specials

Raging Tiger- Save $9.00
winSPMBT: Main Battle Tank- Save $6.00

   







Go Back   .com.unity Forums > Shrapnel Community > Space Empires: IV & V

Reply
 
Thread Tools Display Modes
  #131  
Old June 3rd, 2004, 10:47 PM
Fyron's Avatar

Fyron Fyron is offline
Shrapnel Fanatic
 
Join Date: Jul 2001
Location: Southern CA, USA
Posts: 18,394
Thanks: 0
Thanked 12 Times in 10 Posts
Fyron is an unknown quantity at this point
Default Re: The SE4 companion - Why the long wait?.

You should concentrate on finishing the program as it is before adding new (useless) features.
__________________
It's not whether you win or lose that counts: it's how much pain you inflict along the way.
--- SpaceEmpires.net --- RSS --- SEnet ModWorks --- SEIV Modding 101 Tutorial
--- Join us in the #SpaceEmpires IRC channel on the Freenode IRC network.
--- Due to restrictively low sig limits, you must visit this link to view the rest of my signature.
Reply With Quote
  #132  
Old June 4th, 2004, 01:01 AM
Aiken's Avatar

Aiken Aiken is offline
Major
 
Join Date: Jan 2004
Location: Taganrog, Russia
Posts: 1,087
Thanks: 0
Thanked 0 Times in 0 Posts
Aiken is on a distinguished road
Default Re: The SE4 companion - Why the long wait?.

Quote:
Originally posted by dogscoff:
Also, please could you code in a module that will monitor the beer-content of my fridge and automatically send a robot down the shops for me to restock different brands according to the mod I'm playing.
Koolio at your service, Master
Reply With Quote
  #133  
Old June 4th, 2004, 06:11 AM
Ruatha's Avatar

Ruatha Ruatha is offline
Major General
 
Join Date: May 2002
Location: Linghem, Östergötland, Sweden
Posts: 2,255
Thanks: 0
Thanked 0 Times in 0 Posts
Ruatha is on a distinguished road
Default Re: The SE4 companion - Why the long wait?.

I'll add the music list later, it seems like a 30 minutes job. (Hybris)
I'm still working on the PBW download, the automatic download works fine, but now I'll have to make a manual download option aswell.
This is much more complicated than I thought (And fun yes!!)
And then the deadline closing alert and the upload option. Finish the mail options and the documentation. And the music list.

The main distractions are:
-Summer and sun.
-Two kids.
-A work. (will work this weekend aswell )
-A wife that thinks I should clean the house and move the lawn and stuff like that....

Still, progress being made each day.
I hope that everything else than this download thing will be easier, I've felt for several days that I'm near completion, yet when I look at it it seems as far away still as it was a couple of days ago...
Reply With Quote
  #134  
Old June 4th, 2004, 09:17 AM
dogscoff's Avatar

dogscoff dogscoff is offline
General
 
Join Date: Mar 2001
Location: UK
Posts: 4,245
Thanks: 0
Thanked 0 Times in 0 Posts
dogscoff is on a distinguished road
Default Re: The SE4 companion - Why the long wait?.

Quote:
, I've felt for several days that I'm near completion, yet when I look at it it seems as far away still as it was a couple of days ago...
Perhaps because you keep adding new features..?
Reply With Quote
  #135  
Old June 4th, 2004, 09:39 AM
Ruatha's Avatar

Ruatha Ruatha is offline
Major General
 
Join Date: May 2002
Location: Linghem, Östergötland, Sweden
Posts: 2,255
Thanks: 0
Thanked 0 Times in 0 Posts
Ruatha is on a distinguished road
Default Re: The SE4 companion - Why the long wait?.

Quote:
Originally posted by dogscoff:
quote:

, I've felt for several days that I'm near completion, yet when I look at it it seems as far away still as it was a couple of days ago...
Perhaps because you keep adding new features..?
Could be....

Download finished, now I have no clue as to how to make the uploads.... and am tired...

Edit2: I've got the hint of a clue as to what to do, something to build with anyway and a hope!
Will do the music bit in between to rest my brain a bit

[ June 04, 2004, 18:31: Message edited by: Ruatha ]
Reply With Quote
  #136  
Old June 5th, 2004, 03:36 PM
Slynky's Avatar

Slynky Slynky is offline
General
 
Join Date: Jan 2003
Location: Atlanta, GA
Posts: 3,499
Thanks: 0
Thanked 0 Times in 0 Posts
Slynky is on a distinguished road
Default Re: The SE4 companion - Why the long wait?.

You da MAN, Ruatha!
__________________
ALLIANCE, n. In international politics, the union of two thieves who have their hands so deeply inserted in each other's pocket that they cannot separately plunder a third. (Ambrose Bierce)
Reply With Quote
  #137  
Old June 5th, 2004, 03:52 PM
Ruatha's Avatar

Ruatha Ruatha is offline
Major General
 
Join Date: May 2002
Location: Linghem, Östergötland, Sweden
Posts: 2,255
Thanks: 0
Thanked 0 Times in 0 Posts
Ruatha is on a distinguished road
Default Re: The SE4 companion - Why the long wait?.

But I'm still in the blind about uploading.
I'll need to find a way to do multipart/form-data post to uplaod the file through the application.
There are a few hints on the net but I haven't succeded yet, so if anyone has done that on a passowrd protected server before please give me a hint...

I could do a dirty Version where you get a filebrowser and choose the turnfile, but I'd prefer the hard way, a button click only.


Still, tomorrow is all work and no programming so I'll have time to think about this before I try again!

[ June 05, 2004, 15:53: Message edited by: Ruatha ]
Reply With Quote
  #138  
Old June 5th, 2004, 08:37 PM
Ed Kolis's Avatar

Ed Kolis Ed Kolis is offline
General
 
Join Date: Apr 2001
Location: Cincinnati, Ohio, USA
Posts: 4,547
Thanks: 1
Thanked 7 Times in 5 Posts
Ed Kolis is on a distinguished road
Default Re: The SE4 companion - Why the long wait?.

I feel so useless, coming up with new features for this program while being too lazy to work on my design analyzer program...

Then again, my job DOES involve programming all day so it's not something I really have much patience for when I get home...
__________________
The Ed draws near! What dost thou deaux?
Reply With Quote
  #139  
Old June 5th, 2004, 09:13 PM
Ruatha's Avatar

Ruatha Ruatha is offline
Major General
 
Join Date: May 2002
Location: Linghem, Östergötland, Sweden
Posts: 2,255
Thanks: 0
Thanked 0 Times in 0 Posts
Ruatha is on a distinguished road
Default Re: The SE4 companion - Why the long wait?.

Quote:
Originally posted by Ed Kolis:
I feel so useless, coming up with new features for this program while being too lazy to work on my design analyzer program...

Then again, my job DOES involve programming all day so it's not something I really have much patience for when I get home...
Do you do some programming involving sending HTTP headers???


This is where I'm stuck right now:
code:
<link href="seiv.css" rel="STYLESHEET" type="text/css">
<html>
<head><title>Join Game: (Nearly Gods) The Conflict 5</title>
<META HTTP-EQUIV="Expires" CONTENT="-1">
<base target="_top">
</head>
<body bgcolor="#000000" text="#0099FF">

<H3>Upload your latest turn</H3>
Please upload your turn file; the sooner everyone uploads their turn,
the sooner the next turn can start! If you don't get your turn in on time,
you risk having the AI play for you.<P>
<B>Note</B>: Your turn file <em>should</em> be named
<B><CODE>NeGoC5_0001.plr</CODE></B>
or else you are probably uploading a turn for the wrong game!<P>
<FORM METHOD=POST enctype="multipart/form-data" ACTION='/GameUpload'>
Turn file (.plr): <input type=File name='file' size=20><BR>
<INPUT TYPE=HIDDEN NAME='command' VALUE='pturn'>
<INPUT TYPE=HIDDEN NAME='game' VALUE='147s84n'>
<INPUT TYPE=HIDDEN NAME='ok' VALUE='/text/index.jsp?menu=gamemenu.jsp%
3fgame=147s84n&body=gamebody.jsp%3fgame=147s84n'>
<INPUT TYPE=image src="img/sendturn.gif">
</FORM>

</body>
</html>

I'm trying to understand this code and see if it can help me:
http://www.matlus.com/scripts/websit...PartFormData&5

Currently the app uses an embedded hidden webbrowser that surfs and logins to the PBW server without user input.
Then it uses this procedure to download the files:

code:
  function TForm1.GetInetFile
(const fileURL, FileName: String): boolean;
const BufferSize = 1024;

// Uses wininet
var
hSession, hURL: HInternet;
Buffer: array[1..BufferSize] of Byte;
BufferLen: DWORD;
f: File;
sAppName: string;

begin

//showmessage(fileUrl+'-'+FileName);
Result:=False;
sAppName := ExtractFileName(Application.ExeName);
hSession := InternetOpen(PChar(sAppName),
INTERNET_OPEN_TYPE_PRECONFIG,
nil, nil, 0);
try
hURL := InternetOpenURL(hSession,
PChar(fileURL),
nil,0,0,0);
try
AssignFile(f, FileName);
Rewrite(f,1);
repeat

InternetReadFile(hURL, @Buffer,
SizeOf(Buffer), BufferLen);
BlockWrite(f, Buffer, BufferLen)
until BufferLen = 0;
CloseFile(f);
Result:=True;
finally
InternetCloseHandle(hURL)
end
finally
InternetCloseHandle(hSession)
end;

end;

But now about the uploads, I can handle simple forms like the login form, but sending files is harder.
If I (the Se4 companion rather) inputs a filename with path in the textbox and presses send it says that it won't accept that (The full path), it accepts the filename only but then I don't know what happens, it says it has uploaded and executes but I can't see that I've sent any file... Does it create a dummy file?

I'll have to look what it is it receives at the PBW server, on monday, tomorrow 22 hour workday.


Any input is welcome!

[ June 05, 2004, 20:44: Message edited by: Ruatha ]
Reply With Quote
  #140  
Old June 5th, 2004, 09:24 PM
Slynky's Avatar

Slynky Slynky is offline
General
 
Join Date: Jan 2003
Location: Atlanta, GA
Posts: 3,499
Thanks: 0
Thanked 0 Times in 0 Posts
Slynky is on a distinguished road
Default Re: The SE4 companion - Why the long wait?.

Quote:
Originally posted by Ed Kolis:
I feel so useless, coming up with new features for this program while being too lazy to work on my design analyzer program...

Then again, my job DOES involve programming all day so it's not something I really have much patience for when I get home...
Yeah, it's like working at McDonalds and coming home to find hamburgers for supper...

I know the feeling...working in IT all day and then having one of the kids need me to do something on their PC...
__________________
ALLIANCE, n. In international politics, the union of two thieves who have their hands so deeply inserted in each other's pocket that they cannot separately plunder a third. (Ambrose Bierce)
Reply With Quote
Reply

Bookmarks


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 02:28 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2024, Shrapnel Games, Inc. - All Rights Reserved.