Jump to content
  • Advertisement
Sign in to follow this  
Popcornhebe

ROBLOX/Other Games Programming(Lua)

This topic is 1332 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello! I am Popcornhebe.

 

 

So I started using this site not that long ago with a basic understanding of Lua programming. I am fit on Lua, though I will hopefully start trying to learn newer and better languages. As in the title, I have brought up a game called ROBLOX. In ROBLOX, there are many games that the users can create in ROBLOX studio with the help of the programming language known as Lua. 

 

ROBLOX site: http://www.roblox.com/home

 

ROBLOX is a downloaded game, where you can play games and create your own. I myself haven't created a successful game(yet). Once you install ROBLOX, the studio comes with it, ROBLOX studio is a game creating engine that uses Lua, it has many other utilities but I am focused on the programming part. 

 

I wrote all this down so you know what I am talking about. I actually came here to ask for some useful sites or tips to get me started. Yes I want to use Lua for more games, not just ROBLOX. I do have a semi good understanding of Lua, I just need some extra assistance. 

 

 

ROBLOX Lua code example: 

 

function onTouched(hit)

if script.Parent.Transparency==0 then

if hit.Parent~=nil then

if hit.Parent:findFirstChild("Humanoid")~=nil then

hit.Parent.Humanoid.Health=0

end

end

end

end

script.Parent.Touched:connect(onTouched)

 

--This script is used when you want to damage or kill a user. Enter this into a brick or object and the user will die(damaged/settings) on contact.

 

 

Share this post


Link to post
Share on other sites
Advertisement

Well, we will be more than happy to help you!

Because lua is a scripting language rather than a full programming language, every implementation will be slightly different. My 2D engine that I rolled earlier this year, for example, uses lua for it's logic scripting. I has about 150 custom lua function bindings that are specific to that implementation. Computercraft for Minecraft is another example of a lua implementation. 

Using lua to make games is completely possible, you just have to find an engine that accepts lua as it's base scripting language. 

 

Good luck with your programming!

Share this post


Link to post
Share on other sites

Hello popcornhebe. I have never used Roblox but I've heard about it. I'm fairly sure there are at least two users here who played with it. Maybe chime in the chat every once in a while (in case they miss this post).

Share this post


Link to post
Share on other sites

Used to play roblox, now just use their forums as a tool of procrastination.

 

 

 


I actually came here to ask for some useful sites or tips to get me started. Yes I want to use Lua for more games, not just ROBLOX. I do have a semi good understanding of Lua, I just need some extra assistance. 

 

Ive seen many people go for the Lua based game engine LÖVE.

 

It seems to be limited to 2D, but has all the things a game engine should have (hardware accelerated sprite rendering with shaders, physics, threading, networking, bunch of utilities...)

It also seems possible to use LuaJIT (not sure if its enabled by default) so I guess it will also be faster than roblox for the Lua-side code.

 

So you could use that.

 

 

You should also learn at least the basics of some other language (probably C#, C++ or Java) simply because they are so popular and if you understand them, you will gain a better understanding of how any programming language (including Lua) works in general. For example you could just read through some C++ online tutorial to the point where you know what pointers are and make some silly console application.

 

Another thing that might be useful is to check the official Lua documentation. Especially the reference manual, since it seems to offer a good explanation of the workings of Lua (since as a dynamic scripting language there is some magic going on to map the Lua script to how the computer works at a low level).

 

And of course, keep googling and reading about things you want to do in whatever game you are working on, be it the general structure of your code, some GUI design issue or a difficult decision of how to implement jumping.

 

You still might find that you want to keep scripting in roblox because you get free hosting and a lot more publicity for your stuff than if you make an independent game (unless you are serious about it and are able to gather a community of your own around it).

Edited by Waterlimon

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!