I think TorqueML is Broken in 1.4
by Jeff Osborn · in Torque Game Engine · 06/26/2006 (10:01 pm) · 6 replies
I had to revert from 1.4 to 1.3 for the following files:
guiMLTextEditCtrl.cc
guiMLTextEditCtrl.h
guiMLTextCtrl.cc
guiMLTextCtrl.h
Of course, I had to change some of the include paths, but it all compiled and ran after the changes. I saved copies of the 1.4 code for sentimental reasons.
Let me explain:
I'm creating a demo game (seeking funding) that has "kiosks" in them. If you walk up to one (in a trigger zone) and press F2, you get a gui to pop up, that lets you navigate around for news, advertisements, personals, maps, etc. I basically swiped the script code that managed hfl files (help) and created the same thing for "kfl" files for the kiosk. I didn't want to interfere with the help system (or let it interfere with my kiosks) so I used different extensions to get the list of files to let the user paw through.
As you can imagine, a kiosk will have a little (and I do mean LITTLE) more rich content than help, including images that can be of respectable size. Under 1.3 it all worked fine (not as cool as HTML, but it was good enough for the demo).
Under 1.4 the text worked fine, but all the pictures were cached wrong-- since my kiosk has multiple pages (selectable from the left-hand panel, like the help), it seems the first that the user chooses, it's images turn out ok, but every page selected after that has the same images-- in different order. It's like the image list never gets flushed on a page switch and new images are only loaded if there are more on the second page than the first.
I think the reason no one had this problem is that most people use TorqueML for help and since the only example is the separator bitmap (which is the same on every page) the problem never shows up.
Now, none of the script changed, neither did the kfl files, so I dove into the engine using WinMerge and 1.4 was significantly different from 1.3. Buffer allocation under 1.3 looked a lot more straight forward than 1.4. I supposed I could have debugged the problem, but I figured I had something that worked (and had the same script interface), so why suffer?
I guess something in the ML needed to be "fixed" in 1.4-- maybe there was some feature that was missing in 1.3. Since there are no release notes on TorqueML for 1.4, I'm not sure why it was changed or what new feature the changes were supposed to provide, but whoever did it forgot the first rule of engineering (if Hippocrates will forgive me):
If it ain't broke, don't fix it (or "first, do no harm").
Well, it's broke now. Does anybody want me to try to fix it? Would anyone care to see my example files to see where 1.4 falls down? Does anybody care? Am I the lone voice in the wilderness who is trying to press the limits of TorqueML? Am I committing a great sin by not using the 1.4 version? If not, I've got my fix-- just wanted anybody who might be interested to know there was a problem.
guiMLTextEditCtrl.cc
guiMLTextEditCtrl.h
guiMLTextCtrl.cc
guiMLTextCtrl.h
Of course, I had to change some of the include paths, but it all compiled and ran after the changes. I saved copies of the 1.4 code for sentimental reasons.
Let me explain:
I'm creating a demo game (seeking funding) that has "kiosks" in them. If you walk up to one (in a trigger zone) and press F2, you get a gui to pop up, that lets you navigate around for news, advertisements, personals, maps, etc. I basically swiped the script code that managed hfl files (help) and created the same thing for "kfl" files for the kiosk. I didn't want to interfere with the help system (or let it interfere with my kiosks) so I used different extensions to get the list of files to let the user paw through.
As you can imagine, a kiosk will have a little (and I do mean LITTLE) more rich content than help, including images that can be of respectable size. Under 1.3 it all worked fine (not as cool as HTML, but it was good enough for the demo).
Under 1.4 the text worked fine, but all the pictures were cached wrong-- since my kiosk has multiple pages (selectable from the left-hand panel, like the help), it seems the first that the user chooses, it's images turn out ok, but every page selected after that has the same images-- in different order. It's like the image list never gets flushed on a page switch and new images are only loaded if there are more on the second page than the first.
I think the reason no one had this problem is that most people use TorqueML for help and since the only example is the separator bitmap (which is the same on every page) the problem never shows up.
Now, none of the script changed, neither did the kfl files, so I dove into the engine using WinMerge and 1.4 was significantly different from 1.3. Buffer allocation under 1.3 looked a lot more straight forward than 1.4. I supposed I could have debugged the problem, but I figured I had something that worked (and had the same script interface), so why suffer?
I guess something in the ML needed to be "fixed" in 1.4-- maybe there was some feature that was missing in 1.3. Since there are no release notes on TorqueML for 1.4, I'm not sure why it was changed or what new feature the changes were supposed to provide, but whoever did it forgot the first rule of engineering (if Hippocrates will forgive me):
If it ain't broke, don't fix it (or "first, do no harm").
Well, it's broke now. Does anybody want me to try to fix it? Would anyone care to see my example files to see where 1.4 falls down? Does anybody care? Am I the lone voice in the wilderness who is trying to press the limits of TorqueML? Am I committing a great sin by not using the 1.4 version? If not, I've got my fix-- just wanted anybody who might be interested to know there was a problem.
#2
If you'll forgive me, this isn't at the top of my list, so it may take a couple of weeks. If I haven't had a chance to look into it and post something more by then, poke me with another message and I'll feel guilty and see what I can find out.
Thanks,
Jeff
07/02/2006 (4:30 pm)
Sure. I'll dig into it.If you'll forgive me, this isn't at the top of my list, so it may take a couple of weeks. If I haven't had a chance to look into it and post something more by then, poke me with another message and I'll feel guilty and see what I can find out.
Thanks,
Jeff
#3
07/02/2006 (6:13 pm)
I'd also like to know what you did to fix it. I haven't gotten as far as adding much MLtext yet, but I will be needing that functionality to be stable when I do =)
#4
I COULD just post the #include differences and I will if you need them. Large amounts of text did not appear to be a problem, just large numbers of images or different images on each "page".
07/02/2006 (8:28 pm)
It's pretty much what I described above-- I stole the 1.3 files listed in my first post and changed the #includes to reflect the new organization of the includes to match where the include files are now located in 1.4 and it compiled. You have to have a copy of the 1.3 TGE source, which you can get from GG's CVS by using the 1.3 TGE tag. I'd post it but I don't think that's legal. I COULD just post the #include differences and I will if you need them. Large amounts of text did not appear to be a problem, just large numbers of images or different images on each "page".
#5
12/17/2006 (2:48 am)
Just going through my list of bug fixes to get around to adding and wanted to know if this is fixed now?
#6
I didn't realize that anyone thought it was a bug, because the forums aren't really a trouble ticket/defect system, so I couldn't tell if this had become anyone's priority to fix. Heck, I'm not sure anyone else thought it was a bug...
12/17/2006 (3:33 pm)
I'll have to get 1.5 and check it out. I've been on vacation and have a lot of consulting work to do, so I might not be able to get to it right away. I didn't realize that anyone thought it was a bug, because the forums aren't really a trouble ticket/defect system, so I couldn't tell if this had become anyone's priority to fix. Heck, I'm not sure anyone else thought it was a bug...
Torque Owner Desmond Fletcher
fletcher
Absolutely would like to know what the problem is and how to fix.