1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Hey Guest, is it this your first time on the forums?

    Visit the Beginner's Box

    Introduce yourself, read some of the ins and outs of the community, access to useful links and information.

    Dismiss Notice

Devlog KAG Build 2584 - Script Rendering, New Maps, Optimisation, Fixes Galore

Discussion in 'Announcements' started by Geti, May 15, 2018.

  1. Geti

    Geti Please avoid PMing me (poke a mod instead) THD Team Administrator Global Moderator

    Messages:
    3,699
    Hey Folks,

    New build in the oven, should be out across the board in less than half an hour.

    This build contains several optimisations, a lot of modder quality-of-life changes, and some exciting new script rendering possibilities. There's also new map changes for TDM. We're getting this build out ahead of the github bounty system landing next month - we may get another build out between now and then as well, but this one has definitely waited long enough.

    Script Rendering:

    There is now a script mesh rendering API, which can render in both world and screen space. This makes it possible to render custom geometry for things like tilemaps, fluid layers, ropes, line-of-sight/visibility, complex multi-part objects, "cheap" entities, and more. We'll be working with modders to see where this may benefit their mods, and the API has a straightforward "get off the ground" example provided.

    GoldenGuy in particular has already been tinkering with it; you can see his prototype of directional visibility in action here.

    I'm working on an example of "dynamic water", which not only provides an in-depth example of the rendering code, but also a good jumping-off point for modders' own custom fluids. Lava has been an oft-requested mod! I've intentionally kept the water model simple (no pressure, no velocity flow) to provide space for modders to extend and improve the system. Still, it's a lot more dynamic than the built in KAG water, and may be fun for some sandbox servers!

    [​IMG]
    (gfycat preview here!)


    The script rendering changes have also brought around some optimisation to a few of the primitive type arrays (numbers, vectors, colours and vertices), in order to allow much faster handling of meshes and index buffers. This has the nice side effect of optimising any code using those types of arrays.

    TDM Maps:

    Thanks again to the map mods for reviewing, iterating on and integrating so many maps to help keep the gamemodes fresh!

    Community:

    The kag-base github repo has been getting a good amount of attention since the contributor bounties and voting system were announced! If you haven't already, go give the pitches and bugs a moment of your time and vote on what you'd like to see sponsored.

    Thanks to everyone who's engaged with the system so far!

    As always, discord is where the majority of discussion is happening. Shout outs to the mods and administrators who keep the lights on over there!

    All the rest:

    There's a lot of miscellaneous features in this one. A lot of them are sourced from github reports. Some are player or modder requests. A few of them were just spur of the moment things. See the changelog for full details.

    Among them are better "tap" pickup handling to cut down on the amount of bad-priority pickups mid-fight, some tweaks to how TTH games start and end, and a long standing audio fix on linux/mac.

    Have Fun!
    Max

    Code:
    Full Changelog:
    
    Script Rendering
    
    [added] script rendering interface (see ScriptRenderExample.as in Base/Scripts/Examples for details)
    [added] Vertex type for fast script rendering
    
    Maps - TDM
    
    [added] 3 Maps - FG_Enclosure, Niiiiii_Elewater, Niiiiii_GetisArena
    [modified] 1 Map - Niiiiii_Watery
    
    Miscellaneous
    
    [modified] TTH game start/end logic (requires a hall cap to start, game doesn't end on a tie)
    [modified] ignore item aim when tapping pickup
    [modified] saving logs in binary mode, which should interfere less with encoding
    [added] utf-8 logging everywhere
    [fixed] unicode logging on linux/mac
    [added] color log support
    [removed] "New player joined the game" message, only leaving "*player* connected"
    [fixed] linux/mac channel mismatch and stereo sound origin glitch
    [modified] readme + server setup info a little since someone got misled by them
    [fixed] discord invite link (now permanent) + added guidelines link in readme on github
    [added] "forceful" physics disable when in inventory (we'll see if it fixes tflippy's lag)
    
    Modding
    
    [added] Better trace printing for exceptions, etc.
    [added] printTrace(), getCallStack(), getScriptStack() debugging aids
    [added] g_timeoutscripts to abort long-running scripts
    [added] nested hook call detection
    [modified] matcher returns empty string if there's no matches (assumption seems to be made everywhere)
    [added] hasScript to all components, rules, map and blob - fixes #78 on github
    [added] CSprite::getZ()
    [added] global isServer and isClient functions as shorthand for the equivalent CNet functions. Fixes #85 on github
    [added] CBlob::getOldPosition() - fixes #86 on github
    [added] allow_suicide gamemode.cfg bool - removes the menu option for suicide for gamemodes where that option is unsuitable
    [modified] engine (esc menu) suicide uses hitters.as suicide hitter
    [fixed] missing default constructor for Random
    [added] specialised array implementation for some types (bool, u8, s8, u16, s16, u32, s32, f32, Vec2f, SColor, Vertex); faster performance
    [fixed] error preventing loading in Texture::dataFromSprite and Texture::dataFromSpriteLayer
    [added] CMixer uses matched filename
     
    Noburu, Blubahub, FoxyLady and 10 others like this.
  2. enderzilla747

    enderzilla747 Shopkeep Stealer

    Messages:
    91
  3. Mazey

    Mazey Bison Rider Forum Moderator Official Server Admin Donator Tester

    Messages:
    1,874
    #GibKite
     
    Guitarman and Blubahub like this.
  4. Blubahub

    Blubahub Catapult Fodder

    Messages:
    27
    I want this new water in some of the maps in the future..! Is there any !dynamic_water spawn cheat command or the like to spawn this water? And has it been assigned its own color when doing making the .png maps?
     
  5. Asu

    Asu THD Team THD Team Forum Moderator

    Messages:
    1,537
    It's still a mod but it's not impossible that you see a new gamemode with that water logic.
     
    enderzilla747 likes this.
  6. Blubahub

    Blubahub Catapult Fodder

    Messages:
    27
    @enderzilla747 what? Oh, @Asu, I thought it was something that can be found in the Base game files..!
     
  7. enderzilla747

    enderzilla747 Shopkeep Stealer

    Messages:
    91
    Old development video that showcased rope. You could connect it to entities or make pulleys.
     
  8. epsilon

    epsilon Assonist Donator Tester
    1. Gather Oceania
    2. KAG World Cup 2018

    Messages:
    474
    Extended keg fuse :thinking:
     
    Blubahub likes this.
  9. 8x

    8x Elimination Et Choix Traduisant la Realité Forum Moderator Official Server Admin Tester
    1. The Young Blood Collective - [YB]

    Messages:
    1,277
    Keep going bros, keep making KAG better.
     
    Asu likes this.
  10. Coroz

    Coroz B R B Official Server Admin Donator
    1. [AG#] - Ancient Gear

    Messages:
    117
    Please make a lava stage with a dark background, touching lava kills you and boats can go into lava ofc. thats the kaglogic we need.
     
    Noburu, Magmus and Biurza like this.
  11. Furai

    Furai THD Team THD Team Administrator

    Messages:
    3,033
    What? You want to BUFF @Lavaguy678?
     
    Magmus, Biurza and Blubahub like this.
  12. Mazey

    Mazey Bison Rider Forum Moderator Official Server Admin Donator Tester

    Messages:
    1,874
    He deserves a buff, he got nerfed hard when he got fiber.
     
  13. Lavaguy678

    Lavaguy678 Ballista Bolt Thrower Official Server Admin Tester

    Messages:
    215

Share This Page