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

This Month's Specials

Air Assault Task Force- Save $8.00
winSPWW2- Save $5.00

   







Go Back   .com.unity Forums > Illwinter Game Design > Dominions 2: The Ascension Wars

Reply
 
Thread Tools Display Modes
  #1  
Old March 9th, 2004, 03:25 AM
Tominator2's Avatar

Tominator2 Tominator2 is offline
Private
 
Join Date: Mar 2004
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Tominator2 is on a distinguished road
Default Re: 3rd party Apps wishlist

Quote:
New addition: I didnt think of it because its definetly in an area of programming I do badly at. A 3rd party program which can plot the fastest course from xxx to yyy. Read in the .map file and array the neighbor commands. Work out the shortest route.
Psuedo-code follows:

code:
We'll need a queue class "queue" and a list class "path".

The queue class is pretty standard.

The path class is just like a queue, except that it needs to support a "LastArea( )" method, which will return the most recently enqueued
element (addArea is just enq). Also, it will need a contains(x) method which returns true if the path already contains x.

We'll assume that:
- areas are represented by numbers
- travel always takes one "turn"
- there is an adjacency function adj(x, y) which returns true if x is adjacent to y, and false otherwise (e.g. return map[x][y]))
- we start in area 0

path start = new path(0);
queue q = new queue;
q.enq(start);

path ans;
ans = findPath(start);

path findPath(queue q, int goalArea) {
path curPath = q.deq( );
int curNode = curPath.LastArea( );
for (i = 1; i < numAreas; i++) {
if (adj(curNode, i)) {
if (i == goalArea) {
return curPath;
} else {
if (!path.contains(i)) {
path tmp = new path(curPath);
q.enq(tmp.addArea(i));
}
}
}
}

findPath(q, goalArea);
}

There might be a bug or two in the above code - I haven't tested it. In any case, it's a pretty straightforward breadth-first search. It's not nearly as efficient as Dijkstra's algorithm, but it is nice in that it keeps around partial paths (another function might prune a path for some game-related reason). I can't say I know anything about extracting data from .map files.

Quote:
An addition would be to add terrain and have it avoid either land or water.
A simple change to the adj function.

Quote:
Or even figure in terrain factors such as flyers and forest-moving units
Now it starts getting complicated, and you'll probably want an A* algorithm. I can do that, if you want to go that way.

[ March 09, 2004, 02:18: Message edited by: Tominator2 ]
Reply With Quote
  #2  
Old April 8th, 2004, 08:14 PM
Gandalf Parker's Avatar

Gandalf Parker Gandalf Parker is offline
Shrapnel Fanatic
 
Join Date: Oct 2003
Location: Vacaville, CA, USA
Posts: 13,736
Thanks: 341
Thanked 479 Times in 326 Posts
Gandalf Parker is on a distinguished road
Default Re: 3rd party Apps wishlist

OK in the new patch is a switch to do a scoredump. FANTASTIC work. It creates an html file with tables. Its the numbers instead of a chart, and that one turn only. (I now have that feature turned on in my solo games and a browser open to it on my harddrive)

But the progression is nice to see also. Maybe some webby person could write something that saves the score.html into numbered Versions, and shows them with a next/Last button. Or shows the Last few days all on one page. I dont know tables well enough to know if thats hard. Maybe frames?

I know there are free graphic programs out there. Preferably Linux. A program could extract the numbers from each score.html and maybe even recreate the line-graph scoreboard into a jpg.
__________________
-- 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!)
Reply With Quote
  #3  
Old April 12th, 2004, 11:26 PM
Gandalf Parker's Avatar

Gandalf Parker Gandalf Parker is offline
Shrapnel Fanatic
 
Join Date: Oct 2003
Location: Vacaville, CA, USA
Posts: 13,736
Thanks: 341
Thanked 479 Times in 326 Posts
Gandalf Parker is on a distinguished road
Default Re: 3rd party Apps wishlist

I know there is a really nice 3rd party app for multiple game saves and multiple god saves.

But I was thinking that the --preexec could copy the turn files to a subdirectory before each processing. But then I realized that it wouldnt offer anything since going to that previous save would be the same as just hitting "redo from start" on a turn file.

