[Freeciv-Dev] [patch #1446] [Metaticket] Ruleset object

2012-06-17 Thread Jacob Nevins
Update of patch #1446 (project freeciv):

 Planned Release:   2.4.0 =


___

Reply to this item at:

  http://gna.org/patch/?1446

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #1446] [Metaticket] Ruleset object

2010-10-27 Thread pepeto

Update of patch #1446 (project freeciv):

 Planned Release:   2.3.0 = 2.4.0  


___

Reply to this item at:

  http://gna.org/patch/?1446

___
  Message posté via/par Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #1446] [Metaticket] Ruleset object

2010-07-05 Thread Matthias Pfafferodt

Update of patch #1446 (project freeciv):

  Depends on: = patch #1735


___

Reply to this item at:

  http://gna.org/patch/?1446

___
  Nachricht geschickt von/durch Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #1446] [Metaticket] Ruleset object

2010-06-17 Thread Matthias Pfafferodt

Update of patch #1446 (project freeciv):

  Depends on: = patch #1338


___

Reply to this item at:

  http://gna.org/patch/?1446

___
  Nachricht geschickt von/durch Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #1446] [Metaticket] Ruleset object

2010-06-09 Thread Matthias Pfafferodt

Follow-up Comment #18, patch #1446 (project freeciv):

I updated all all enum * patches; it seems to work but could somebody please
check them; thanks!

[bug #1678] 01-trunk-add-SPECENUM_NUM
[bug #1646] 02-trunk-use-specenum_gen-for-enum-effect_type
[bug #1648] 03-trunk-use-specenum_gen-for-enum-req_range
[bug #1649] 04-trunk-use-specenum_gen-for-enum-tech_flag_id
[bug #1650] 05-trunk-use-specenum_gen-for-enum-impr_flag_id-and-enum-impr
[bug #1647] 06-trunk-use-specenum_gen-for-enum-universal_n
[bug #1658] 07-trunk-use-specenum_gen-for-enum-terrain_flag_id
[bug #1659] 08-trunk-use-specenum_gen-for-enum-terrain_class-and-enum-ter
[bug #1660] 09-trunk-use-specenum_gen-for-enum-mapgen_terrain_property
[bug #1661] 10-trunk-use-specenum_gen-for-enum-unit_class_flag_id


___

Reply to this item at:

  http://gna.org/patch/?1446

___
  Nachricht geschickt von/durch Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #1446] [Metaticket] Ruleset object

2010-05-21 Thread Matthias Pfafferodt

Update of patch #1446 (project freeciv):

  Depends on: = patch #1678


___

Reply to this item at:

  http://gna.org/patch/?1446

___
  Nachricht geschickt von/durch Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #1446] [Metaticket] Ruleset object

2010-05-02 Thread Matthias Pfafferodt

Update of patch #1446 (project freeciv):

  Depends on: = patch #1658


___

Reply to this item at:

  http://gna.org/patch/?1446

___
  Nachricht geschickt von/durch Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #1446] [Metaticket] Ruleset object

2010-05-02 Thread Matthias Pfafferodt

Update of patch #1446 (project freeciv):

  Depends on: = patch #1662


___

Reply to this item at:

  http://gna.org/patch/?1446

___
  Nachricht geschickt von/durch Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #1446] [Metaticket] Ruleset object

2010-04-25 Thread Matthias Pfafferodt

Update of patch #1446 (project freeciv):

  Depends on: = patch #1646


___

Reply to this item at:

  http://gna.org/patch/?1446

___
  Nachricht geschickt von/durch Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #1446] [Metaticket] Ruleset object

2010-04-25 Thread Matthias Pfafferodt

Update of patch #1446 (project freeciv):

  Depends on: = patch #1651


___

Reply to this item at:

  http://gna.org/patch/?1446

___
  Nachricht geschickt von/durch Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #1446] [Metaticket] Ruleset object

2010-04-25 Thread pepeto

Follow-up Comment #16, patch #1446 (project freeciv):

I am not sure, but maybe patch #1646 should use the names that are used in
the ruleset file, maybe defining SPECENUM_VALUEx_NAMEs?


___

Reply to this item at:

  http://gna.org/patch/?1446

___
  Message posté via/par Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #1446] [Metaticket] Ruleset object

2010-04-25 Thread Matthias Pfafferodt

Follow-up Comment #17, patch #1446 (project freeciv):

 I am not sure, but maybe patch #1646 should use the names that are used in
the ruleset file, maybe defining SPECENUM_VALUEx_NAMEs?

This is a good idea. It would move the definitions (enum and strings) to one
place.

working version of file #9073 attached

(file #9074)
___

Additional Item Attachment:

File name: ruleset.patch  Size:100 KB


___

Reply to this item at:

  http://gna.org/patch/?1446

___
  Nachricht geschickt von/durch Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #1446] [Metaticket] Ruleset object

2010-04-19 Thread Matthias Pfafferodt

Follow-up Comment #7, patch #1446 (project freeciv):

 [1] Do we need the client parse the ruleset file? I guess it would make a
very big network traffic when someone will connect. It would probably make
on-line games impossible, what do you think? 

I don't know ... If I consider the default ruleset all definition files have
a size of around 225K. Stripping all comments and additional spaces reduce it
to 150K. Now, most data can be packed into tables (like all advances). But, on
the other hand, to use a table all 'default' values have to be included. Thus,
at the end around 150K must be transferred to the client.

Is this much traffic? On-line games impossible? I do not have any data to
compare. That is the size of the all packages currently needed to transfer
the ruleset? Also, the ruleset has to be transferred only once at the start
of the game (or for longturn: start of the turn).

Furthermore, the ruleset data can be split into two parts:
* for_server: only needed in the server; not transferred but has to be saved
in a savegame
* for_game: recalculated each time; transferred to the client but not saved
(i.e. cost for advances, ...)
* nations are _not_ included in this ruleset! Only the names of the nations
available for this ruleset are saved. The data is send separately to the
client.


___

Reply to this item at:

  http://gna.org/patch/?1446

___
  Nachricht geschickt von/durch Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #1446] [Metaticket] Ruleset object

2010-04-19 Thread pepeto

Follow-up Comment #8, patch #1446 (project freeciv):

Is this much traffic? On-line games impossible? I do not have any data to
compare. That is the size of the all packages currently needed to transfer
the ruleset?

For information: I got the result of 136279 bytes received for the default
ruleset in trunk at revision 17383 with the following hack in
common/packets_gen.c:

[...]
void delta_stats_reset(void) {}

#include stdint.h
#include arpa/inet.h
void *get_packet_from_connection_helper(struct connection *pc,
enum packet_type type)
{
  const char *name = packet_name(type);

  if (name  type != PACKET_RULESET_CHOICES  strcasestr(name, RULESET))
{
static size_t total = 0;
uint16_t x;

memcpy(x, pc-buffer-data, 2);
total += ntohs(x);
log_normal(Receiving %s (%d bytes, %lu total), name, ntohs(x), total);
  }

  switch (type) {

  case PACKET_PROCESSING_STARTED:
[...]


Can you make in your side a estimation of the size of the packet you
request?

I attached also the whole output. Note that the nation packets are very
numerous and big!

 Also, the ruleset has to be transferred only once at the start
 of the game (or for longturn: start of the turn).

It is a very old behaviour of Freeciv version  2.1. Now, the rulesets are
sent every time a connection is established, notably for selecting your race
at pre-game state. And if someone lose connection, it needs to receive again
all the datas, which can make the game very laggy sometimes.


(file #9017)
___

Additional Item Attachment:

File name: RULESET_receive_stats  Size:88 KB


___

Reply to this item at:

  http://gna.org/patch/?1446

___
  Message posté via/par Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #1446] [Metaticket] Ruleset object

2010-04-19 Thread pepeto

Follow-up Comment #9, patch #1446 (project freeciv):

New test for PACKET_RULESET_NATION stats (still default ruleset in trunk at
revision 17383): those packets represents 79570 bytes, so more than the half
of the whole stuff (only 56709 byes for the rest of the ruleset)...

It's quite a waste because a game cannot use more than 32 of them. 
Maybe should we think about a solution where nations are not a part of the
rulesets. Then, we could probably economize sending the rulesets when a
connection is established. And maybe the client should send its own nation
(maybe including the flag)? Then only used nation would be sent through the
network?


___

Reply to this item at:

  http://gna.org/patch/?1446

___
  Message posté via/par Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #1446] [Metaticket] Ruleset object

2010-04-19 Thread pepeto

Follow-up Comment #10, patch #1446 (project freeciv):

 Can you make in your side a estimation of the size of the packet
 you request?

I did it, results without compression are :

2: Ruleset file techs: 11818 bytes, 11818 in total
2: Ruleset file buildings: 33567 bytes, 45385 in total
2: Ruleset file governments: 2975 bytes, 48360 in total
2: Ruleset file units: 37456 bytes, 85816 in total
2: Ruleset file terrain: 14169 bytes, 99985 in total
2: Ruleset file cities: 2376 bytes, 102361 in total
2: Ruleset file nations: 315898 bytes, 418259 in total
2: Ruleset file effects: 33719 bytes, 451978 in total
2: Ruleset file game: 1475 bytes, 453453 in total

Very big!

With gzip compression (level 6):

2: Ruleset file techs: 2460 bytes, 2460 in total
2: Ruleset file buildings: 6793 bytes, 9253 in total
2: Ruleset file governments: 1160 bytes, 10413 in total
2: Ruleset file units: 8432 bytes, 18845 in total
2: Ruleset file terrain: 2875 bytes, 21720 in total
2: Ruleset file cities: 564 bytes, 22284 in total
2: Ruleset file nations: 109546 bytes, 131830 in total
2: Ruleset file effects: 4306 bytes, 136136 in total
2: Ruleset file game: 683 bytes, 136819 in total

It seems similar to send via binary packets then.

Removing the nation file:
* Without compression: 137555 bytes.
* With compression: 27273 bytes!

However, if I remember correctly the datas in the packets are compressed in
common/packet.c? So it's not sure the compressed statistics are really
usable...


(file #9018)
___

Additional Item Attachment:

File name: RULESET_file_stats.diffSize:2 KB


___

Reply to this item at:

  http://gna.org/patch/?1446

___
  Message posté via/par Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #1446] [Metaticket] Ruleset object

2010-04-19 Thread pepeto

Follow-up Comment #11, patch #1446 (project freeciv):

[1] I changed my mind, this looks an excellent idea after some checking.


___

Reply to this item at:

  http://gna.org/patch/?1446

___
  Message posté via/par Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #1446] [Metaticket] Ruleset object

2010-04-19 Thread Matthias Pfafferodt

Follow-up Comment #12, patch #1446 (project freeciv):

 Can you make in your side a estimation of the size of the packet you
request? 

I will try to setup the ruleset object and the corresponding  secfile.

 Removing the nation file: 

I think, that the nations should be separated from the rulesets. The rulesets
only need a list of nations which are valid within the scope of the ruleset
(or 'all').

I do plan to only include the nations of the players into the ruleset object
which is saved into the savefile. The client needs only (?) the definition
for the nation of the player.


___

Reply to this item at:

  http://gna.org/patch/?1446

___
  Nachricht geschickt von/durch Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #1446] [Metaticket] Ruleset object

2010-04-19 Thread Matthias Pfafferodt

Follow-up Comment #13, patch #1446 (project freeciv):

 I did it, results without compression are : 

I tried to test this using patch file #9018 but it seems to be missing some
parts and contains most of patch #1642

___

Reply to this item at:

  http://gna.org/patch/?1446

___
  Nachricht geschickt von/durch Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #1446] [Metaticket] Ruleset object

2010-04-19 Thread pepeto

Follow-up Comment #14, patch #1446 (project freeciv):

file #9018 is just a test patch, it's not for commit, it is not good at
all... And yes, I made patch #1642 from a part of this test patch...


___

Reply to this item at:

  http://gna.org/patch/?1446

___
  Message posté via/par Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #1446] [Metaticket] Ruleset object

2010-04-18 Thread Matthias Pfafferodt

Follow-up Comment #5, patch #1446 (project freeciv):

Another idea:

use a ruleset file (see point 4 of comment 1) as 'packet' to transport all
information to the client. This could be done as follows:

* read the current rulesetdir into a ruleset object
* verify the ruleset
* transform it to a secfile (struct section_file)
* use a new function char *secfile_as_string() to get a representation of the
data as one string [1]
* transfer this string (compressed; perhaps more than one packet) to the
client(s)
* verify the ruleset
* restore the ruleset [2]

Part [1]/[2] can also be used to save/load the ruleset from a savegame.
Perhaps all rulesetdirs should be converted into a ./data/*.ruleset file
(*one* file with the entire ruleset!) at compilation time, i.e only this
files have to be loaded. For ruleset developers the rulesetdir command would
still allow to load a ruleset directory but a (new) freeciv-convert tool can
be used to transform rulesetdirs into a ruleset file.


___

Reply to this item at:

  http://gna.org/patch/?1446

___
  Nachricht geschickt von/durch Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #1446] [Metaticket] Ruleset object

2010-04-18 Thread pepeto

Follow-up Comment #6, patch #1446 (project freeciv):

[1] Do we need the client parse the ruleset file? I guess it would make a
very big network traffic when someone will connect. It would probably make
on-line games impossible, what do you think?


___

Reply to this item at:

  http://gna.org/patch/?1446

___
  Message posté via/par Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #1446] [Metaticket] Ruleset object

2010-04-10 Thread Matthias Pfafferodt

Follow-up Comment #4, patch #1446 (project freeciv):

 1  2) I have already thought about a such solution for numerous structures
of Freeciv. However, this is quite problematic. Most ruleset types for example
need a translation support that need a gettext() pointer, which cannot be used
in a packet structure.

What do you mean with gettext point? The for translation marked texts in the
ruleset files? Internally the untranslated texts are used and they are
translated before they are displayed, or?

___

Reply to this item at:

  http://gna.org/patch/?1446

___
  Nachricht geschickt von/durch Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #1446] [Metaticket] Ruleset object

2010-04-06 Thread Matthias Pfafferodt

Follow-up Comment #1, patch #1446 (project freeciv):

some ideas about the ruleset rework:

1) at the moment all ruleset data used in the ruleset files is saved in the
packet_ruleset_*  structs; so use them for a ruleset object:


struct ruleset {
  struct packet_ruleset_game game;
  ...
  /* speclist of struct packet_ruleset_specialist */
  struct packet_ruleset_specialist_list specialists;
  ...
}


2) simplify the transfer of the ruleset; the available structs can be used;
use the new ruleset struct everythere (if possible)

3) split the current ruleset file in two parts (and use code from the ruleset
check on client side):
   * load the data into the new ruleset object (loading the ruleset)
   * verify the data (loading the ruleset _and_ verifying the transferred
ruleset on client side)

4) write a simple function which transforms the ruleset struct into a
secfile; perhaps this could be done in generate_packets.py (save/write)? Only
the packet_ruleset_* objects and the enums / values for the bv_* variables has
to be saved

This way the ruleset directory can easily transformed into one (not easy to
read?) ruleset file and the ruleset can also be saved in the savegame file.

With regard to the nations save only the names and load only the nations
which are available and on the list.

What do you think about this?

___

Reply to this item at:

  http://gna.org/patch/?1446

___
  Nachricht geschickt von/durch Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #1446] [Metaticket] Ruleset object

2010-04-06 Thread pepeto

Follow-up Comment #2, patch #1446 (project freeciv):

1  2) I have already thought about a such solution for numerous structures
of Freeciv. However, this is quite problematic. Most ruleset types for
example need a translation support that need a gettext() pointer, which
cannot be used in a packet structure.

The delta code actually has some disadvantages that could be solved with lot
of works. Actually, it doesn't send the packet structure through the network.
It checks all values computed in it and send field per field and ignores
changed fields. So, probably the packet structure could be avoided for
sending. We could use accessors instead (like inline functions to read a
field of a structure).

In receiving side, it is quite worse. For example, a client receiving a
packet_city_info that only 1 field changed and was actually received, checks
for all fields to make updates (in client/packhand.c). This make the client
quite slow, especially with unit moves. A similar solution could be done,
dropping the packet concept. common/packets_gen.c could call a function for
each changed field that would probably save lot of time.

This is of course not a part of this item, unfortunately...


___

Reply to this item at:

  http://gna.org/patch/?1446

___
  Message posté via/par Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #1446] [Metaticket] Ruleset object

2010-02-07 Thread pepeto

Update of patch #1446 (project freeciv):

  Depends on: = bugs #13873


___

Reply to this item at:

  http://gna.org/patch/?1446

___
  Message posté via/par Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #1446] [Metaticket] Ruleset object

2010-02-06 Thread pepeto

URL:
  http://gna.org/patch/?1446

 Summary: [Metaticket] Ruleset object
 Project: Freeciv
Submitted by: pepeto
Submitted on: samedi 06.02.2010 à 13:22
Category: general
Priority: 1 - Later
  Status: None
 Privacy: Public
 Assigned to: None
Originator Email: 
 Open/Closed: Open
 Discussion Lock: Any
 Planned Release: 2.3.0

___

Details:






___

Reply to this item at:

  http://gna.org/patch/?1446

___
  Message posté via/par Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #1446] [Metaticket] Ruleset object

2010-02-06 Thread pepeto

Update of patch #1446 (project freeciv):

Category: general = rulesets   


___

Reply to this item at:

  http://gna.org/patch/?1446

___
  Message posté via/par Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #1446] [Metaticket] Ruleset object

2010-02-06 Thread pepeto

Update of patch #1446 (project freeciv):

  Depends on: = patch #1447


___

Reply to this item at:

  http://gna.org/patch/?1446

___
  Message posté via/par Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev