Search found 11 matches
- Tue Jun 09, 2020 10:29 am
- Forum: Support and Development
- Topic: Server on Love
- Replies: 10
- Views: 10627
Re: Server on Love
Someone recommended me sock.lua once from this person https://github.com/camchenry/sock.lua . If you don't want to handle too much on low level, this is a good way to start with, as it has the basics one needs for server-client solutions. I can even talk to you over discord when I have some time to ...
- Mon Jun 08, 2020 3:06 am
- Forum: Support and Development
- Topic: [SOLVED] Table referenced between scripts is "nil". Why?
- Replies: 4
- Views: 8884
Re: Table referenced between scripts is "nil". Why?
floorplan is local and not returned anywhere, so it's not accessible outside the scope where it's declared. You need to add home.floorplan = floorplan before you return the home table. And if he did it somewhere in case, there is also a syntax error. There is an r missing in 'home.flooplan' on line...
- Sun Jun 07, 2020 10:27 am
- Forum: Support and Development
- Topic: i need help making a trail for the ball in my game of pong
- Replies: 4
- Views: 10799
Re: i need help making a trail for the ball in my game of pong
You can also add 3 more balls behind the original one that move with it. You can simply make the ones following more transparent than the original one to make them look like a trail. You can also make the trail longer, the higher speed the actual ball reaches.
- Wed Jun 03, 2020 1:46 pm
- Forum: Support and Development
- Topic: Implementation of overriding functions but keeping previous functionality
- Replies: 8
- Views: 9337
Re: Implementation of overriding functions but keeping previous functionality
I'd use metatables because it makes this whole OOP thing infinitely simpler in lua. Also allows you to call the original parent class' methods if you want to (super or whatever you'd want to name it) Or really any other table... also, you are not separating class stuff and instance stuff either... ...
- Wed Jun 03, 2020 11:22 am
- Forum: Support and Development
- Topic: Implementation of overriding functions but keeping previous functionality
- Replies: 8
- Views: 9337
Re: Implementation of overriding functions but keeping previous functionality
Thanks for the suggestion.
Now there's also a problem that comes with it:
The next inheritance will have yet another abstractUpdate2(dt). I'm trying to avoid having so many update functions, that stack on the same name and grow like a long list.
Is there really no way around it?
Now there's also a problem that comes with it:
The next inheritance will have yet another abstractUpdate2(dt). I'm trying to avoid having so many update functions, that stack on the same name and grow like a long list.
Is there really no way around it?
- Wed Jun 03, 2020 10:38 am
- Forum: Support and Development
- Topic: Implementation of overriding functions but keeping previous functionality
- Replies: 8
- Views: 9337
Implementation of overriding functions but keeping previous functionality
Hello, I've been stumbling in some of my more bigger projects into a big problem. I use OOP to keep my code sorted and come across no big deal on smaller classes I am creating. What comes off as a big problem though is keeping the functionality of the old function I want to override. Whenever I impl...
- Tue Jul 09, 2019 1:34 pm
- Forum: Support and Development
- Topic: e-net: host not working with external IP adress on port forwarding
- Replies: 3
- Views: 7900
Re: e-net: host not working with external IP adress on port forwarding
It's not working because you're using a "invalid" IP to listen to in your machine. Your router must manage NAT, so your router must have a public IP and any device connected to it have a private IP. Your computer have a private IP, so there's no such interface with your public (external) ...
- Fri Jun 14, 2019 10:31 am
- Forum: Support and Development
- Topic: e-net: host not working with external IP adress on port forwarding
- Replies: 3
- Views: 7900
e-net: host not working with external IP adress on port forwarding
Whenever I try to use my external IP adress to let people from outside connect to my small chat program example, I get the error: Error main.lua:20: attempt to index global 'host' (a nil value) Traceback main.lua:20: in function 'update' [C]: in function 'xpcall' -> I've tried looking for a solution...
- Wed May 29, 2019 3:33 pm
- Forum: Support and Development
- Topic: Code improvement (First time Lua-enet)
- Replies: 7
- Views: 7758
Re: Code improvement (First time Lua-enet)
A huge thanks for the feedback, TheHUG! -> I actually have never heard in my entire hobby coding life, that the 80 character per line "rule" exists. I will definitly take this into condidiration for my future projects I want to tackle on. -> I use Zerobrane Studios as my current editor.. b...
- Tue May 28, 2019 7:18 pm
- Forum: Support and Development
- Topic: Code improvement (First time Lua-enet)
- Replies: 7
- Views: 7758
Re: Code improvement (First time Lua-enet)
So far, it was a fine experience, especially since the documentary is in my opinion described better than in luasocket. The first real problem I encountered is the following: When testing it out and letting someone else connect through my external IP to host the game, at some point sooner or later, ...