1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Ben - May 18 2015

Discussion in 'Developer Progress Reports' started by Benjamin, May 19, 2015.

  1. Benjamin

    Benjamin Lead Developer

    • Dev Leader
    Just finished watching the Avengers 2! Was pretty good, but I didn't like the portrayal of artificial super intelligence. Anyways

    * Vorb Engine *

    Today I started by fixing the resolution handling for the GameWindow so that there weren't any issues with changing resolution using the options menu or by dragging the window borders. Then I added relative positioning to controls, which is REALLY useful for formatting UI for many window sizes.

    Instead of Widget.setPosition(30, 100) or whatever, you can use Widget.setPositionPercentage(0.1, 0.4), which will set the X position at 10% the parent's width, and 40% the parents height! There is also setDimensionsPercentage.

    Next I fixed a crap ton of stuff and added more layout management, for instance I added WidgetAlign which allows you to better control the positioning of widgets.

    Now everything is pretty much done backend-wise for the UI for the demo. I wanted to have a pretty UI to show you but then I went to see a movie, so you are stuck with this monstrosity!

    [​IMG]

    Ahhh kill it with fire!!!

    Nothing interesting happened in the game code today, just a bit of code to interface with the UI.

    Commits
    Vorb Engine: 11
    Game Data: 2
    Game Code: 2
    Total: 15

    I'm buying The Witcher 3 tomorrow. It will not interfere with dev time, but it might interfere with everything else...
    Last edited: May 19, 2015
    Benjamin, May 19, 2015
    Last edited by Benjamin; at May 19, 2015
    #1
  2. NeonSturm

    NeonSturm Back Into Space

    • Member
    Sometimes somebody may like to set a [relative x y] for the widget-centre and a ratio between the left/right margin.
    Or minimum pixel sizes...

    In Zero-K lua, I saw an approach like:
    PHP:
    --- size constants ---
    local PIXEL 0
    local RELATIVE 
    1
    local PERCENT 
    RELATIVE -- bitwise or with relative

    --- settings ---
    local TOP 1
    local LEFT 
    2
    local POSITION 
    TOP LEFT -- includes top and left
    local CENTRE 
    POSITION -- bitwise or with positionbit 2^4 means origin=centre
    local SIZE_MIN 
    16
    local SIZE_MAX 
    32
    local SIZE 
    SIZE_MIN SIZE_MAX -- both sizes

    --[[ Example usage
        set
    ({ CENTRE = {xyPERCENT} -- or MARGIN_RATIO = {left right}
            , 
    SIZE_MIN = {xyPIXEL}
            , 
    SIZE_MAX = {xyPERCENT}
        })
    --]]

    --- 
    TODOhandler --- NOTE: if each set has a serialrepeated calls task order can be cached ---
    function 
    set(args)
        for 
    pairs k,v in args
            local width 
    0
            local height 
    0
            
    ...

            
    SIZE -- figure size out before calculating position from centre if needed
                
    and (...) -- update minmax size
            
    or MIN
                
    and (...) -- update only min size
            
    or MAX
                
    and (...) -- update only max size
            k 
    CENTRE
                
    and ( )

            
    CENTRE
                
    and (v[0] = v[0] - width/2)
                and (
    v[1] = v[1] - height/2)
            
    POSITION
                
    and (...) -- update top left
            
    or TOP
                
    and (...) -- update only top
            
    or LEFT
                
    and (...) -- update only left


            
    ... -- do actions
        end
    end
    BTW: we really need syntax-highlighting and code-bb for LUA+Cpp and stop this un-read-able blue (with dark forum theme it is unreadable) -- 3rd edit :)
    Last edited: May 19, 2015
    NeonSturm, May 19, 2015
    Last edited by NeonSturm; at May 19, 2015
    #2
    Snipecoolbunny and ColdFuseon like this.
  3. joppiesaus

    joppiesaus Infamous Space-Octopus

    • Member
    Great resolution menu as always! :D
    Benjamin and ColdFuseon like this.
  4. 10d22

    10d22 Designer

    • Dev Member
    • Moderator

    Ben be like: [​IMG]
  5. ColdFuseon

    ColdFuseon Lost in Space

    • Contributor
    I like how you tell what you did and will do just before and after the dev blog lol, good job Ben, as always. :)
    ColdFuseon, May 19, 2015
    Last edited by ColdFuseon; at May 19, 2015
    #5
  6. Thomas988

    Thomas988 Back Into Space

    • Member
    I'm glad to see the real "substance" of the demo is complete and all that remains to finish is the UI. So excited!
  7. Snipecoolbunny

    Snipecoolbunny Back Into Space

    • Member
    um... when do you think the survival aspect will be put in? just a guesstimate perhaps? cause if this is how the pre-alfa looks like i cant wait to see what beta brings!
  8. Arctic

    Arctic Giant Robot Advocate

    • Tester
    When the Lua interface has been implemented. Everything, EVERYTHING will be moddable, which is why I'm so damn excited for this game.
  9. Benjamin

    Benjamin Lead Developer

    • Dev Leader
    That's pretty tough to guestimate, and I'm always wrong, but I would say maybe 3 months? The kickstarterwill be in probably 6-7 months so it needs to be before then.

    Not quite everything at least not at first, but yes a LOT of it will be moddable, and if there is something that isn't moddable, you need only request hooks for it and we will oblige.
    Snipecoolbunny likes this.
Similar Threads: 2015
Forum Title Date
Developer Progress Reports Matthew - Nov 17 2015 Nov 17, 2015
Developer Progress Reports Matthew - Nov 06 2015 Nov 7, 2015
Developer Progress Reports Ben - Aug 9 2015 Aug 10, 2015
Developer Progress Reports Ben - July 24 2015 Jul 25, 2015
Developer Progress Reports Ben - July 16 2015 Jul 17, 2015

Share This Page