Gamebox object local ids

Discuss game box design and sharing.

Moderators: Ichibrothers, Cambronne

Post Reply
bggames01
120
Posts: 38
Joined: 09 Nov 2009, 23:58
Contact:

Gamebox object local ids

Post by bggames01 »

A big problem designing gameboxes is the object ids in savefiles/scenarios. You prepare and add all layouts, then you get ready to create scenarios, and just when you put 500 counters in place you find you made a slight error on the first counter sheet. All your work wasted. I understand currently objects are simply numbered as their position in the array when created from the gamebox layouts.

Imo a simple solution on the current codebase could be to make ids local. When the object is created from the gamebox layout the parent layout name is stored in the game object, as well as a local id to that layout.

Example:
<layout name="CountersA" ... 20 counters ... >
<layout name="CountersB" ... 15 counters ... >
<layout name="CountersC" ... 25 counters ... >

Normally the range of ids would be 0 to 59.

Saving the local layout name and id range it can be:
CountersA 0-19
CountersB 0-14
CountersC 0-24

Normally object tags are saved as:
<counter id="33" x="0" y="0" />

This can be changed to:
<counter id="12" layout="CountersB" x="0" y="0" />

Since ZunTzu generates the savefiles/scenarios this is easily changed. Checking for the "layout" attribute determines if it's a global or local id for backwards compatibility.

It would be great if this change could be implemented on the current codebase, as it would take away a huuuuge amount of frustration when creating gameboxes.
User avatar
Bill Barrett
231
Posts: 351
Joined: 25 May 2008, 13:25

Post by Bill Barrett »

I think it might be counter productive to introduce more code and therefore complexity, to an otherwise clean and relatively simple system.

I know about the frustration - it's happened to me on a number of occasions, but I just try and make sure I've got everything correct and in place, a long way before I think about laying out scenarios :)
bggames01
120
Posts: 38
Joined: 09 Nov 2009, 23:58
Contact:

Post by bggames01 »

Bill Barrett wrote:I think it might be counter productive to introduce more code and therefore complexity, to an otherwise clean and relatively simple system.

I know about the frustration - it's happened to me on a number of occasions, but I just try and make sure I've got everything correct and in place, a long way before I think about laying out scenarios :)
This is not complicated code. This is very simple. Is solves a big problem, stops gamebox designer frustration (I thought more gameboxes for ZunTzu would be a good thing?), and also is useful in future versions. Doesn't break any backwards compatibility. Why would anyone not want to add that?

Should I attempt any big wargame? Well, 100s of counters, I guess better not in ZunTzu? What when the new expansion comes for Talisman? I guess I should have "gotten everything correct" before the expansion existed? How many components does the biggest gamebox you've made has?

Edit I'm sorry if my reply sounds a tad aggressive. But with all due respect to your other contributions, your reply really pushed my buttons. I am not some noob trying to be a gamebox wizard. I am a programmer and I know what I am asking for. The very fact that I am asking means I feel this is a priority issue, or I would've just worked around it, like many of the minor annoyances. The codebase of the current version must be around still, even if work is in progress on a new version, and can be implemented in that. It is a background change, transparent to all users, and probably most designers as well.
User avatar
Bill Barrett
231
Posts: 351
Joined: 25 May 2008, 13:25

Post by Bill Barrett »

It may appear simple to you and I, who both know how to write a computer program, but I know for a fact that many others regard even the existing code as too daunting.

No, what is needed is a gamebox/scenario editor that allows you to change card/counter/terrain ids on the fly. I'd have written one myself a long time ago, if it weren't for the fact that Jerome has one in the works.

Once this is available, no one will have to write a single line of xml again, and the production of ZT modules will consequently mushroom.

I'm currently doing a monster game with 5 large maps and over 2600 counters. It took an hour and a half to build, but I know that laying out all the scenarios will take a lot longer. Before I even start, I'm going to make absolutely sure I have the exact number of markers required (using the "supply" attribute), and whether or not I want the charts to be rendered as "terrains" or "cards" etc. Planning is all - if you're sure of how you want things to turn out, then you'll avoid the pitfalls down the road.

As for expansion kits, I fully expect that Jerome's editor will make these a cinch to incorporate, but again a little foresight in the planning can make these relatively simple to add even now.

