Programming and other useless stuff: September 2008

Tuesday, September 30, 2008

I know, I know... being busy is really no excuse for not writing my blog... although...

Many things have happened since my last blog entry :) Here's the list:

1. I spent the entire thursday evening on trying to install debian on my NSLU2... and I failed. I mainly had two problems:

The first one was that the debian installer didn't correctly get the DNS even though I had set up the network card to be dhcp. So, whenever I selected a mirror in the ftp list, it wouldn't accept it because the installer could not contact it. At least that's what I think. But what is strange is that when I selected the critical setup in the def menu, it would contact the ftp ?!?

The second one was that I had to fetch the SCSI package for the installer to be able to recognize my HD plugged into the USB port. But it recognized my HD only in 20% of time...

At midnight, after almost 10 hours trying, I decided to scrap it and to use uNSLUng instead. Half an hour later, I had finished. Everything ran as expected and fine.

On friday I installed TwonkyVision, a nice multi media server. It fit's without problems onto my NSLU2 and the PS3 recognized the server immediately. I still had to set PS3 explicitly in Twonky but hey... it works:) Now I have access to my music, my photos and my home made video clips on my PS3.

I still have to find the right video format because some seem to cause trouble to the PS3. VOB sometimes reports only 20 minutes of video but play the hour of video fine. On some avi encodings it doesn't recognize the video size correctly and on others it says it's unsupported.


2. On saturday we've met some friends and had a nice dinner. We didn't see the time pass and came back home quite late.

