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.
1
vote
1answer
545 views
Help with Collision of spawned object(postion fixed) with objects that there are translating on screen
Hey guys I am creating a game using Corona SDK and so coding it in Lua.
So there are 2 separate functions,
To translate the hit objects and change their color when they are tapped
The link below ...
-1
votes
0answers
20 views
Assertion fails with events in lua, Corona SDK
So I have two objects, an Enemy and Bullet Object. In the level there are several different instances of Enemy Objects, about 16. Each of which are linked to their own Bullet Object. keep in mind ...
3
votes
2answers
727 views
Experience embedding javascript
I'm looking into scripting languages to embed in my game.
I've always assumed Lua was the best choice, but I've read some recent news about embedding V8 as was considering using it instead.
My ...
0
votes
0answers
75 views
Tile-Based Platformer Infinite Terrain Generation
I'm using the LÖVE game engine (which uses Lua). My terrain generation works good. But I'm planning to make the terrain generate as the player walks so that the terrain will be infinite size. I'm ...
1
vote
1answer
238 views
Automatically triggering standard spaceship controls to stop its motion
I have been working on a 2D top-down space strategy/shooting game. Right now it is only in the prototyping stage (I have gotten basic movement) but now I am trying to write a function that will stop ...
0
votes
1answer
64 views
Why does this LUA code not render any objects on the screen? [closed]
Did I mess up something somewhere? If i put a putsxy in the same box, it renders a string just fine, but for some reason this code hates objects. What this code is supposed to do is render a set of ...
1
vote
2answers
221 views
Viewport like Angry Bird in Corona
Not sure if that's the right name for it, but I'm looking for a way to implement zooming in my game.
Essentially the game should zoom in on my character during the moving and shooting phase (its like ...
0
votes
1answer
93 views
using lua in kobold2d to control parameters
Is there a tutorial on using LUA in Kobold2d?
I want to know if its possible to use it to control the game behavior (like max speed decrease of timer, and bonus points) by uploading a new script to ...
1
vote
0answers
155 views
Love2D : How can I keep up with lots of small sprites' collision data?
So I'm using a SpriteBatch to keep up with lots of small pieces for a falling-piece puzzle game. I have an array of Quads (for different color blocks), and they are randomly added to the ...
-1
votes
1answer
92 views
Overload C++ functions in lua [closed]
I have had a look around but I believe this to be impossible due to compile time of c++.
However is it possible to have a class registered in lua and c++ that has a overload update function which I ...
2
votes
1answer
540 views
help animating a player in Corona SDK [closed]
Working on a game in the Corona SDK with Lua and I need help so the player animates on the line drawn. Right now he animates at the beggining and the end but not on the line.
Here is the player code:
...
0
votes
1answer
132 views
How to generate an explosion? [closed]
I'm currently working in an Angry Bird-esque game, where the user flings a bomb at buildings and the bomb explodes.
How do I create explosions in Corona? Essentially some sort of area of effect ...
0
votes
1answer
85 views
Love2D : Problem rotating image in a SpriteBatch
I'm working on a falling blocks type of game with triangular pieces. I'm using a SpriteBatch to accumulate and remember the pieces and their locations.
The problem is that when I rotate a scaled ...
3
votes
3answers
592 views
How should I manage the AI using lua scripts?
My game is in C++ and I want to make AI being managed by lua scripts, but I have no idea how should the scripts look like and the integration in C++.
Should the script be like
if ...
2
votes
2answers
790 views
Game State Management using Lua
I want to be able to (only) define game states using Lua script, but I'm not sure how I should do it. Here's what I have in mind currently:
For each state, I will create a .lua file that contains a ...
22
votes
5answers
4k views
What are the pros and cons of incorporating Lua into a C++ game?
I have a C++ game programming book and it has a Lua section in it. I've started to read the Lua section, and it sounds interesting, but I can't determine the pros and cons of using Lua in my C++ game. ...
0
votes
1answer
156 views
C++ formatted serialization [closed]
I've decided it's time to implement serialization in my simple engine but this has caused me many headaches for the past couple of days/weeks. My engine uses an entity/component based approach similar ...
0
votes
1answer
50 views
update image properties
Is there a way to update the location of an image?
I'm currently calling my image dynamically using:
itemImage = display.newImage(inventory[t.ID][1])
t. being my target ID.
But in order for ...
6
votes
2answers
163 views
How to share Lua script between instances?
I'm doing an agent based framework with C++ and Lua. I want to use Lua to code the Agent behaviour having an AgentClass class that have the name and source code and an AgentInstance class that have ...
5
votes
2answers
282 views
How to use LuaJIT the same that Lua in a C++ program?
I'm using Lua in my C++ program, as an library. But I read that LuaJIT is a better implementation.
Is it posible to replace with LuaJIT with little change? How?
3
votes
1answer
129 views
Platform independent replacement for LuaInterface
I'm currently working on a project in C#/XNA, however I'm planning to migrate this to MonoGame so that it can go onto more platforms. The problem is that I am currently using a lot of Lua, and for ...
3
votes
2answers
273 views
Does it make sense to use Lua scripting in a game developed in Python?
Well for C++ written games using Lua scripts for easy changing ai, quets etc is very reasonable and it's common. However now I'm going to write a game in pure python and I don't know if I should use ...
2
votes
2answers
118 views
How might I script the creation of CLR objects?
I am looking for a method to script the creation of entities (arrays of components) for delivery through my entity factory, i.e scripted creation of .net objects.
I have looked into Lua but it seems ...
1
vote
1answer
155 views
How can you implement Lua into your game? [closed]
I am trying to implement Lua into my game, but am having trouble. Say I have a weapon class, which is just a hollow shell, lacking real functions. I was thinking of creating an onFire function, which ...
8
votes
8answers
8k views
Love2D engine for Lua; What about 3D?
Lua has been really awesome to learn, it's so simple. I really enjoy scripting languages, and I had an equally enjoyable time learning Python.
The Love engine, http://love2d.org/, is really awesome, ...
1
vote
2answers
100 views
Rotating and pitching a turret
I am new to game development and I was trying to build a turret model, and control it through lua script in shiva3d. I can rotate it around the y axis which is no problem, but when it comes to ...
-4
votes
1answer
941 views
Why does Angry Birds use lua? [closed]
What does it use the lua files for? I found it interesting when I read online that they use it.
2
votes
3answers
328 views
Is it efficient to use lua to store game data?
I'm new to lua and I'm wondering, is it efficient to use lua to store game data (such as monster's description, spells).
My problem is,
when I try to create a monster object every second, I have to ...
1
vote
1answer
83 views
Find connected hex of same color
I'm using Lua. I have a hex map. It is randomly generated into an table.
hexmap[y][x].color = "red"
I wish to find each "group" of hex's. i.e. all hex's of the same color that connect to each other ...
2
votes
1answer
73 views
Is it possible to have the main callback functions in different files with love2d?
Is it possible to have love.load(), love.draw() and love.update() in different files? and if so how would I go about doing that?
2
votes
1answer
93 views
Twitter integration
My computer game is powered using Love2d in Lua, there is dead space in the menu of my game and I'd like to fill it up with something. So I'll like to put a twitter feed there, how can I receive all ...
5
votes
5answers
625 views
Game state management (Game, Menu, Titlescreen, etc)
Basically, in every single game I've made so far, I always have a variable like "current_state", which can be "game", "titlescreen", "gameoverscreen", etc.
And then on my Update function I have a ...
5
votes
3answers
531 views
How to protect Lua scripts in IOS game?
I'm developing an iOS game and was considering putting level info and monster info in a Lua script for ease of use. However, since I'm using Game Center for multiplayer I'm concerned users will ...
4
votes
1answer
564 views
Lua or C++ in Cococ2d-x
I am going to use Cocos2d-x to make a game for Android and ios, but my question is, do I use the Lua integration or only c++, I see Lua useful here because the compilation thing.
Or do I use only Lua ...
4
votes
3answers
638 views
What technology would you use to communicate between an iOS game and a Lua-based AI server?
What technology would you use to communicate between a two-player,turn-based, board game (like checkers or Othello) running native on iOS, and a remote game server
The remote game server is just the ...
0
votes
2answers
355 views
Lua GameDev iOS - Code on win and mac
I am searching for a simple framework like http://getmoai.com where you can simply code a game in lua for iOS. I want to build it along with a friend. I am using a Mac, he prefers windows so the fw ...
1
vote
1answer
268 views
How should I share variables between instances/classes?
I'm making a game using LOVE, so everything is programmed in Lua. I've been experimenting with using classes and object orientation recently. I've found out that a nice system to use is having most of ...
3
votes
2answers
931 views
Dynamic libraries are not allowed on iOS but what about this?
I'm currently using LuaJIT and its FFI interface to call C functions from LUA scripts. What FFI does is to look at dynamic libraries' exported symbols and let the developer use it directly form LUA. ...
11
votes
5answers
2k views
What is the recommended library for using Lua from C++?
I am currently planning how to integrate Lua scripting in my 2D Game Engine, and i would like to go straight to the most adequate solution for having C++ classes and objects exposed.
I've read this ...
4
votes
3answers
565 views
How can i run my .LÖVE game directly from the lua interpreter?
I've just started with LOVE and LUA , i'm interested in LOVE because i want to play around with something different from my dayjob(i'm a webdeveloper) and since it uses LUA and is interpreted , i ...
4
votes
2answers
278 views
Basic procedural generated content works, but how could I do the same in reverse?
My 2D world is made up of blocks. At the moment, I create a block and assign it a number between 1 and 4. The number assigned to the nth block is always the same (i.e if the player walks backwards or ...
-3
votes
1answer
280 views
animate anything animation class [closed]
I'm working on my lua/C++ based game/game engine and I'm currently up to implementing animation.
I want to have animation class that animate whatever object it is given, so that I can animate ...
2
votes
2answers
856 views
How do I move an existing display object behind another in Corona Lua?
If I have two existing display objects in Corona, lets say do1 and do2. Assume do1 is drawn first then do2, so do2 will be on top.
Is there a way to say "put do2 behind do1" in corona Lua? If yes can ...
3
votes
1answer
431 views
Drawing an outline around an arbitrary group of hexagons
Is there an algorithm for drawing an outline around around an arbitrary group of hexagons?
The polygon outline drawn may be concave. See the images below, the green line is what I am trying to ...
1
vote
1answer
222 views
what's wrong with this Lua code (creating text inside listener in Corona)
If you double/triple click on the myObject here the text does NOT disappear. Why is this not working when there are multiple events being fired?
That is, are there actually multiple "text" objects, ...
2
votes
1answer
228 views
How can I link to callback functions in Lua such that the callbacks will be updated when the scripts are reloaded?
I'm implementing Lua scripting in my game using LuaBind, and one of the things I'm not clear on is the logistics of reloading the scripts live ingame.
Currently, using the LuaBind C++ class ...
6
votes
1answer
115 views
Power Distribution amongst connected nodes
In my game the map is represented by connected nodes, each node has a number of connected nodes. The nodes represent a system in which players can build structures and move units about. If you're ...
0
votes
2answers
308 views
Is it possible to generate Events and Hooks in Lua for any game without built-in support?
Does a game have to have built-in functions to accept and run lua scripts, or can I design Events and Hooks using Lua on any game I please, akin to the days where C code could be used to hook into the ...
1
vote
1answer
204 views
Where in code to for collision? In object class? Mainline code?
Making a simple game in Love 2D framework where if I click on an object then it disappears.
Do I check to see if I've clicked the enemy inside a function in the enemy object? Or just in my main.lua? ...
8
votes
3answers
7k views
Good Tutorial For Lua and LÖVE
I want to make a very simple 2D game, and have been reading a lot of good things about LÖVE, so I want to try it out. However I can't seem to find any good tutorials. The ones on the LÖVE page are ...