However, if someone put a counter in it... something easy to change. Have it count the turns or pull the number from the score.html and divide it by the requested save-count. Such as if I had a game called MyGame then this program culd make a directory beneath that called saves. Every 10th processing it could copy the turn files from MyGame to MyGame/saves before doing the hosting.
__________________
-- 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!)
Reply With Quote
  #4  
Old April 18th, 2004, 05:12 PM
Gandalf Parker's Avatar

Gandalf Parker Gandalf Parker is offline
Shrapnel Fanatic
 
Join Date: Oct 2003
Location: Vacaville, CA, USA
Posts: 13,736
Thanks: 341
Thanked 479 Times in 326 Posts
Gandalf Parker is on a distinguished road
Default Re: 3rd party Apps wishlist

Good news. The language of my choice (yet another basic) is going to add a "binder" to create standalone programs (windows and linux) so I might go ahead and tackle a few of these.
__________________
-- 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!)
Reply With Quote
  #5  
Old April 19th, 2004, 10:58 AM
PhilD's Avatar

PhilD PhilD is offline
First Lieutenant
 
Join Date: Sep 2003
Location: Bordeaux, France
Posts: 794
Thanks: 0
Thanked 0 Times in 0 Posts
PhilD is on a distinguished road
Default Re: 3rd party Apps wishlist

Quote:
Originally posted by Gandalf Parker:
I know there is a really nice 3rd party app for multiple game saves and multiple god saves.

But I was thinking that the --preexec could copy the turn files to a subdirectory before each processing. But then I realized that it wouldnt offer anything since going to that previous save would be the same as just hitting "redo from start" on a turn file.

However, if someone put a counter in it... something easy to change. Have it count the turns or pull the number from the score.html and divide it by the requested save-count. Such as if I had a game called MyGame then this program culd make a directory beneath that called saves. Every 10th processing it could copy the turn files from MyGame to MyGame/saves before doing the hosting.
Does --preexec work? I tried it, and it apparently wasn't recognized...

If anyone's interested, I have a bash script that can be used as a --postexec to to backup the .trn and .2h files for a whole game. It's very kludgy, as it creates an additional file to "remember" the turn number, and it still has path problems, and...

Oh, and since it uses bash, and standard unix commands, it's much easier to use on a Linux machine. To use it on Windows, you'll have to have a set of standard Unix commands installed.
Reply With Quote
  #6  
Old April 24th, 2004, 06:17 PM
Gandalf Parker's Avatar

Gandalf Parker Gandalf Parker is offline
Shrapnel Fanatic
 
Join Date: Oct 2003
Location: Vacaville, CA, USA
Posts: 13,736
Thanks: 341
Thanked 479 Times in 326 Posts
Gandalf Parker is on a distinguished road
Default Re: 3rd party Apps wishlist

Maybe some VB or VC programmer would like to do a menu driven Version of some of my stuff. I can provide the basic code for things like random opponents or randomized surprises in independent provinces. My Version of basic is cross-platform (linux and windows) so it isnt very good at making a user menu thing.
__________________
-- 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!)
Reply With Quote
  #7  
Old May 4th, 2004, 05:50 PM
Gandalf Parker's Avatar

Gandalf Parker Gandalf Parker is offline
Shrapnel Fanatic
 
Join Date: Oct 2003
Location: Vacaville, CA, USA
Posts: 13,736
Thanks: 341
Thanked 479 Times in 326 Posts
Gandalf Parker is on a distinguished road
Default Re: 3rd party Apps wishlist

The --preexec fix is in the next patch so I guess we can start programming around it for things like a game-save utility.

Im also looking at the --scoredump which generates a very nice tabled scoreboard. No running lines but nice numbers. Im thinking someone could easily write a program to add all the numbers together for an overall score. ManScore=armies+research+provinces
It might need some sort of formula to give a weighted amount to things like forts (forts*100?).

Im also still hoping someone will write a routine to save the numbers in scoredump and use them to recreate charts. There are plenty of chart routines out there so the actual graph/chart stuff wouldnt need written, just the collector. --scoredump --postexec collector.exe
__________________
-- 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!)
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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 12:47 PM.


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