Next ship button (Full Version)

All Forums >> [New Releases from Matrix Games] >> War in the Pacific: Admiral's Edition



Message


Jim Stevens -> Next ship button (7/11/2013 1:03:46 PM)

Has anybody else noticed when you are looking at a list of ships either in port or a task force and you click one of the ships to look at it's details, if you hit next ship from the detail screen it doesn't go to the next ship in the prior list as it did in WitP, it goes in some other, maybe random, order. Now when I want to be sure of details and go through the list it is annoying not knowing where next ship will take you. Does anybody know what order next / prev ship uses?




castor troy -> RE: Next ship button (7/11/2013 3:25:19 PM)

quote:

ORIGINAL: Jim Stevens

Has anybody else noticed when you are looking at a list of ships either in port or a task force and you click one of the ships to look at it's details, if you hit next ship from the detail screen it doesn't go to the next ship in the prior list as it did in WitP, it goes in some other, maybe random, order. Now when I want to be sure of details and go through the list it is annoying not knowing where next ship will take you. Does anybody know what order next / prev ship uses?



it does go through ship by ship but not with the first click. If you look at ship 1 it may jump to ship x when clicking on "next ship" but then it goes on x+1, x+2, x+3...




Lokasenna -> RE: Next ship button (7/11/2013 5:59:54 PM)

I always thought it might go through backwards.




Barb -> RE: Next ship button (7/12/2013 8:43:29 AM)

Actually, from my observation, the list actually go backwards to standard "order by" list viewed by user.
example TF:
CA - flag
CA
CL
DD
DD
DD
DD

If you open the CA-flag details and click next ship, it will cycle to the last destroyer and then upwards. Simple solution is to use the button "previous" to see the next ship :D




Jim Stevens -> RE: Next ship button (7/12/2013 11:42:36 AM)


quote:

ORIGINAL: Barb

Actually, from my observation, the list actually go backwards to standard "order by" list viewed by user.
example TF:
CA - flag
CA
CL
DD
DD
DD
DD

If you open the CA-flag details and click next ship, it will cycle to the last destroyer and then upwards. Simple solution is to use the button "previous" to see the next ship :D


You have to wonder if the logic got flip-flopped at some point.




RevRick -> RE: Next ship button (7/12/2013 3:26:51 PM)

