some basic config type questions

edited October 2014 in Help request
What, exactly, does the @ character in section names do?
Are there some required/predefined section names?
If you need to define multiple images for an animation can they be defined in one graphic section, or do you need to define multiple graphic sections.

I know this is basic stuff, but where I am right now...

Comments

  • edited October 2014
    The x@y means that x inherits from y, in other words, every parameter that is set on y and not set on x, will be set on x.

    On the animation, you will probably use heritage when you are dealing with sprite sheets. You may not use it for the animation itself, but you will use it to load each frame.
    For instance, the walking animation for LPC character sprites:
    
    [Character_Graphic]
    Texture = ../../art/light.png
    TextureSize = (64, 64, 1.0)
    Pivot = (32, 32, 1.0)
    
    [WalkingFront1@Character_Graphic]
    TextureCorner = (0, 640, 1.0)
    
    [WalkingFront2@Character_Graphic]
    TextureCorner = (64, 640, 1.0)
    
    [WalkingFront3@Character_Graphic]
    TextureCorner = (128, 640, 1.0)
    
    [WalkingFront4@Character_Graphic]
    TextureCorner = (192, 640, 1.0)
    
    [WalkingFront5@Character_Graphic]
    TextureCorner = (256, 640, 1.0)
    
    [WalkingFront6@Character_Graphic]
    TextureCorner = (320, 640, 1.0)
    
    [WalkingFront7@Character_Graphic]
    TextureCorner = (384, 640, 1.0)
    
    [WalkingFront8@Character_Graphic]
    TextureCorner = (448, 640, 1.0)
    
    [WalkingFront9@Character_Graphic]
    TextureCorner = (512, 640, 1.0)
    
    [WalkingFront]
    DefaultKeyDuration = 0.111
    KeyData1 = WalkingFront1
    KeyData2 = WalkingFront2
    KeyData3 = WalkingFront3
    KeyData4 = WalkingFront4
    KeyData5 = WalkingFront5
    KeyData6 = WalkingFront6
    KeyData7 = WalkingFront7
    KeyData8 = WalkingFront8
    KeyData9 = WalkingFront9
    
    

    As you can see, I used the heritage to load each frame of the animation (since they all use the same Graphic, TextureSize and pivot). In case you don't know LPC, you can find it here: http://gaurav.munjal.us/Universal-LPC-Spritesheet-Character-Generator/#
  • edited October 2014
    Thank you so much for your response, inheritance then. That helps. I was under the impression from the anim tutorial that you could use individual animation images instead of a tileset. I like the LPC thing and didn't know about it. I'll download it. But I'm still curious about the indi tiles.
  • edited October 2014
    Hi coosadog,

    You certainly can use individual images as opposed to one tiled image. Though tiled is much better.

    Basing off Knolan's config snippit, you can:
    [Character_Graphic1] 
    Texture = ../../art/light1.png 
    TextureSize = (64, 64, 1.0) 
    Pivot = (32, 32, 1.0) 
    
    [Character_Graphic2@Character_Graphic1] 
    Texture = ../../art/light2.png 
    
    [Character_Graphic3@Character_Graphic1] 
    Texture = ../../art/light3.png 
    
    [Character_Graphic4@Character_Graphic1] 
    Texture = ../../art/light4.png 
    
    [Character_Graphic5@Character_Graphic1] 
    Texture = ../../art/light5.png 
    
    [Character_Graphic6@Character_Graphic1] 
    Texture = ../../art/light6.png 
    
    [Character_Graphic7@Character_Graphic1] 
    Texture = ../../art/light7.png 
    
    [Character_Graphic8@Character_Graphic1] 
    Texture = ../../art/light8.png 
    

    A little inheritance here as well, so that I didn't have to repeat the TextureSize and Pivot values for each.
  • edited October 2014
    As a side note, in sausage's example you might not need the TextureSize at all as orx will use the actual size of the whole texture by default.

    To complement what has already been said, there are some predefined section names.
    They are used to configure orx's systems (Config, Clock, Display, Resource, Physics, Input, etc...). More info here: http://orx-project.org/wiki/en/orx/config/settings_main/main

    There's a similar list of all predefined keys to configure all the different runtime structures (objects, sounds, FXs, ...) available here: http://orx-project.org/wiki/en/orx/config/settings_structure/main

    Lastly the syntax is detailed here: http://orx-project.org/wiki/en/orx/config/syntax

    In some cases, the wiki might not be entirely up-to-date, however the files code/bin/SettingsTemplate.ini & code/bin/CreationTemplate.ini should always contain recent summary of the aforementioned properties (including a descriptive of the syntax at the top of both files). I use them often to remember/copy-paste the name of some properties.

    Regarding the animation definitions, it's the most annoying thing you'll have to do when using orx. It wasn't meant to be handwritten (it was defined back when an editor was supposed to be released along the engine) and can be pretty annoying to type.
    It'll be entirely redesigned at some point, when the animation system will be extended to support channels and skeletal animation.
    Till then, I believe there are community made tools to alleviate the pain on the bitbucket group page and one can also define them procedurally (there are a couple of posts about that in the forum: ie. custom rules are created to be then processed by code that will create all the config content on the fly using the orxConfig API). I'm personally using the second approach for now.
  • edited October 2014
    OK, thanks for all the info. I had already looked at SettingsTemplate.ini but I think I must have been speed reading or was asleep. What sausage said is what I was looking for as far as 1 image per frame. And your explanations, iarwain, are always detailed and helpful. Thanks again. I'll have something going soon if I can stop all the interruptions here.
Sign In or Register to comment.