DEV Community

Bigaston
Bigaston

Posted on

Game Off 2018 (2)

Hello!
Day 2 of my report for the Game Off 2018!

Today I continue to work on the Pixel Art for my game!

I've create some flowers...
Flowers

And some seeds...
Seeds

I don't know wich flower can hybrid with other but for now I've some art!

And I've start to write some function to work with some 2D table!

function array(pRow, pCol, pDefault)
    local tab = {}

    for row=1, pRow do
        local tab_col = {}
        for col=1, pCol do
            table.insert(tab_col, pDefault)
        end
        table.insert(tab, tab_col)
    end

    return tab
end

function access(pRow, pCol, pTab)
    local col = pTab[pRow]
    local val = col[pCol]
    return val
end

function replace(pRow, pCol, pTab, pVal)
    pTab[pRow][pCol] = pVal
end
Enter fullscreen mode Exit fullscreen mode

It's all for today! I think I'm going to share my advancement everyday!
Have a nice day!

Top comments (0)