Jump to content

rlranft

Members
  • Posts

    309
  • Joined

  • Last visited

Posts posted by rlranft

  1. That's a good idea - another fellow was having a problem loading large numbers of objects in a single mission. He wasn't having memory or performance problems, his problem was that the simdictionary has (had?) a hard-coded limit to how many objects could have unique identifiers and it would reuse ids instead of refusing to load a new object. It was playing havoc with his scripts.

  2. For an example of "many or few" look at scripts/server/game.cs and scripts/server/gameDM.cs - gameDM.cs overrides game.cs for DeathmatchGame, and it only overrides part of the base set of scripts.


    As far as memory consumption - I can't imagine scripts using more than a few megabytes of RAM. To my knowledge this has never been an issue. Remember - when the game is executing, the scripts are all compiled to byte-code - much smaller than even the text script files.

  3. I like the idea, but I think you will always get better control through directly writing scripts. Not to say that using a node-based editor isn't a terrific way to build a working script that you can tweak manually if you want to - that would be very sweet.

  4. Are you really going to get people using Lua instead of TorqueScript?

    Well, I would, but it's not worth the effort to me to put it in there. TorqueScript works fine, warts and all, so why spend any time at all pulling it out just to plug something else in?


    Oh, I'd probably enjoy working in Lua considerably more and there would overall probably be fewer WTFs per second. But personally I'm fine with using what's there.

  5. If the profile is deleted it reverts to default because it would crash if it didn't have a profile.


    Also, after quickly skimming that code what I discovered was that we had a set of pre-named profiles that we altered at run-time for editing purposes. We then saved changes to the profiles so that the exported game could use them. The code I was thinking about was actually to get a list of available fonts from the OS and to determine a point size conversion to fit within gui controls - if the font is too tall to fit in the pixel height of the control the text will not render.


    I'll see what I can come up with....

  6. Well, you don't really have to go that far.


    I'll send myself an email to remind myself to grab that script - basically, you can create a GUI Profile on the fly and just assign it to a control. It's pretty simple, except that font sizes are weird and touchy - not simple to just convert point to pixel sizes, I used a "fudge factor" when doing this myself.

  7. "Out of the box?" Not really. You'll have to get the screen size yourself. The good news is that you can set the GUI profile of any control at runtime - allowing you to swap them on the fly as needed. So, make a collection of preset profiles sized as you wish and then swap them based on the scene dimensions or what not....


    Actually, if I remember when I get home I have some script that will generate a profile with a font point size (it's a little hokey, the conversion is weird) and assign it to a GUI object on the fly - it was for the Three Step Studio editors, for customizing your game template fonts. It can also set font colors....

×
×
  • Create New...