It did. If you press the button to the left, it goes down the list. If you press the button to the right, it goes to the bottom of the list. But, then again, I have been accused of being dyslexic (comes from being a lefty transformed into a righty in elementary school in the 1950's.)




Don Bowen -> RE: Next ship button (7/12/2013 6:05:33 PM)


The order of ship display is the inverse of the order in which the ships are added to the TF (or base). This is due to (long technical explanation involving link lists and push down stacks).




Lokasenna -> RE: Next ship button (7/12/2013 8:00:55 PM)

I do think it's probably a case of using the wrong sign or a + instead of a - in the code.




Don Bowen -> RE: Next ship button (7/12/2013 8:11:16 PM)


quote:

ORIGINAL: Lokasenna

I do think it's probably a case of using the wrong sign or a + instead of a - in the code.



Nope, it ain't.




Lokasenna -> RE: Next ship button (7/12/2013 9:16:42 PM)


quote:

ORIGINAL: Don Bowen


quote:

ORIGINAL: Lokasenna

I do think it's probably a case of using the wrong sign or a + instead of a - in the code.



Nope, it ain't.


Have you got inside knowledge?! [X(]

It's the most obvious/simplest explanation for why 'next ship' goes backwards, unless to the devs backwards was really forwards...




Alfred -> RE: Next ship button (7/12/2013 10:07:27 PM)


quote:

ORIGINAL: Lokasenna


quote:

ORIGINAL: Don Bowen


quote:

ORIGINAL: Lokasenna

I do think it's probably a case of using the wrong sign or a + instead of a - in the code.



Nope, it ain't.


Have you got inside knowledge?! [X(]

It's the most obvious/simplest explanation for why 'next ship' goes backwards, unless to the devs backwards was really forwards...


He most definitely has inside knowledge. He is the man who coded that part of AE.

Alfred




Symon -> RE: Next ship button (7/13/2013 1:22:58 AM)

quote:

ORIGINAL: Lokasenna
Have you got inside knowledge?! [X(]

It's the most obvious/simplest explanation for why 'next ship' goes backwards, unless to the devs backwards was really forwards...

Challenging someone like Don with such an arrogant little post is quite annoying. Can you read? Have you read the game credits? Are you able to puzzle out the names of who the developers are (were)?

JWE (and yeah, you'll find me there, too)




Don Bowen -> RE: Next ship button (7/13/2013 1:31:59 AM)


quote:

ORIGINAL: Alfred


quote:

ORIGINAL: Lokasenna


quote:

ORIGINAL: Don Bowen


quote:

ORIGINAL: Lokasenna

I do think it's probably a case of using the wrong sign or a + instead of a - in the code.



Nope, it ain't.


Have you got inside knowledge?! [X(]

It's the most obvious/simplest explanation for why 'next ship' goes backwards, unless to the devs backwards was really forwards...


He most definitely has inside knowledge. He is the man who coded that part of AE.

Alfred


Actually this mechanism is residual from original WITP. Gary Grigsby or some other pioneer did the work.

It is a simple link list, coded for speed. For those of you not familiar with a link list, it works like this:

1. A pointer in the TF (or base) record points (links) to the first ship added to the TF (or base).
2. A link in the ship record points to next record, but not the next record added.
3. Since unsorted link lists are inherently push-down, the pointer in the TF record is changed to point to the next record added and that record (the next one) acquires the pointer to the first record (ship) added.
4. All this is duplicated for next and previous to allow rapid direct access of either the next or previous ship.
5. Traversing the entire link list for a search or other operation (like a sort) is time consuming as one must access multiple records to read the entire list. A sorted link list would perform this operation, but at considerable expense in time. Also, only a single sort order could be specified - the extended sorts available on TF, Base, and other ship lists would not be available.

As an example (looking at next path only for this example):
1. First ship is added to TF. TF points to ship 1, ship 1 pointer is null (empty).
2. Second ship is added to TF. TF pointer is changed to second ship and second ship acquires the previous TF pointer (to first ship). First ship's pointer stays null (it is never even touched).
3. Third ship is added. TF now points to third ship, third to second, second to fire.
4. Etc. ad nauseum.

As you can see, addition of ships is direct and easy. It is not necessary to search any of the existing ship records. Only the TF record and the new ship are involved. And, as is evident, a next record process will always return the ships in the inverse order of their addition to the TF.




geofflambert -> RE: Next ship button (7/13/2013 3:10:30 AM)

Symon didn't really mean that. You didn't know. I didn't know until recently. If Dan says something, it's even more authoritative than Alfred. [&o] (purple guy is for all three of them)




geofflambert -> RE: Next ship button (7/13/2013 3:13:42 AM)

Now I say bad words when I pick TF x in the list of TFs in a hex and it reroutes me to TF z. I know Michael has a lot better things to do, but I promise I'll stop saying all those bad words if it gets fixed.




geofflambert -> RE: Next ship button (7/13/2013 3:18:02 AM)

Oh, my Flying Spaghetti Monster, I just noticed I have five stars filled out! That must mean I'm at least smarter than all the guys with only four! Not.




Lokasenna -> RE: Next ship button (7/13/2013 3:30:10 AM)


quote:

ORIGINAL: Don Bowen


quote:

ORIGINAL: Alfred


quote:

ORIGINAL: Lokasenna


quote:

ORIGINAL: Don Bowen


quote:

ORIGINAL: Lokasenna

I do think it's probably a case of using the wrong sign or a + instead of a - in the code.



Nope, it ain't.


Have you got inside knowledge?! [X(]

It's the most obvious/simplest explanation for why 'next ship' goes backwards, unless to the devs backwards was really forwards...


He most definitely has inside knowledge. He is the man who coded that part of AE.

Alfred


Actually this mechanism is residual from original WITP. Gary Grigsby or some other pioneer did the work.

It is a simple link list, coded for speed. For those of you not familiar with a link list, it works like this:

1. A pointer in the TF (or base) record points (links) to the first ship added to the TF (or base).
2. A link in the ship record points to next record, but not the next record added.
3. Since unsorted link lists are inherently push-down, the pointer in the TF record is changed to point to the next record added and that record (the next one) acquires the pointer to the first record (ship) added.
4. All this is duplicated for next and previous to allow rapid direct access of either the next or previous ship.
5. Traversing the entire link list for a search or other operation (like a sort) is time consuming as one must access multiple records to read the entire list. A sorted link list would perform this operation, but at considerable expense in time. Also, only a single sort order could be specified - the extended sorts available on TF, Base, and other ship lists would not be available.

As an example (looking at next path only for this example):
1. First ship is added to TF. TF points to ship 1, ship 1 pointer is null (empty).
2. Second ship is added to TF. TF pointer is changed to second ship and second ship acquires the previous TF pointer (to first ship). First ship's pointer stays null (it is never even touched).
3. Third ship is added. TF now points to third ship, third to second, second to fire.
4. Etc. ad nauseum.

As you can see, addition of ships is direct and easy. It is not necessary to search any of the existing ship records. Only the TF record and the new ship are involved. And, as is evident, a next record process will always return the ships in the inverse order of their addition to the TF.


Neat, thanks Don. Makes sense. I know from experience that making linked lists "backwards" is a PITA and not worth it. It's been too long since I coded anything; now I feel a little silly about the "backwards" phrase.


And for those jumping on me, no I didn't know. I did look on the left there, but there's nothing on there about developing. I don't know about the rest of you, but in my world you look at the credits when you've "finished" a game...kind of a heuristic from the arcade days.




Jim Stevens -> RE: Next ship button (7/18/2013 8:28:29 AM)

Thanks Sir.




pws1225 -> RE: Next ship button (7/18/2013 5:33:12 PM)

The code's not backwards, we are.




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
1.5