bugLordsAWar! - Bugs: bug #24590, Stacks should not automatically...

 
 

bug #24590: Stacks should not automatically decomposed or combined

Submitted by:  zed <savannah_zed>
Submitted on:  Fri 17 Oct 2008 10:53:10 AM UTC  
 
Category: gameSeverity: 3 - Normal
Item Group: NoneStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Sun 19 Oct 2008 09:18:48 PM UTC, comment #10:

Thanks again for all the great bug reports!

Ben Asselstine <benasselstine>
Project Administrator
Sun 19 Oct 2008 09:01:31 PM UTC, comment #9:

Thanks for your efforts. It's better than ever and OK to close.

However, it seems you had to trick a little bit and that groups are not represented like they should:

[{1}][${2,3,4}][{5,6,7}] // movement
[{1}][][${2,3,4},{5,6,7}] // deselection (via button); selection
[${1}][][{2,3,4},{5,6,7}] // movement
[][][${1},{2,3,4???5,6,7}] // movement
[${1}][][{2,3,4,5,6,7}][] // notice, the groups were joined

Legend:
[] -- tile
{} -- group
$ -- focus
1-7 -- a unit with id 1-7
??? -- not observable

I suspect, the groups are joined because they are shown in the GUI as [${1},{2,3,4,5,6,7}]. This should not be necessary, but I can live with it.

zed <savannah_zed>
Sun 19 Oct 2008 06:00:13 PM UTC, comment #8:

addressed in svn. okay to close?

Ben Asselstine <benasselstine>
Project Administrator
Sat 18 Oct 2008 07:53:10 AM UTC, comment #7:

Looks like a mess to me. That said, I'm not familiar with C++ or C code, so I can't help you there. Unless of course, you interpret the code for me and give me an understanding what kind of data structure this is.

What I would like to represent a single tile is a List of Stacks (a Stack being a special kind of List). Then no automatic grouping or ungrouping should be necessary at all.

zed <savannah_zed>
Fri 17 Oct 2008 10:43:28 PM UTC, comment #6:

There's a lot of grouping and ungrouping that happens after a split. This is probably the source of the problem you're seeing.

../../lordsawar/lordsawar/trunk/src/action.cpp: 417: Action_Split::fillData()
../../lordsawar/lordsawar/trunk/src/stack.cpp: 123: move_one_step()
../../lordsawar/lordsawar/trunk/src/stack.cpp: 349: Stack::group()
../../lordsawar/lordsawar/trunk/src/stack.cpp: 359: Stack::ungroup()
../../lordsawar/lordsawar/trunk/src/stack.cpp: 349: Stack::group()
../../lordsawar/lordsawar/trunk/src/stack.cpp: 123: move_one_step()
../../lordsawar/lordsawar/trunk/src/action.cpp: 601: Action_Join::fillData
../../lordsawar/lordsawar/trunk/src/stack.cpp: 359: Stack::ungroup()

Ben Asselstine <benasselstine>
Project Administrator
Fri 17 Oct 2008 05:34:18 PM UTC, comment #5:

Loading/saving seems to work.

zed <savannah_zed>
Fri 17 Oct 2008 05:28:03 PM UTC, comment #4:

> XML_Helper::getData(bool, "d_grouped") failed
> segmentation fault


Confused as I was, I tried to load an old game.

zed <savannah_zed>
Fri 17 Oct 2008 05:05:30 PM UTC, comment #3:

Stack groupedness is now loaded and saved.

Ben Asselstine <benasselstine>
Project Administrator
Fri 17 Oct 2008 03:20:08 PM UTC, comment #2:

It seems that the game can only handle a single "two stacks on a tile", without decombining the stacks.

Legend:
[] -- Tile
{} -- Stack group
$ -- Focus
1-7 -- units

[${1,2,3}][{4,5}][{6,7}] // movement
[][${1,2,3},{4,5}][{6,7}] // deselection (via button)
[][{1,2,3},{4,5}][{6,7}] // re-selection
[][${1,2,3},{4,5}] // notice: stack info is preserved

[${1,2,3}][{4,5}][{6,7}] // movement
[][${1,2,3},{4,5}][{6,7}] // selection
[][{1,2,3},{4,5}][${6,7}] // re-selection
[][${1},{2},{3},{4},{5}] // notice: stack info is lost

zed <savannah_zed>
Fri 17 Oct 2008 11:58:36 AM UTC, comment #1:

I think you meant to say that the grouping information is not loaded or saved. This should be fixed.

You have noticed that stack groupings do not work exactly like warlords yet. It is a very tricky behaviour to get right.

Here's another case that doesn't work:

1. take a stack of 3 army units and move one army units out of it.
2. group the remaining 2 army units and move them on top of the single army unit
notice that the stacks merge, but the two army units I had grouped in the incoming stack are no longer pre-selected.

I find your test case hard to follow. Can you restate it with a numbered list?

Ben Asselstine <benasselstine>
Project Administrator
Fri 17 Oct 2008 10:53:10 AM UTC, original submission:

If you move a stack onto another, deselect it and reselect it, the stack remains grouped.

If you deselect a stack "S", select some other stack, deselect that and reselect the original stack "S", it is decombined (just the first unit is selected).

Also information about stacks are not loaded or saved.

Is this behavior dictated by the current data structures?

zed <savannah_zed>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by benasselstine (Posted a comment)
  • -unavailable- added by savannah_zed (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 19 Oct 2008 09:18:48 PM UTCbenasselstineOpen/ClosedOpen=>Closed
    Fri 17 Oct 2008 05:05:30 PM UTCbenasselstineSummaryStacks should not automatically decomposed (or combined) and should survive saving/loading=>Stacks should not automatically decomposed or combined
    Fri 17 Oct 2008 04:12:17 PM UTCbenasselstineCategoryNone=>game

    Back to the top


    Powered by Savane 3.1-cleanup1