Search code examples
enumsluacoronasdk

Is Corona SDK fast enough for a Dwarf Fortress like game?


I want to make a dwarf fortress like game. Would the Corona SDK be fast enough? How would I store the data for each individual block. Since I can't make an enum in Lua, how would I define the type of block?


Solution

  • Why can't you make an enum in Lua? Just use a simple table.

    brickType = { A = 1,
                  B = 2,
                  C = 3,
    }
    
    myFristBrick = { weight = 500,
                     volume = 50,
                     type = brickType.C
    }
    

    You can model very complex data structures using Lua tables. So storing your brick data is the least concern you should have.