Shendemiar
Morkin Admin
Mmmm, free goo!
Posts: 6,751
|
Post by Shendemiar on Jul 13, 2006 20:01:25 GMT
When i last coded pacification, i got carried away with classes abd one other peculiar thing im proud of.
Making the game database based is a good thing, but all the tables hosding data makes it hard to maintain and upgrade. I wanted complete freedom of adding different scenarios and optional ruleset, maps, different unit-set and so on. So i decided that every games one player data is stored as a one multidimensional array, and also zipped. It all went rather fine but debugging got few grades more difficult. I coded nice arrayviewer for that data. Starting to code the rules was pretty much where i got, before i started coding online simultaneous simulated battle engine where you could resolve the battles online one-one-one. That too went rather well.
I dont actually know why it ended... i guess it because the summer 2005 since i allways spend my summers doing other stuff.
Why havent i continued? Two babies and a new house urging repairs... And the game has so many loos ends its hard to catch up, even as the code is rather clean at least for my code.
Someone say something couraging...
.
|
|
Harlequin
Morkin Member
Hey nonny nonny!
Posts: 1,515
|
Post by Harlequin on Jul 13, 2006 20:03:03 GMT
I bet your house looks lovely.
|
|
inyati
Morkin Admin
Aqua profunda est quieta
Posts: 4,310
|
Post by inyati on Jul 13, 2006 20:05:29 GMT
I like your shirt
|
|
Perun
Public Area Guest
Issa (Vis) [1:76:24]
Posts: 2,506
|
Post by Perun on Jul 13, 2006 20:50:48 GMT
You're a beautiful man. ;D
|
|
soiram
Morkin Member
Morkin Godfather
Posts: 1,125
|
Post by soiram on Jul 13, 2006 21:11:57 GMT
You 're going to translate Ringy's book in Finnish!
|
|
SkulkrinBait
Morkin Admin
Haxx0rs == Suxx0rs! v4
Posts: 6,680
|
Post by SkulkrinBait on Jul 13, 2006 21:18:23 GMT
I know how you feel, it's quite soul destroying sometimes when you slog your guts out and your so called "friends" come out with smart-Culo! comments. Is your forum still up? Put a link to that and I'll come and pester you over there, I liked the look of the map you'd got at the very least and if your game can do WWII then I'm loving it already
|
|
Shendemiar
Morkin Admin
Mmmm, free goo!
Posts: 6,751
|
Post by Shendemiar on Jul 13, 2006 22:02:22 GMT
|
|
Arminius
Morkin Admin
Ich bin Bl?cher
Posts: 4,148
|
Post by Arminius on Jul 13, 2006 22:41:29 GMT
Why not treat the data as a tree? You can then serialise it in XML, and use XPATH expressions to retrieve data... Each player with their own XML file. I started my PhD about 9 years ago. Three kids and one book later I have just about finished writing it. Originally it was due after 6 years (part-time). So what's another year? Did I mention all the other projects I started and abandoned in the mean-time? No time! (to mention them all ). So no worries, you're still young!
|
|
Shendemiar
Morkin Admin
Mmmm, free goo!
Posts: 6,751
|
Post by Shendemiar on Jul 13, 2006 23:04:47 GMT
Point me to a XPATH expressions help page. Can i use them with PHP ?
|
|
Shendemiar
Morkin Admin
Mmmm, free goo!
Posts: 6,751
|
Post by Shendemiar on Jul 13, 2006 23:35:45 GMT
I dont see why xhtml would be preferable to an array?
Player 1 general name=roope eyes=blue army 1st brigade=800 men 2nd brigade=200men
is far less characters...
I kinda feel all this xml is just a standard for standards sake
|
|
Shendemiar
Morkin Admin
Mmmm, free goo!
Posts: 6,751
|
Post by Shendemiar on Jul 14, 2006 0:54:11 GMT
But i see why xpath might ease my life...
Seems like there are xpath classes for php, i wonder how "good" they are
|
|
Shendemiar
Morkin Admin
Mmmm, free goo!
Posts: 6,751
|
Post by Shendemiar on Jul 14, 2006 0:58:40 GMT
The tutorial i read was just about selecting stuff from xml. What do i need to be able to update, add and delete stuff from xml?
|
|
Shendemiar
Morkin Admin
Mmmm, free goo!
Posts: 6,751
|
Post by Shendemiar on Jul 14, 2006 1:06:27 GMT
Nah, its no good for crating or editing data... using other than well polished tools of php to alter data is sheer madness. Each nations complete data-dump will be a feature, and that could be formatted as xml.
Thou i must say that multidimensional arrays that hold information about whole nations state, would be easier to mind, if they were in xml...
|
|
SkulkrinBait
Morkin Admin
Haxx0rs == Suxx0rs! v4
Posts: 6,680
|
Post by SkulkrinBait on Jul 14, 2006 6:36:12 GMT
I also considered XML but never really got round to doing anything with it, would be interested if anyone else has used it much.
|
|
Arminius
Morkin Admin
Ich bin Bl?cher
Posts: 4,148
|
Post by Arminius on Jul 14, 2006 9:56:19 GMT
The point about XML would be that, because it's a standard, there are loads of tools. The tree would simply be like a DOM, which can be saved and retrieved from an XML file, so that in-memory you don't actually deal with XML. It was simply a theoretical suggestion; I've done very little with XPATH, but found it useful for what I was doing. It might be conceptually easier than juggling with multi-dimensional arrays.
|
|