3. On sunday I continued putting my stuff into boxes (I'll redo my office) and we had a nice afternoon walk with the kids in the forest.

4. Yesterday I had a really stressful day. Coding from 8:00 am 'til 11:30 pm. For one of my contracts I'm working on a LaTex formula renderer which is able to render a formula or a formula group identified by an ID or name. It's also possible to pass a parameter container which will contain values that will replace variables within the formula...

Imagine you have the formula "A=B*C" (to make it simple). You deliver a parameter container which contains "B" is equal to "1.23". The rendered formula will then be "A=1.23*C".

So after working out the interfaces and starting their implementation last week, I wanted to finish it to show it to my customer. So I spent my time yesterday putting in some final things such as formula loading from an XML, access functions, container construction, etc. Some 90% of the code have been programmed yesterday. The result is a powerful interface which can handle nested formulas etc.

The customer was really happy because the initial plan had set the variable by value replacement to a point *after* an exposition he has to attend in a couple of weeks. Now he's able to show off more than he expected :)

Well... gonna go back to work, documenting and cleaning up some code, putting stuff into boxes...

Have fun,
Stefan

PS: Sorry... but I cannot show code of the interface due to NDA...

Thursday, September 25, 2008

Got it...

Ok... got my TV on tuesday. Installation was quite quick and hooking up my freshly aquired PS3 worked without problems. I then tried to put the PS3 into the network and had to search the Inet to find how to do it... finally, I rebootet my router and the problems I had went away. Spent more than 2h on that.

I bought "Ratatouille" as BRDisc and "Fifa08" and "Uncharted" as games. Haven't played "Uncharted" yet because "Fifa08" kept me busy :)

Overall I'm really happy with my TV setup. I tried hooking up a network drive via USB to my PS3 and that worked too (after I found out how to set up the folders). Unfortunately, the network HDs I have cannot be accessed by network and USB in the same time. And it doesn't switch unless you turn of the HD and turn it back on.

So I took a look into how to set up a media station and decided to give a try to the NSLU2 from Linksys. Normally, you should be able to flash it with a Linux distribution and install further software on that device. But my first attempt on that didn't work out: a) it didn't let me select a mirror server within the debian installer (it always jumped from the ftp server select screen into the proxy server screen and *without* me doing anything instantly jumped back into the ftp server select screen. I talked to a friend who already set up 2 of those devices in that way and even he told me that this is strange.

So, I just flashed it back to the old firmware and I'll give it a second try later this day...

Have fun,
Stefan

Monday, September 22, 2008

A lot of work...

A lot of work :) That's what I have. And unfortunately, this is also the reason why I'm not updating very much my blog :(

1. Server migrating has been done for almost everything. Only 1 domain is still remaining and I have to wait "for the right moment" :) In fact, my wife has to fetch her emails and then I have to switch. And since currently we rarely are on our computers in the same time, this hasn't been done yet.

2. SSCXML: I've been looking into enhancing further SSCXML and make it a little bit more SCXML compliant. The draft that has been released earlier this year describes a more modular behaviour of the standard. Also, I interpreted the draft a little bit less restricting (which result in *not* freezing in some scxml constellations as would the draft-sticking implementation do).

3. Prohibition: Didn't have much time to work on this. I'm still working on some basic things. I also reviewed Navi, which I would like to use for the game (since it allows the usage of html files as gui files)... what turns me down most is the huge amount of data needed to use it... >30mb :(

4. Jobs: Here's most work for me. I finally got (almost) all information I needed to work and to define how the stuff is going to be implemented for one of my clients. It's also for that client that I'll use mimetex, a tex to gif lib. The currently used font sizes result in rather small printed images (even in HUGE). So, I spent the day today to learn about metafont, gf-files, etc. I'm no LaTex expert so I struggled a lot understanding why this implementation (mimetex) can't use TTF straight forward. Well...

5. Tomorrow (tuesday) I'll get my new TV: A Samsung LE40A557. Currently they seem to have a special price here in Belgium. Well... it's still 890 Euros but it's ok :) I paid almost 1000 Euros for a normal TV 5 years ago.

My wife decided to buy me the TV as a birthday present :) (birthday = 9/24). And I'll certainly buy myself a PS3 with a BR-Disc or two and a game or two. We'll see... My intend is to stick a network drive to one of the USB ports and upload some media to be played by the PS3.

6. This week-end I cleaned up most of our cellars. I need space for my stuff once I start renovating my office. I finished the plans for it... Will take some time to actually start with it.

Have fun,
Stefan

Wednesday, September 17, 2008

Reading sources and modeling...

Well... today I spent most of my day reading through one of my clients printer sources. The software itself calculates wall thicknesses for ie. cylindrical shells using some complicated formulas. Target is to integrate the formulas in the printing...

In my spare time I've modeled my office :) Now, I'm no graphic artist, so... I'm modeling my office because I want to renovate it.






Have fun,
Stefan

Tuesday, September 16, 2008

I'ld like to thank TheFlyingDutchman, ukdm and benryves for checking my websites and pinging them. I spent another half day yesterday searching for the source of the problem and... I finally found it.

For the history: Until now I've been on a shared host with all my sites. Since I had some serious problems using any script which wanted to use more than 8mb of memory, and because in a far, far future, I might be tempted to install a server software of my prohibition project on a server, I decided to go for a virtual private server.

When registering for the VPS, the provider asked (in an online form) about the nameserver names to use, which I provided. After the setup of the server, the provider told me about the IPs and all other information including the nameserver names I initially gave. I logged into the server container software (Parallels) and saw that the nameservers where mentioned there.

So, I started switching my stuff to the new server. Sidema.be which is my company domain switched with no glitches. I entered the nameserver at godaddy as being hosts of sidema.be and entered the names into the NS field of my sidema domain...

I did this with two of my other domains... which made all the problems I described in my previous journal entry: Some could reach them, others couldn't... I definitely could not.

After the tests of TheFlyingDutchman, ukdm and benryves I had a talk with a friend of mine who pointed me to the problem that the nameservers themself did not show up as expected. He used a tool called "dig".

So I "digged" up (HA! Nice joke) "dig" for Windows and played around with it. And we finally found the solution: In fact, the hosts had not been created on the VPS. Although they were mentioned by Parallels, the domain "sidema.be" didn't have the nameserver entries. After adding two entries to the DNS management and waiting some minutes, everything went fine.

Lesson learned: Always add two "A" lines to your DNS management for the nameservers.

Tools used: Dig

Thanks for helping,
Stefan

Labels: ,

Saturday, September 13, 2008

Quick update...

before leaving for the weekend.

I didn't do any updates last week and I'm absolutely p**** about myself. I had no valid reason but a little down. On the other hand I'm struggling with setting up my sites on the new virtual server I have lent.

In fact, I have setup two sites, set their nameservers and waited for the nameservers to be distributed. Now strange things happen:

a) I can check my sites via dnscheck.net and they are reported reachable and all ok.
b) From my home (in Belgium) I cannot reach the sites. Even worse, they don't show up when I ping them meaning that the DNS doesn't solve to IP here in Belgium.
c) I have some friends in Germany who can reach the sites and some others who can't.

I reset the nameservers, tested again and a+b+c from above still occur.

If anyone has a hint what I can do or which checks I can make to see why I cannot access them from Belgium, it would be great if you post a comment.

Also, please try to ping/visit www.prohibition-online.com and www.game-developer.biz and make a small comment about whether you can reach the site or not. (There is no real content there since I cannot reach them to put stuff on them).

