Perun
Public Area Guest
Issa (Vis) [1:76:24]
Posts: 2,506
|
Post by Perun on Aug 13, 2006 21:41:52 GMT
|
|
Shendemiar
Morkin Admin
Mmmm, free goo!
Posts: 6,751
|
Post by Shendemiar on Aug 14, 2006 0:16:27 GMT
* Structure for executing orders.
|
|
Shendemiar
Morkin Admin
Mmmm, free goo!
Posts: 6,751
|
Post by Shendemiar on Aug 14, 2006 0:18:05 GMT
Database is not in such a role here. Playing your game only needs one hit to database each time you visit.
|
|
Perun
Public Area Guest
Issa (Vis) [1:76:24]
Posts: 2,506
|
Post by Perun on Aug 14, 2006 8:16:09 GMT
Database is not in such a role here. Playing your game only needs one hit to database each time you visit. One hit?!? Sounds like science-fiction to me. Are you sure?
|
|
SkulkrinBait
Morkin Admin
Haxx0rs == Suxx0rs! v4
Posts: 6,680
|
Post by SkulkrinBait on Aug 14, 2006 11:03:07 GMT
Database is not in such a role here. Playing your game only needs one hit to database each time you visit. One hit?!? Sounds like science-fiction to me. Are you sure? I suppose you could read all the data you need when logging in and then carry the data round in session vars or something and then write them all back when logging out. Would lead to problems though.
|
|
Shendemiar
Morkin Admin
Mmmm, free goo!
Posts: 6,751
|
Post by Shendemiar on Aug 14, 2006 13:00:50 GMT
And
There will be normal amount of hits needed for general browsing of the gamesile, like listing/joining/parting/creating games, viewing player profiles, forum etc.
But only hit for receiving the game status, and viewing and browsing your empire. Thats the biggest hit-generator, and i intend to manage with one. Issuing orders i likely end up creating with direct database-access, since its not that resource greedy, and if you happened to forget to click on "save your orders", it would be very frustrating and un-userfriendly.
It is as Skulk said, i receive the (maybe gamemap, but itll be quite large and) nationstate xml-strings into session file, and parse them from there as needed. This of course increases the size of the sessionfile, but i estimate average gamefile per nation would be several hundred kb's, and it can be hold zipped in session if needed. The map data, which format i havent decided, would end up beeing few megas if i uset string based array, but few hundred kb's if i use binary type, But that would involve temp files received from database... not sure, never worked with files with php.
...I guess zipped var_dump of an array will get sizewise rather close to optimized binary file.
|
|
Perun
Public Area Guest
Issa (Vis) [1:76:24]
Posts: 2,506
|
Post by Perun on Aug 14, 2006 13:37:18 GMT
Well, if/when you need some DB help/info, don't hesitate to ask. I'm no guru, but if I know something, I'm there to help.
|
|
Shendemiar
Morkin Admin
Mmmm, free goo!
Posts: 6,751
|
Post by Shendemiar on Aug 14, 2006 23:52:21 GMT
|
|
Shendemiar
Morkin Admin
Mmmm, free goo!
Posts: 6,751
|
Post by Shendemiar on Aug 14, 2006 23:56:04 GMT
That may not look much, but it actually is!
The execute orders script works very nice.
Also, my first actual use of xml works great!!!
The script receives all renaming orders for this game, and one by one, gets the nation data, generates required xpath to the renamed entity, executex xpath to find it, then renames it. (doesnt save yet, but its trivial!
It feels d**n fine, the XML stuff is not wery well documented, specially in php, but seems like a nice tool for thiskind of stuff.
(and the errors are because france just doesnt exist ;D ..yet)
|
|
Perun
Public Area Guest
Issa (Vis) [1:76:24]
Posts: 2,506
|
Post by Perun on Aug 15, 2006 0:25:41 GMT
And it works in Opera! ;D
|
|
Shendemiar
Morkin Admin
Mmmm, free goo!
Posts: 6,751
|
Post by Shendemiar on Aug 15, 2006 23:55:51 GMT
Buggers!
The old P site is a bit messed up, and i dont want to bother to fix it. I would have needed it to extract the worldmaps i made. Seems like i need to install Visual Basic to utilize the map-editor source-files i had (mainly convering and multiplying bmps to strings...)
|
|
Shendemiar
Morkin Admin
Mmmm, free goo!
Posts: 6,751
|
Post by Shendemiar on Aug 16, 2006 0:55:59 GMT
Oh its daunting task to create such maps...
|
|
Perun
Public Area Guest
Issa (Vis) [1:76:24]
Posts: 2,506
|
Post by Perun on Aug 16, 2006 15:03:14 GMT
Buggers! The old P site is a bit messed up, and i dont want to bother to fix it. I would have needed it to extract the worldmaps i made. Seems like i need to install Visual Basic to utilize the map-editor source-files i had (mainly convering and multiplying bmps to strings...) Youck!
|
|
Shendemiar
Morkin Admin
Mmmm, free goo!
Posts: 6,751
|
Post by Shendemiar on Aug 16, 2006 17:38:48 GMT
I guess i need to dig out my CIV III cd and install it. The game has huge sets of fan-made maps and utilities.
|
|
Shendemiar
Morkin Admin
Mmmm, free goo!
Posts: 6,751
|
Post by Shendemiar on Aug 16, 2006 20:52:06 GMT
Found one nice Civ3 map... full planet, 382x382
In one specific editor, i can make the map look nice, But in civ the grid is diagonal, so i need to convert: i take screenshots, and code a app that only checks the color of the mid-pixel of diagonal square. Of that data i can get a nice working dataset to base the map on.
(And Visual studio setup hang again, and process becames unkillable ;D )
So, i have something to do for tonight too...
|
|