Lua is a powerful, fast, lightweight, embeddable scripting language. Lua is widely used as a scripting language by game programmers, perhaps owing to how easy it is to embed, its fast execution, and its short learning curve.

learn more… | top users | synonyms

4
votes
2answers
141 views

Scripting: to block or not to block

Context: I'm making a little "program your robot army" sort of game in Java in which the player writes Lua scripts (which are then run by LuaJ) to program their robots to do stuff. So far there are ...
1
vote
2answers
22 views

How do I handle objects with a width and height in grid-based pathfinding?

I'm using the Jumper library for Love2D to do grid-based pathfinding, which worked fine until I wanted to make larger enemies (with larger collision boxes). How do i do that? My initial idea was to ...
1
vote
1answer
115 views

Passing an SDL KeyboardState(Uint8*) to Lua

I'm working on my first big project and I've decided to integrate Lua with my C++ framework. Everything's worked out so far, but the only way I've managed to pass the SDL_GetKeyboardState(NULL) array ...
0
votes
1answer
14 views

How to calculate the magnitude of the drag in Corona-sdk?

I'm making a game on Corona that launches a ball. The force is based on the magnitude of the drag: the larger is the drag -> the higher is the force. I'm having some trouble to do this, because I ...
0
votes
1answer
30 views

Console Invoke from Lua

Is there any possible way I can invoke the console with lua? The documentation for cryengine lua functions isn't very helpful.
2
votes
0answers
53 views

Easing towards stepped value

I'm currently developing this rhythm game in lua (on top of a c++ engine) and I'm having trouble keeping a steady playhead position for the song currently playing. The playhead position that the ...
1
vote
0answers
22 views

GMod Lua Scripting - Playing sounds only for specified player entities

I'm making a game mode for Garry's Mod, and I'm trying to write a system in which I play sounds only for certain players. The problem I'm running across is that doing so from server-side would take a ...
1
vote
0answers
114 views

What LuaJit threading archietecture should I use?

I am in the process of designing my own Game Engine for use in a real time CRPG - think Baulder's Gate. I know most of my specifications right now, and I am currently in a planning phase. I chose Lua ...
1
vote
0answers
207 views

Determine required camera pitch/yaw change based on mouse movement and roll?

I'm sure this is going to be a pretty simple answer but I can't quite figure it out on my own. Each frame, I'm getting the mouse's distance from the center of the screen (left/up is positive) and ...
0
votes
0answers
36 views

Why does my world generation code perform poorly on large inputs?

I'm writing some code to procedurally generate some islands in real time. The idea is to choose some points for each chunk, and for each tile calculate the distance from those points, then combine it ...
0
votes
0answers
19 views

Wow backdrop adding a fade color

I'm a bit stuck on my frame border. It adds 3 lines at the border and it should be 2 and i can't seem to fix it. Here is a image for better understanding. My backdrop looks like this PANEL_3 = { ...
0
votes
0answers
16 views

Cocos2dx : Lua with C++: lua_pcall closing my app

I'll try to explain what is happening with my current project: I want to make some custom scripts myself without using the lua script engine from cocos2dx, so I linked lua51.lib on Linker->Input, and ...
0
votes
0answers
41 views

Balancing teams based on player count and skill

I am creating a lua script which should balance teams. Now I have a table of players for each team. And each player has a certain skill (float value), and well second problem is the player count in ...
0
votes
0answers
20 views

How can I clear the screen on Corona SDK

I have objects on the screen that create the main menu, and I want the the screen to clear when I get press the play button. I did it the way the other question on this subject said, but when I ...
0
votes
0answers
70 views

How to implement Lua thread for Sleep function

I am running into a problem in my game engine right now. I want to be able to call Sleep(number_of_seconds) from .lua file (1 only) and halt the execution of the lua file, WHILE the game is running ...