Thanks for your help,
Stefan

Labels: , , ,

Sunday, September 07, 2008

Components enhancement

While thinking about the modifiers, I stumbled upon a problem that might not spring into mind when figuring out a game system. I wondered, how I would handle components that should be removed or deactivated? What should happen, when the game is paused?

Imagine a character has attached a buff which gives him ie. +5 Health every 10 seconds. When you pause the game, you might still want to update any graphic animations (ie. idle animation) but you certainly don't want any buff continue it's work. So you might have to put the buff into "pause mode", you'll have to deactivate the buff.

I played around with the components and modifiers (which are components, too) in my mind and finally decided that it was a good idea to have a ComponentContainer. This container would hold any type of component, and could hold a set of flags which ie. activate a component, tell the container, that the component should be removed (ie. during next update) or that the component should not get an update.

I then decided to derive my Component class from the ComponentContainer. The benifit of this is that I automagically have the possibility to attach ie. a modifier to a modifier (remember the timer example from yesterdays blog entry?).

Currently I have 3 flags: IS_ACTIVE, DO_UPDATE and DO_REMOVE.

DO_REMOVE flags a component to be removed during ie. the next update of the parent component (well... in fact, the one that holds the component container should decide when unused components should be removed. A character class ie. would remove them in every game turn, while a component would remove them in the next update.).

IS_ACTIVE and DO_UPDATE mostly come in pair. Only active components can receive updates. You can see that removing the DO_UPDATE flag from component would make them "pause" until you set the flag active again. Disable IS_ACTIVE is useful when ie. the player wants to push things around from the inventory to the character and vice versa. A grapped item (attached to the mouse) would be set inactive (while remaining on the character in a greyed out manner) and thus have no more effect on ie. the characters values (if there was a value modifier attached to the item).

That's my current state of the components. I'm thinking of how to handle those flag changes with small effort and the more I think of this, the more I'm convinced that my SSCXML has found a new place to be :)

Have fun,
Stefan

PS: It's quite possible that I'll have no blog updates in the next two days since I have to travel to some clients on monday and tuesday.

Labels: , , , ,

Saturday, September 06, 2008

Nothing special... modifiers...

Nothing really special happened today. I spent most time doing some work at my home, cooking and doing some shopping.

Programming side, I did nothing. In fact, I only touched my computer to take a look at my emails.

Nevertheless I've been thinking about the modifiers in my game. Modifiers can be be applied to character values, item values or anything that can be altered through access functions. An item that gives a "Strength+5" buff, would have an modifier attached to itself, which will be applied to the entity to which the item is attached (equipped). The modifier specifies the "Strength" as a target for a "+5" modification.

Now, since I want to have modifiers that can ie. alter a valid only for a certain amount of time, the idea is that modifiers are set up of components. A modifier that alters a value for the next 5 minutes, would have a timer component which can trigger an event to the modifier ("remove yourself"). In the same logic, a timer component could send an event to apply a +1 to health every 10 seconds. Combining with the first mentioned timer component, this would lead to a modifier which gives a +1 to the health every 10 seconds for the next 5 minutes.

I'm still working out the details, but this can go very far. Timer component could ie. trigger events to create gfx effects...

I'll write more about this as soon as I know more myself :)

Have fun,
Stefan

Friday, September 05, 2008

Migrating domains and SSCXML

Well... I'm currently in the middle of migrating all my domains from a shared hoster to a VSP. In fact, my hoster restricted a lot of things which were fine before. IE. the memory usage of processes is very low. So low, that even tools like image galleries that have been installed through fantastico will not be able to add a simple image.

That and some other considerations led me to search for a VPS. I came across a lot of sites and finally I found a VPS plan that was ok for me: not too expensive while still having enough features for my current needs. I took the lowest plan offered by Geekstorage. I talked with one of my friends who's already set up some VPS and has a lot of experience with Linux. So I spent most of my time today learning about VPS and Linux, httpd setup and all those things.

I must say that I'm happy with the choice I made although I pay like 10 times what I paid before. The support guys of geekstorage replied quickly (max. 2h although I posted my tickets in the middle of the day... in Europe). Not that I had any problem... just questions about setups and how to do things. I'll tell you more once I have more experience with these guys :)

I worked on a new release of SSCXML yesterday. Added some keywords to replace the & and > and < signs. Using those straightforward in condition strings within XML is no valid XML. You'ld have to write "& a m p ;" for an & (Sorry... had to put spaces between letters). So I added keywords which can be used by the users to replace things like &&, <= or >= (keywords are "and", "le" and "ge"). A "(a<5)&&(b>10)" would become "(a lt 5) and (b gt 10)". As readable and easy to retain as C/C++ code :)

