Search found 1938 matches

by raidho36
Thu Dec 05, 2019 9:20 pm
Forum: General
Topic: Help with shaders
Replies: 3
Views: 71

Re: Help with shaders

You don't need shaders for this, you can accomplish such effect by drawing glow effect into sprites, or rendering glow sprites over normal sprites. If you insist on using shaders, you 1) take the base scene image and subtract some value fixed from all color components, multiply the remaining values ...
by raidho36
Sun Dec 01, 2019 1:54 am
Forum: Support and Development
Topic: Managing bullet object lists
Replies: 3
Views: 286

Re: Managing bullet object lists

Bullet = Class ( ) function Bullet:init ( x, y, damage, ... ) bulletpool = Pool ( Bullet ) newbullet = bulletpool ( x, y, damage, ... ) bulletpool:push ( deadbullet ) Also my mistake. The "uarray.lua" datastructure has additional bookkeeping to prevent duplicate objects in it so you don't need to w...
by raidho36
Fri Nov 29, 2019 1:42 pm
Forum: Support and Development
Topic: Turning off VSync
Replies: 5
Views: 284

Re: Turning off VSync

In this day and age you really shouldn't make games that run at constant framerate, especially if it's below modern framerates (i.e. 144 and 240). Instead you should use the dt value to advance time-dependent variables (be careful around acceleration though - that requires additional steps). But if ...
by raidho36
Fri Nov 29, 2019 1:37 pm
Forum: Support and Development
Topic: 2 gamepad issue
Replies: 4
Views: 311

Re: 2 gamepad issue

How would I fix that? You don't. You can work around it, however. For example, your input settings manager can remember exactly which controller the bindings belong to (by GUID or by USB VID/PID values) so it would pick up that specific controller. Or you can prompt user to specify which controller...
by raidho36
Fri Nov 29, 2019 3:05 am
Forum: Support and Development
Topic: Turning off VSync
Replies: 5
Views: 284

Re: Turning off VSync

In Lua, everything except "nil" and "false" resolves to "true". You need to specifically set it to "false".

Check if your GPU settings enforces vsync for all games.
by raidho36
Thu Nov 28, 2019 11:08 pm
Forum: Support and Development
Topic: 2 gamepad issue
Replies: 4
Views: 311

Re: 2 gamepad issue

That's probably because your gamepad "1" appears as 2nd when two of them are connected.
by raidho36
Thu Nov 28, 2019 8:54 am
Forum: Support and Development
Topic: Managing bullet object lists
Replies: 3
Views: 286

Re: Managing bullet object lists

You can put all your dead bullets on a stack. That way, any bullet at all from that stack is guaranteed to be dead (so this variable isn't needed anymore), and you can just remove one from the tail, which is a very fast operation. The list of live bullets might be a gapless array - a regular array w...
by raidho36
Wed Nov 27, 2019 10:48 pm
Forum: Support and Development
Topic: Help with making a class library
Replies: 3
Views: 222

Re: Help with making a class library

Take a look at my class library. It has all the basic features, some additional stuff, and can bind FFI datatypes to classes.
https://bitbucket.org/rcoaxil/lua-minil ... /class.lua
by raidho36
Wed Nov 27, 2019 5:49 am
Forum: Support and Development
Topic: Controller not recognized as gamepad
Replies: 1
Views: 119

Re: Controller not recognized as gamepad

It's not recognized because it's not in the built-in SDL database of gamepads, on account of not being a first party controller. You can load community database of controllers for SDL, or you can simply set up the controller as a gamepad programmatically (you'd probably want to save that data too). ...
by raidho36
Sat Nov 23, 2019 3:12 pm
Forum: Support and Development
Topic: Is it possible to make a file explorer?
Replies: 5
Views: 312

Re: Is it possible to make a file explorer?

It is totally possible without touching the C++ side... but it's not simple. There are a few ways to access the filesystem apart from the love.filesystem stuff (lua's own io which has quite some limitations, using luafilesystem which requires binaries, or using my soon to be released lib which chea...