Oh and by the way, I can confidently claim to have built the largest ZT game box yet - it has 500 map layout tabs (1,000 tabs in all) and 100,000 counters. I built it to test a scenario "cloning" utility I wrote for my own use, and also to see what ZunTzu's limits were.

I now know that they're very high indeed :)
bggames01
120
Posts: 38
Joined: 09 Nov 2009, 23:58
Contact:

Post by bggames01 »

That is exactly my point! Game box designers won't even notice this feature, except that they don't need to waste hours of time when they make 1 change. The attribute is generated by ZunTzu when you save the game. Game box designers don't need to know anything about it. The gamebox.xml is still made the same as before. But the ztg and zts are different. You create your gamebox.xml just as you do now, you open it in ZunTzu, you move all your counters, you save the ztg, you copy/paste it to the zts, and it's all the same as before. BUT now it will have the layout attribute added to each counter object. It is a small change to add it to the software, doesn't bother designers or players, and solves the biggest current frustration in designing gameboxes. If there is a designer or not is irrelevant for this. You can use it with or without a designer.

I do not share your optimism about a rush of gameboxes with a designer. The hardest part is doing the graphics imo. You still need to use a bunch of software, scanners even. I don't believe there is a flood of people out there that want to scan their boardgame if only they had a designer. Personally I think making a designer is not worth the time that should be first spend on improving the featureset of ZunTzu itself, and providing proper documentation to current gamebox designers. Once that is in place maybe there is time for a designer. I just hope all the time it takes to make the designer will not cripple the whole project. I could've programmed my own tools to help me make the gamebox, if it was worth the effort, which it isn't, unless this feature is not added, and I might have to write a tool to keep changing id offsets.

I will add an example because I fear you might be missing what I am saying.

Code: Select all

<?xml version="1.0" encoding="utf-8" ?>
<game-box name="MyGame" description="MyGame" copyright="Me" startup-scenario="sample.zts">
	<dice-hand type="D6"> <dice count="1" color="00ff00" pips="ffffff" /> </dice-hand>
	<map name="Map" image-file="Map.jpg" resolution="300 dpi" />
	<terrain-sheet name="Charts" front-image-file="Charts.jpg" front-resolution="300 dpi">
		<terrain-section rows="2" columns="2" front-left="0" front-top="0" front-right="2000" front-bottom="2000" /> </terrain-sheet>
	<counter-sheet name="Counters" front-image-file="Counters-Front.jpg" front-resolution="300 dpi" back-image-file="Counters-Back.jpg" back-resolution="300 dpi">
		<counter-section rows="16" columns="10"
			front-left="0" front-top="0" front-right="1000" front-bottom="1600"
			back-left="0" back-top="0" back-right="1000" back-bottom="1600" /> </counter-sheet>
</game-box>
Empty zts to get started.

Code: Select all

<?xml version="1.0" encoding="utf-8" ?>
<game game-box="MyGame" scenario-name="Sample" scenario-description="Sample Deployment" scenario-copyright="Me">
	<layout board="Map" />
	<layout board="Charts" />
	<layout board="Counters" />
</game>
Now I open it up in ZunTzu to make my scenario. And I save the game as ztg. As it is now we would get something like.

Code: Select all

<game game-box="MyGame" scenario-name="Sample" scenario-description="Sample Deployment" scenario-copyright="Me">
	<layout board="Map" left="-5420.84" top="-70.71" right="23664.19" bottom="18107.43" visible="true">
		<counter id="2" x="7668.48" y="317.16" />
		<counter id="49" x="2104.67" y="1194.27" />
		<counter id="105" x="2985.31" y="1186.80" />
		<counter id="1" x="1661.48" y="6469.64" />
		<counter id="67" x="2525.64" y="6974.21" />
		<counter id="69" x="2094.49" y="6715.67" />
		<counter id="68" x="2533.15" y="6452.14" />
		<counter id="40" x="5110.53" y="11976.62" />
		<counter id="41" x="4692.73" y="12241.19" />
		<counter id="50" x="6407.76" y="13232.83" />
		<counter id="107" x="3822.14" y="13233.40" />
		<counter id="108" x="2944.73" y="13736.99" />
		<counter id="100" x="6830.42" y="10976.56" />
		<counter id="101" x="8133.24" y="10205.17" />
		<counter id="102" x="8135.30" y="11214.54" />
		<counter id="103" x="7278.96" y="12229.18" />
		<counter id="27" x="6405.52" y="14242.87" />
		<stack x="7270.17" y="14745.05">
			<counter id="14" />
			<counter id="28" />
		</stack>
		<counter id="29" x="1656.36" y="14996.53" />
		<counter id="37" x="804.02" y="16001.01" />
	</layout>
	<layout board="Charts" left="-4208.90" top="-72.70" right="9858.38" bottom="8715.58" />
	<layout board="Counters" left="-3700.69" top="-401.74" right="7943.36" bottom="6875.79" />