So, SSCXML is V1.04 now...

Have fun,
Stefan

Labels: , , , ,

Thursday, September 04, 2008

Still searching...

for the ideal setup but I think I have found something that comes close to it. I'm talking about my new TV and the PS3... at least, what I would like to buy... if my wife would be ok with it :)

Ukdm (from gamedev.net) suggested to take a look at the Samsung screens. So I did and I would like to thank him for this. And for pointing to the avforums. In fact, I learned that some Philips TVs (the constructor I wanted to pick initially) had problems displaying the PS3 signal through HDMI. There seems to be a "lag" between the user input and the screen display, something that isn't reported for ie. the Samsung screens. I learned a lot about screens on that forum :) 

So I spent most time of yesterday morning reading the forum, picking out 3-4 screens I wanted to look at at my local TV store. After some hesitation, I finally decided to pick the Samsung LE40A552. It's slightly smaller (2 inches) than the Philips TV I wanted to take initially, but I compared the displays and I felt more comfortable with the Samsung one. And so did my wife. But...  

While my wife was ok with picking the TV, she was less fine with picking a PS3 in the same time :( I feared something like this. As she felt that I was quite upset (I left the store without buying anything; yes, I can be stubborn), and after some arguing why I want to have a PS3, she said that she would buy me the TV as a birthday present and that I could buy the PS3 myself... Stubborn as I am, I said that this didn't interest me (well, I want to change TV, not her, so I want to pay it all myself), but she said: "You have to come because if I go myself a) I might damage the TV while transporting it myself and b) I might get the wrong one." Never argue with your wife...  

Well... finally all this gave me a real bad head-ache and I went to bed early (like 9 pm); that's why there was no blog update yesterday.  

Have fun, Stefan

Tuesday, September 02, 2008

New TV or no new TV, that's the question!

It's been some time since I'm looking into buying a flat screen TV. Not one of those which are called "HD ready" and which at most have 768 pixels in height. I'ld like to have one of those 1080 pixel screens. The one I liked most is the Philips 42PFL5603. It's a 42 inch full HD screen with 4 HDMI connections, PC entry, scart and some other stuff. The current price here in Belgium is ~1000€ ($1.466). It might be a bit cheaper in Germany, but I like to keep the stores where I buy expensive stuff nearby :)

I still haven't bought it but I'm getting close to it. So, does anyone have good experience with this TV or a similar model? Please comment :)

Also, I would like to buy a PS3. Not only because it seems to be a good console but also because it's a "cheap" blue ray player. Most other player cost the same or more but only can play BRD. At least, the PS3 has games one can buy. And those got slightly cheaper. You can find them for rather 30€ ($44).

Has anyone some advice about "must have" games on the PS3? Please comment :)

Today I worked for my client in the music business. As I already said, sometimes it's just good to see that your planning and programming make life easier :) Yesterday we were talking about some new stuff I would have to implement. Our initial planning was 2 weeks of work. Today, I sat down, took a look at what we already have, started programming and finished everything :) Well... at least, it looks finished... My client will have a look at it tomorrow morning. I'm almost sure that we'll have to catch some special cases or some other mysteries of the music business :)

Have fun (and don't forget to comment),
Stefan

Monday, September 01, 2008

Return to work...

Today I visited one of my clients to talk about the next programming stuff to do for him. Nothing really spectacular. But this is the next stepstone in the business application we're creating. It's always good to make step forward and see that things work out well as expected and planned.

This evening I spent some time working on SSCXML. I had a user remarking that any expression using & or > or <>= or <= is no valid XML code. Instead when using a normal notepad, one has to put in "& a m p;" (please read it condensed) to express valid xml code.

Now this would be tedious to edit and the user suggested not to stick to C/C++ coding style here and use statements such as "and", "or", "lt", "gt", "le", "ge" and "eq". I added this to SSCXML tonight and my first tests ran fine. Now, I still have to trigger this a little bit since my current check is not independent of the cap. "and" will be recognized, "AND" or "And" will not... so I want to sort this problem out first before working on any additional stuff.

Talking about additional stuff for SSCXML: I'm thinking of enhancing the engine a little bit by allowing delegators or registering of class functions for executable functions in the scxml code. I still have to think about this, but it will definitely go into SSCML.

Have fun,
Stefan

Labels: ,