[ home / board list / faq / random / create / bans / search / manage / irc ] [ ]

/prog/ - Programming

Programming board

Catalog

8chan Bitcoin address: 1NpQaXqmCBji6gfX8UgaQEmEstvVY7U32C
The next generation of Infinity is here (discussion) (contribute)
A message from @CodeMonkeyZ, 2ch lead developer: "How Hiroyuki Nishimura will sell 4chan data"
Name
Email
Subject
Comment *
File
* = required field[▶ Show post options & limits]
Confused? See the FAQ.
Embed
(replaces files and can be used instead)
Options
Password (For file and post deletion.)

Allowed file types:jpg, jpeg, gif, png, webm, mp4, pdf
Max filesize is 8 MB.
Max image dimensions are 10000 x 10000.
You may upload 1 per post.


File: 1429657413338.png (6.57 KB, 128x128, 1:1, Lua-logo.png)

4fb0e5 No.2175

Do you guys think lua is worth learning?

What can you do with lua?

Any examples?

60a17d No.2180

Yeah, Lua's awesome! It can be embedded really easily and if you learn it you can make addons for games like WoW and pretty much anything that uses Source as it's engine (a shitload of Steam games).


a67755 No.2183

Of course lua is worth learning, and you can learn its syntax pretty quickly.

You can do all sorts of things with it, as it's embedded in a whole bunch of different applications. There's bindings to various libraries. If you're on windows, luaforwindows is like a "batteries included" version of lua that comes with libraries for graphics, sound, gui, etc.

Love2d is a game engine entirely scriptable by lua, on a number of platforms. For iPad, Codea is a really nice lua environment based on Love2d that gives you access to most features including touch, gyro, cameras, networking, and so on.

It's a very fun language.


55b74f No.2192

minetest and cryengine.

definitely worth it but mainly you should learn whatever language you need for whatever hobby project you want to work on.

if you don't care then it doesn't matter because you can switch anytime.


fed6e4 No.2211

http://te4.org/ is a game/engine that's entirely scripted in Lua.

If you like roguelikes, you could probably make a zone/class/whatever as a project.

Or Gmod shit.


7529cf No.2213

It's a good scripting language.

It's relatively simple, but the things you can do with tables are quite impressive. For example, Lua has no explicit OOP support, but you can make your own OO implementation with inheritance and even encapsulation using tables.

It's almost like a less esoteric version of Lisp, though obviously not as powerful.


268a2f No.2225

if you are asking that, it's probably not worth learning for you, since the language serves a very specific purpose of being a good embedable and gluing language. Lua is not a good choice for general purpose scripting tasks.


4fb0e5 No.2232

You guys got any examples of things done with lua? I.e calculators, etc.


71dee7 No.2234

Decided to learn Lua a while ago (without a real goal). I'd say it's worth learning and playing around with just to expose yourself to some different concepts.

For example being able to sandbox/modify the environment of a function lets you do some cool meta programming.


c23b3d No.2240

>What can you do with lua?

It's the quasi standard for game scripting, where you don't want and need big standard libraries.

It got big when people realized that other scripting languages where a pain in the ass to embed.

These days there are better things, from game programmers themselves. Also, even better things are in the horizon

See http://freegamedev.net/wiki/Scripting#Scripting_languages.

There is also Mike Palls LuaJIT, which is slowly becoming more and more incompatible to the reference implementation.

It is one of the best JIT interpreters, but honestly, if your game scripting requires performance, chances are you are doing it wrong.

Custom bots may be a corner case.

Otherwise, this is how AAA games do it:

Engine -> Game (a C++ module) -> Event scripts


bc8b12 No.2269

Once you've been programming for a little while, there's little to learn in a language, let along a scripting language like Lua. If you can't learn it in less than an hour just give up on coding forever.


4fb0e5 No.2273

>>2269

What if it's your first language?


fed6e4 No.2274

>>2273

Then pick a different one?

It's too specialized to be useful to learn as a first. You wouldn't tell someone to learn BASH as their first language, would you?


4fb0e5 No.2277

>>2274

I guess, C is good for a start right?


a67755 No.2283

>>2277

Learn C, but don't buy into the delusion that it's a good language. Low level programming deserves a better language than C or C++ imo.


89c474 No.2309

>>2283

not OP

and what is so bad about C?


cc84ec No.2330

>>2309

Needlessly lacking costless abstractions and lacking and rigged-on low-level facilities.

Designed for computers in the 70s as well as its standard library, but even then they had better languages.


a67755 No.2357

>>2309

Bitwise operator precedence is a weird one. '==' is evaluated before '&' and '|'. That sort of baggage has been inherited by C's descendents too.


d52275 No.2445

>>2180

Source doesn't use Lua, and it doesn't have shitloads of games.


3dc3b7 No.2446

>>2192

minetest was built on lua?


fb1545 No.2449

>>2180

> pretty much anything that uses Source as it's engine

Nope, it's all Squirrel.


fb1545 No.2450

>>2446

Only the game logic, as it's supposed to be.


b2b16f No.2459

>>2450

Didn't know that, pretty interesting.


55b74f No.2460

>>2459

that's like, the main feature of minetest.

you can edit any mod easily and you can keep them up-to-date through git.

but the API isn't perfect yet which is why last time i tried boats were unusable.




[Return][Go to top][Catalog][Post a Reply]
Delete Post [ ]
[]
[ home / board list / faq / random / create / bans / search / manage / irc ] [ ]