As I get further and further along with the code on DPnP their inevitably comes a time when I have to hit a stopping point and go back to clean up the code. I doubt its a best practice sort of thing, but it is a necessary part of the whole learn as you go sort of thing. As development gets further and further along, and the program gets more and more complex, things start to slow down when running it. This is usually because I did something the long way and I may later learn a much easier (speaking in terms of computer resources that is) way to get things done. I make notes of things as I go, and then go trekking back to those areas and clean things up, streamline them, and in generally get things running in a smoother way. It becomes even more necessary as you start expanding on how things are going to work. For instance, character sheets are getting a bit of a tweak.
So here’s how it works: Character sheets are handled through a generated XML file for the character. This is then rendered in XHTML, like a web page. When you see the character sheets you see the actual web page that the code built. There are a lot of stages, and truth be told, the XML files for characters are big. Furthermore, there is a lot of stuff going into these sheets. For one, we have all the standard stuff. However, we also have a limitless amount of customized load outs. Also, you get expanded sheets for your skills and equipment. You can think of these as taking the actual entries of a skill or item from the book, apply your character’s stats, and there you go. Then you get character journals, and the development logs. In essence, a character sheet can get pretty big. REAL BIG. So I decided it would be cool to have an options setting for what you want in there. That way, you get only what you need. Some fast buttons might also work as well. However, things aren’t just that easy.
As I said, we are using a character’s XML file. Its a whopper for some characters because I include everything I possibly can in every way I can because I have no idea how things may be used in the future. I want all the options open to me or anyone else who wants to muck around with it. So, every time the character sheet updates, and it does this after every change, the XML file has to be recreated and re-rendered. This starts to take a few seconds after a bit. Its not much, but it is noticeable. After changing things in your character it might get annoying. I don’t think its that bad, but I notice it. So that means I want it to go away.
So this weekend I have been working on a slimmer XML file for characters which has only the specific stats as they are needed for the character. It should greatly reduce the overhead in this capacity and let me add in the options I want. You see, adding in options means adding in more checks. I don’t want people designing their own character sheets to have to deal with them so I handle them on the XML side. So adding in more checks for options means I have to make sure everything else is silky smooth on the other end.
Truth is, the whole process sucks. I hate it, it bores me, and I can’t wait for it to be over. I have been working on it all weekend and I am ready to just can the whole thing. It is that frustrating to work on. Its like arranging dominoes in numerical order. You have to watch out for the details but don’t forget to keep your eyes on the line of dominoes cause if you bump just one you have to build a big chunk of it again. Yes, it sucks that bad.
One fun thing is the redesigning of the character sheets. I went to make some custom ones the other day and just got tired of rebuilding it. What I had meant to do, but didn’t because I’m an idiot sometimes, is set up a plain printer friendly template in the first place. So I am working on that whenever the XML thing makes me want to use my head as a golf tee for a junior’s golfing lesson. I’m working with some better software for this now so it is generally a pleasure to rebuild it. Now I will have a clean template in which all I have to do is modify a CSS or something of the sort. In the end I should have a much easier time coming up with character sheets.
So that’s me this week/weekend. Not much fun but necessary to the overall development of what is shaping up to be a fantastic piece of RPG software.
Until next time, Happy Gaming!






