Questions tagged [lua]
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.
257 questions
1
vote
3
answers
248
views
Handling status/effects on a turn based RPG game
I have managed to create a state machine for my game core, like on turn start, on turn end, and another one. Now lets talk about effect/status.
For generic effects such boosting stats for certain ...
1
vote
0
answers
70
views
How to move objects in a wavy pattern in a specific or given direction?
I'm making a bullet hell and I want to handle a variety of movement types for my bullets (waves, flying in circles, spirals, etc). I'm currently using the following to handle linear movement at a ...
0
votes
1
answer
203
views
How to express parabolic motion using delta time?
I'm trying to figure out how to express parabolic motion (for example: \$y = x^2\$) using delta time. I thought about deriving it using a differential like \$y' = \frac{1}{2}x\$ but that results in a ...
0
votes
1
answer
220
views
What does the phrase "Kinematic bodies do not collide with other kinematic or static bodies" mean?
What does the phrase "Kinematic bodies do not react to forces and only collide with dynamic bodies" mean?
Related: I'm always confused by game engine physics explanations
I found this ...
0
votes
1
answer
95
views
Predictive Rectangle Collision Resolution Corner Snagging
I've written two main functions who's purpose is to detect and resolve collisions between a moving rectangle and a non-moving rectangle. I have a decent understanding of how the algorithm works, and ...
2
votes
0
answers
144
views
Tool stops working after death, but only in the Roblox Client, not Roblox Studio
In the experience I'm currently working on there has been a bug where, after death, the gun tools would stop working unless dropped and picked back up. However, when trying to debug this, I found that ...
0
votes
3
answers
341
views
Implementing framerate independent friction with linear deceleration
I'm implementing friction into my game, and I'd like it to be framerate-independent. Here's my first solution, in Lua style pseudo-code:
...
0
votes
1
answer
85
views
How do I go about Mesh Simplifcation in generating multiple LODs?
I have been recently looking for any information on creating multiple LODs (level of detail) for an inputted mesh. However, there does not appear a lot of articles or pseudo code on how to go about ...
0
votes
1
answer
477
views
How to go about executing lua scripts in a ECS engine?
I'm trying to add scripting with lua to my C++ game engine, and I'm pretty stumped on how to tackle the executing/processing part. I started by creating a ...
0
votes
1
answer
79
views
Checking if I am looking through a window using angles
I am developing a mod for a game with a Lua api.
I am trying to detect if I am looking through from behind a window when I shoot an enemy. For context, when I shoot through this window I apply a ...
1
vote
0
answers
236
views
Which part of UnLua for UE5 can be defined at runtime?
I'm looking into options to allow a released UE5 game to be modded, with just "text files". That is, without having to use the Unreal Editor, and give access to the game code, to create the ...
1
vote
1
answer
169
views
How to properly split damage against armor?
I am developing a third-person shooting style game and I want to implement an armor system. The system that I have envisioned does not reduce the damage to 0, but by half. So the incoming damage is ...
0
votes
1
answer
147
views
Why does my Roblox game delete all parts when testing?
I'm working on a Roblox game, but whenever I test it, none of the parts I added in the game display in the Explorer or in the game itself. It works perfectly fine when I view it in the studio, though. ...
0
votes
1
answer
478
views
In my Roblox Tycoon game, my button is not working
I am a rookie at Lua and Roblox Studio in general. I am attempting an easy and reasonably simple tutorial on how to make a pretty good looking tycoon game. In my "Core" script, I am ...
0
votes
1
answer
180
views
Why check the ball and brick collision twice?
I watched https://www.youtube.com/watch?v=F86edI_EF3s.
I believe the following code is the complete code
https://github.com/games50/breakout/tree/master/breakout13
And
https://github.com/games50/...