Search found 80 matches

by alloyed
Sun Jan 28, 2018 11:41 pm
Forum: General
Topic: Hot reload plugin that actually works?
Replies: 49
Views: 8458

Re: Hot reload plugin that actually works?

It's interesting to read people claim that hotswapping is impossible when I've been doing it since forever~ I understand the point, that doing it for arbitrary lua code is impossible, but when you're the master of your own app you can apply the structure you need to make it work yourself. example he...
by alloyed
Fri Sep 29, 2017 1:18 am
Forum: Support and Development
Topic: Question about changing sprites
Replies: 3
Views: 816

Re: Question about changing sprites

I actually go one step further, I don't even keep sprites in objects: instead I have a sprite/animation manager that I pull from, and that has its own internal state to do, for example, switching between frames over time. then my draw methods look something like function player:draw() assert(Animati...
by alloyed
Sat Aug 26, 2017 6:09 am
Forum: Support and Development
Topic: Drawing to a canvas with a closed window.
Replies: 4
Views: 937

Re: Drawing to a canvas with a closed window.

depending on how much you control the OS you can use something like xvfb to make a "virtual" window. That said, with your example maybe software rendering could also work? Instead of using a canvas just edit your ImageData directly like so for iy = y, y + w - 1 do for ix = x, x + h - 1 do image:setP...
by alloyed
Fri Aug 25, 2017 1:00 am
Forum: General
Topic: Question about android development
Replies: 6
Views: 1614

Re: Question about android development

here is the specific adb command I've used in the past
this isn't nearly as instant as I liked but it worked

Code: Select all

adb push releases/mygame.love /sdcard/
adb shell am start -S -n "org.love2d.android/.GameActivity" -d "file:///sdcard/mygame.love"
by alloyed
Tue Aug 15, 2017 12:32 am
Forum: Libraries and Tools
Topic: ImGui LÖVE module
Replies: 167
Views: 92097

Re: ImGui LÖVE module

Does anyone know how to capture the button press against the 'X' (i.e. to close the window)? I've been looking into the docs and see that p_open is the second parameter in imgui.Begin() but it when i click it in my code it doesn't seem to have any effect/change the boolean value. This is in the one...
by alloyed
Tue Aug 15, 2017 12:14 am
Forum: Support and Development
Topic: Best way to convert a circle into a 'perspective'?
Replies: 2
Views: 791

Re: Best way to convert a circle into a 'perspective'?

This is called line-of-sight, or sometimes field-of-view.
Here's an article describing a few possible approaches, although it isn't the only approach out there:
http://www.redblobgames.com/articles/visibility/
by alloyed
Wed Aug 02, 2017 2:06 am
Forum: Support and Development
Topic: Draw and keypressed events inthe middle of a function
Replies: 2
Views: 680

Re: Draw and keypressed events inthe middle of a function

In a way this feels like giving a new driver the keys to an ultrafancy sports car, but the exact thing you are looking for is coroutines. http://lua.space/gamedev/using-lua-coroutines-to-create-rpg and here is an online discussion asking whether or not this is a "good" idea, and the subtle high-leve...
by alloyed
Mon Jul 31, 2017 4:47 am
Forum: Support and Development
Topic: Objects don't seem to interact properly moving beyond 4 pixels a tick
Replies: 1
Views: 536

Re: Objects don't seem to interact properly moving beyond 4 pixels a tick

approach 1: implement swept collisions, or steal a collision engine that does it for you approach 2: just increase the tickrate until it stops being a problem :p approach 1.5: instead of increasing the tickrate of the entire game, do "subticks" where you lerp between the old tick and the new one, so...
by alloyed
Tue Jul 04, 2017 1:29 am
Forum: General
Topic: Looking for feedback on a Lua tutorial
Replies: 7
Views: 1905

Re: Looking for feedback on a Lua tutorial

I don't have a real complaint, but more of a difference of opinion I guess While I def value computer literacy, I think (for me at least) the single least interesting thing about programming is the part where you wrestle with your OS or tools to get them to do the thing you want them to. Starting ou...
by alloyed
Mon Jul 03, 2017 2:05 pm
Forum: Support and Development
Topic: UDP hole punching
Replies: 16
Views: 4700

Re: UDP hole punching

If you have a server you'd like to proxy through, then you don't need NAT punching because you can use the server rather than connecting to each peer directly so instead of the data going peer <--> peer you do peer <--> server <--> peer on the server side this just means when you recieve a message a...