Code Monkey home page Code Monkey logo

lua-for-ags's People

Contributors

duncanc avatar jjsat avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

jjsat ericoporto

lua-for-ags's Issues

DynamicSprite garbage generation seems very high.

        for y=0,sprite.Height do
            local slice = ags.DynamicSprite.CreateFromExistingSprite(sprite.Graphic)
            slice:Crop(0,y,slice.Width,1)
            local offset = offsets[i][y]
            surface:DrawImage(char.x - slice.Width / 2 + offset, char.y + y,slice.Graphic, math.min(50 + y * 3, 100)) 
            slice:Delete()
        end

Something like the above code seems to generate a huge amount of garbage (as measured with collectgarbage("count"). I would expect the sprites to only hold references to data stored by AGS but something else is causing mega bytes of garbage in only a few seconds.

Accessing AGS Palette

There is no way to access the palette in 256-colour mode, something like this should work:

-- set palette slot 3 to red
ags.palette[3].r = 63
ags.palette[3].g = 0
ags.palette[3].b = 0
ags.UpdatePalette()

errors in getter/setter methods show useless error messages

e.g. assigning nil to a DrawingSurface DrawingColor:

Error: [Lua] [string "local select = select;local error = error;l..."]:1: bad argument #2 to 'setter' (number expected, got nil)

Should show the script/line where the attempted assignment took place instead.

Code generation tools are not in repository

I wanted to try to update this for latest AGS, but the code that generates the bindings is not in the repo. I got to build it, but I also had trouble overall trying to understand all the blocks here.

I think a good documentation on how all of it should work would be very helpful to enable someone to maintain it for ags. :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.