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
54 views
Game Development AI, NPC & Entities Definition using Scripting Languages
i am developing a Multiplayer(actually MMORPG) architecture for learning purpose.
I do have some game developement background, but all my engines were very rigid and completly developed for the game ...
-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 ...
0
votes
0answers
81 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 ...
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
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 ...
0
votes
1answer
135 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 ...
1
vote
0answers
158 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 ...
0
votes
1answer
89 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 ...
0
votes
1answer
157 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 ...
5
votes
2answers
289 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?
6
votes
2answers
166 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 ...
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
274 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
119 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
156 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 ...
3
votes
3answers
604 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 ...
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 ...
0
votes
1answer
51 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 ...
-4
votes
1answer
951 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.
1
vote
1answer
239 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 ...
2
votes
3answers
331 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 ...
1
vote
2answers
222 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 ...
2
votes
1answer
74 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
3answers
538 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 ...
0
votes
2answers
363 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 ...
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
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
939 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. ...
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 ...
5
votes
5answers
629 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 ...
-3
votes
1answer
281 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 ...
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 ...
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 ...
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 ...
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 ...
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? ...
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
439 views
How do I draw a border around a display object in Corona Lua?
What would be the easiest way to draw a thin border around a display object in Corona Lua?
You could assume it's rectangular image display object.
EDIT - re "this question shows no research ...
2
votes
2answers
869 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 ...
5
votes
1answer
169 views
Change Game Icon
Is there a way to change the default LÖVE2D icon to another one?
I merge my game.love file and the love.exe with the cmd (copy /b love.exe+app.love game.exe).
But after this the executable has the ...
4
votes
3answers
568 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 ...
2
votes
0answers
560 views
Opening URL in browser using C++ with cocos2d-x in iOS [closed]
I'm banging my brain against the wonderful lib xport that is cocos2d-x from the original cocos2d iOS library.
What I want to ask is how to open a web link in the safari browser? I don' know how to ...
2
votes
1answer
484 views
Box2D + Love2D (Lua) - Assertion fail with polygon meshes
When I try to create a triangle collider for my game it sometimes leads to an assertion fail. I use the physics engine that comes with love2d (Box2D). That's the error message that appears when the ...
2
votes
2answers
516 views
Scripting language with class instance support
I have come across the need to use a scripting engine for my C++ game, but after experimenting with many languages since the last few days, nothing has truly stood out as the obvious choice for a ...
1
vote
1answer
3k views
Efficient tile maps in Corona SDK
I need to create a tile map based level system for Corona SDK that loads files created with Tiled [1]. It also needs to support user touch scrolling and zooming.
I've searched the Corona forums for ...
5
votes
3answers
203 views
A* : Partial recalculation when one node *changes*
I have implemented an A* library. Its most interesting feature is that it is "interruptible"; for example, you can stop the calculation loop on a game frame, and resume it later on the following ...
7
votes
2answers
840 views
Handling scripted and “native” components in a component-based entity system
I'm currently trying to implement a component-based entity system, where an entity is basically just an ID and some helper methods tying a bunch of components together to form a game object. Some ...
0
votes
1answer
966 views
attempt to call field 'removeBody' (a nil value) in Corona, Lua [closed]
In Corona SDK, I am using the director class to switch between scenes. main calls menu.lua, where if you tap on a button it takes you to level1.lua, which uses car.lua for the cars in the game.
...