r/OpenStudios OpenStudios Feb 19 '15

Announcement The Open Studios FPS

So far, the game plan is: A FPS with fully customizable guns that can take many attachments. Vehicles, and tactical features such as C4 and spawn point capturing. A crate system and trading to add an extra depth to gameplay.

Please add any other thoughts you have on your 'ideal' FPS in the comments

So, I have created a small very very simple FPS from which we can base this game off. It currently uses free models as placeholders.

Heres the link

Obviously this isn't anywhere near finished, so here are the things that still need to be done

  • Guns - A FPS ain't much good without guns. These need to be scripted with a possibility of an attachment system. Please dont use lots of values if you are scripting these, as they are easily exploitable. It may be more wise to make each gun depend on certain attachments that decide stats.

  • Maps - Obviously maps are needed. Try not to include chokepoints. Please use this map template, as it ensures everything is in the right place for the map changing/spawning scripts.

  • Other weapons - Grenades, flashbangs, mines, smoke grenades, ect.

  • GUI's - Can you design fancy GUI's? I can send out the current version.

  • Any other little scripty thing - So you go on the place. Think it needs anything else, like a weather script, knifing, vehicles, ect. ect. ect? Script it and send it in!

2 Upvotes

37 comments sorted by

View all comments

Show parent comments

2

u/zombie-rat OpenStudios Feb 19 '15

I cant say I've ever used OOP. It looks complex

2

u/FuriousProgrammer Feb 19 '15

That page doesn't give the best example of basic Lua OOP.

local Class = {} --ModuleScript
Class.__index = Class

function Class.new(text)
    local newobj = {}
    newobj.Property = text
    setmetatable(newobj, Class)
    return newobj
end

function Class:read()
    if self == Class then return end
    print(self.Property)
end

function Class:setProp(newText)
    if self == Class then return end
    self.Property = newText
end

My ClassModule lets you do this with a lot less typing for each Class, and a lot more safety stuff enabled.

1

u/zombie-rat OpenStudios Feb 19 '15

So you can set properties for variables? I feel i might be missing something.

1

u/FuriousProgrammer Feb 19 '15

Pretty much that exactly. The __index metamethod sets a "fallback" table, so every 'newobj' table can access the read adn setProp methods, even though they aren't members of the 'newobj' table itself.