GSoC/GCI Archive
Google Code-in 2012 Copyleft Games Group

Bitfighter: Parameterize Lua Constructor for Various Objects 3

completed by: Martin Bede

mentors: watusimoto, raptor

Remember to join our IRC channel when working on this task! We are on #bitfighter at We are friendly!

Your task

Parameterize Lua constructor for the following items:

                    Item              Parameter set 1   | Parameter set 2
                    Spawn               Geom            | Geom, team
                    SpeedZone           Geom            | Geom, speed
                    SpyBug              Geom, Team      |
                    Teleporter          Geom            |
                    TextItem            Geom, text      |
                    Turret              Geom, team      |
                    WallItem            Geom, thickness |
                    Zone                Geom            |

This will allow scripters to create an object as follows: local a =,200, 400,500) rather than the more cumbersome current method: local a = a:setLoc(100,200, 400,500)

Task is complete when a levelgen script and editor plugin can create the items above, with the two specified parameter sets, and new constructors are documented. This task looks complex, but is actually pretty easy. There are some good models to follow, and the mentors know exactly what needs to be written.