|
|
|
|
|
August 12th, 2004, 12:57 PM
|
|
Major General
|
|
Join Date: Jan 2004
Location: twilight zone
Posts: 2,247
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: So i played a bit with C# lately
Quote:
It's just another language. Of course for the random user it's an inconvenience to have to install the framework but i have it on my machine for years now for other applications.
|
The real problem with using C#, and the reason why I'll be keeping your v0.6 on my website for downloading, is that it prevents many Dom 2 players from being able to use it. Namely, anyone who isn't using Win 2k/XP, which is arguably most Dom 2 players. I understand that you are learning the language for your own personal reasons, and that you've used Domsaver as a testbed app to do so, just as you did earlier when "playing around" with Java. However, may I suggest that you either continue supporting the Java Version, or release the Java Version's source code so that the broadest spectrum of players can utilize your nice, useful app?
|
August 12th, 2004, 01:24 PM
|
|
Corporal
|
|
Join Date: Jan 2004
Posts: 151
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: So i played a bit with C# lately
Actually that Java code doesn't really exist anymore. When i realized what crap code i had written there i tried refactor it but were distracted in the middle and now i doubt i'll touch it again.
|
August 12th, 2004, 02:02 PM
|
|
Shrapnel Fanatic
|
|
Join Date: Oct 2003
Location: Vacaville, CA, USA
Posts: 13,736
Thanks: 341
Thanked 479 Times in 326 Posts
|
|
Re: So i played a bit with C# lately
Quote:
Actually that Java code doesn't really exist anymore. When i realized what crap code i had written there i tried refactor it but were distracted in the middle and now i doubt i'll touch it again.
|
Care to start a psuedo code discussion of it?
Generic steps and checks to the program?
At its simplest Im picturing
zip game into game.zip
A variation might be something which runs as --postexec to read a --scoredump (or status file) in order to get a turn number. Then it could support "every 5 turns" or "rotating saves numbered 1-5"
Personally I avoid GUI menus but I suppose it could evelve into something menu driven for restores of old games.
__________________
-- DISCLAIMER:
This game is NOT suitable for students, interns, apprentices, or anyone else who is expected to pass tests on a regular basis. Do not think about strategies while operating heavy machinery. Before beginning this game make arrangements for someone to check on you daily. If you find that your game has continued for more than 36 hours straight then you should consult a physician immediately (Do NOT show him the game!)
|
August 12th, 2004, 02:08 PM
|
|
Second Lieutenant
|
|
Join Date: Jan 2004
Location: Copenhagen, Denmark
Posts: 410
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: So i played a bit with C# lately
What does it do? I sound like a simple job for a Perl script. (Don't tell me that windows doesn't provide Perl [img]/threads/images/Graemlins/ooo.gif[/img])
__________________
"It makes you wonder if there is anything to astrology after all. "Oh, there is," said Susan, "Delusion, wishful thinking and gullibility." (T. Pratchett)
|
August 12th, 2004, 03:39 PM
|
|
Major General
|
|
Join Date: Jan 2004
Location: twilight zone
Posts: 2,247
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: So i played a bit with C# lately
Microsoft doesn't "provide" Perl with Windows (MS is averse to all things they didn't invent/steal), but IIRC you can get Perl to work on Windows systems.
|
August 12th, 2004, 04:08 PM
|
|
Shrapnel Fanatic
|
|
Join Date: Oct 2003
Location: Vacaville, CA, USA
Posts: 13,736
Thanks: 341
Thanked 479 Times in 326 Posts
|
|
Re: So i played a bit with C# lately
Quote:
Microsoft doesn't "provide" Perl with Windows (MS is averse to all things they didn't invent/steal), but IIRC you can get Perl to work on Windows systems.
|
Which is why something that can be compiled, especially if it can be written cross-platform, might be good. Personally I avoid compiling executables for myself but in the area of making it easy for Users its helpful.
In any case, the subject itself would probably lend itself well to a flow-chart type discussion which could be written in any language.
__________________
-- DISCLAIMER:
This game is NOT suitable for students, interns, apprentices, or anyone else who is expected to pass tests on a regular basis. Do not think about strategies while operating heavy machinery. Before beginning this game make arrangements for someone to check on you daily. If you find that your game has continued for more than 36 hours straight then you should consult a physician immediately (Do NOT show him the game!)
|
August 12th, 2004, 08:55 PM
|
First Lieutenant
|
|
Join Date: Dec 2003
Location: Calgary, Canada
Posts: 762
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: So i played a bit with C# lately
Quote:
Quote:
You do need however the .net framework from microsoft. According to MS Win ME is no longer supported so i'd say forget about 98 too. For win2k you also need the service pack 2 but you should have that one anyways
|
The desperate coukd try Mono... but surely, using the C# Microsoft framework for this is akin to using mallets to squat houseflys...?
|
The desperate can pass the following script in Dom2 --postexec option ;-) :
Code:
gawk -f save_script.awk
where save_script.awk contains:
Code:
BEGIN {
timestamp_file = "Last-total-save-timestamp.txt";
t = systime();
stamp = strftime("%Y%m%d-%H%M%S",t);
stamp2 = strftime("%Y-%m-%d",t);
saveAll = 1;
if ((getline Last_stamp < timestamp_file) > 0)
{
if (stamp2 == Last_stamp)
saveAll = 0;
}
close(timestamp_file);
if (saveAll)
{
cmd = sprintf("zip -r save-all-%s * [email protected]",stamp);
print stamp2 > timestamp_file;
}
else
cmd = sprintf("zip -r -t %s save-%s * [email protected]",Last_stamp,stamp);
system(cmd);
}
|
Thread Tools |
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is On
|
|
|
|
|