</game>
All the id attributes on the counter tags are just numbered as objects are created from the layouts in the zts as based on the ztg. Chart is 0-3. Counters is 4-163. If I decided to add some terrain layout before Charts and after Map, because I want to keep the terrain tab next to the map tab in the interface, all the ids will be wrong, and I can start anew.

My proposal is to get the output ztg to look like this.

Code: Select all

<game game-box="MyGame" scenario-name="Sample" scenario-description="Sample Deployment" scenario-copyright="Me">
	<layout board="Map" left="-5420.84" top="-70.71" right="23664.19" bottom="18107.43" visible="true">
		<counter id="2" layout="Charts" x="7668.48" y="317.16" />
		<counter id="45" layout="Counters" x="2104.67" y="1194.27" />
		<counter id="101" layout="Counters"  x="2985.31" y="1186.80" />
		<counter id="1" layout="Charts" x="1661.48" y="6469.64" />
		<counter id="63" layout="Counters"  x="2525.64" y="6974.21" />
		<counter id="65" layout="Counters"  x="2094.49" y="6715.67" />
		<counter id="64" layout="Counters"  x="2533.15" y="6452.14" />
		<counter id="36" layout="Counters"  x="5110.53" y="11976.62" />
		<counter id="37" layout="Counters"  x="4692.73" y="12241.19" />
		<counter id="46" layout="Counters"  x="6407.76" y="13232.83" />
		<counter id="103" layout="Counters"  x="3822.14" y="13233.40" />
		<counter id="104" layout="Counters"  x="2944.73" y="13736.99" />
		<counter id="96" layout="Counters"  x="6830.42" y="10976.56" />
		<counter id="97" layout="Counters"  x="8133.24" y="10205.17" />
		<counter id="98" layout="Counters"  x="8135.30" y="11214.54" />
		<counter id="99" layout="Counters"  x="7278.96" y="12229.18" />
		<counter id="23" layout="Counters"  x="6405.52" y="14242.87" />
		<stack x="7270.17" y="14745.05">
			<counter id="10" layout="Counters" />
			<counter id="24" layout="Counters" />
		</stack>
		<counter id="25" layout="Counters"  x="1656.36" y="14996.53" />
		<counter id="33" layout="Counters"  x="804.02" y="16001.01" />
	</layout>
	<layout board="Charts" left="-4208.90" top="-72.70" right="9858.38" bottom="8715.58" />
	<layout board="Counters" left="-3700.69" top="-401.74" right="7943.36" bottom="6875.79" />
</game>
Since this is generated by ZunTzu, no designer needs to worry about it. Yet if I now add another layout, there is no problem. Sure if I change the composition of 1 layout, then there can still be trouble, but you can add counters to the bottom, so they will be at the high end of the id range.

Now, since the ztg/zts is exported by ZunTzu itself, where does it increase complexity for the gamebox designer? It also solves the expansion-pack-for-gamebox problem until proper expansion mechanisms can be created. Since you can add and re-arrange and change layouts, with much less restrictions.
User avatar
Bill Barrett
231
Posts: 351
Joined: 25 May 2008, 13:25

Post by Bill Barrett »

bggames01
120
Posts: 38
Joined: 09 Nov 2009, 23:58
Contact:

Post by bggames01 »

Bill Barrett wrote:Have you seen this forum topic:

http://www.zuntzu.com/forum/viewtopic.php?t=599&start=0
No, I had not. I am glad the designer is so far progressed. I guess I don't need to be afraid about Jerome lacking time? I remain pessimistic about these "hordes" of potential gamebox designers though, but that doesn't mean I'd not be glad to be proven wrong.

I guess I won't have any chance of getting my feature then...
Post Reply