Search found 63 matches

by Xugro
Mon Dec 26, 2016 9:07 am
Forum: Games and Creations
Topic: Video puzzle
Replies: 9
Views: 2983

Re: (buggy) video puzzle

The following function does some basic sanity tests to the file object you get from love.filedropped to see if it is in the supported format: Thank you very much! :) I hoped that there was an easier way to check this, but your solution should work pretty good. You still need to make some changes or...
by Xugro
Sun Dec 25, 2016 7:57 pm
Forum: Games and Creations
Topic: Video puzzle
Replies: 9
Views: 2983

Re: (buggy) video puzzle

Here is a new and faster version of the code. Take a look at the source if you like. The code should be easy to read. One more thing: a check for a stream format should be added. I.e. the app crashes when a wrong file format is dropped into it. That is still a thing I do not know how to do. Take a l...
by Xugro
Fri Sep 23, 2016 10:45 pm
Forum: Games and Creations
Topic: [WIP] ~ LANWolf - Mafia/Werewolf over LAN
Replies: 3
Views: 1280

Re: [WIP] ~ LANWolf - Mafia/Werewolf over LAN

Nice Idea! :)

I think it would be easier if you only make the server in Löve and the client in HTML+JS. Then people could just use their smartphones without installing extra software. They just have to enter the IP-adress or scan a QR-code from the server.
by Xugro
Fri Jul 22, 2016 4:53 pm
Forum: Support and Development
Topic: Inventory Management help [SOLVED]
Replies: 3
Views: 1018

Re: Inventory Management help

Plu explained your problem. I modified your code to show you a way to do it.
by Xugro
Sun Jun 19, 2016 12:44 am
Forum: Support and Development
Topic: Best way to detect long-press?
Replies: 4
Views: 925

Re: Best way to detect long-press?

Add a timer to the button and reset it if the player stops pressing it or if he moves the mouse/finger off the button. For a normal click use a shorter timer that triggers if the player stops pressing the button. See the attached code for an example.
by Xugro
Sun Jun 19, 2016 12:10 am
Forum: Games and Creations
Topic: Video puzzle
Replies: 9
Views: 2983

Video puzzle

Hi folks, I made a small and buggy video puzzle game. The goal is to drag and drop the pieces into the right position. The problem: the content of the puzzle pieces is changing :D. To play the game you have to drag and drop a ogg-theora video into the game. You can find a small one (~15MB) here: htt...
by Xugro
Sat Jun 18, 2016 9:22 pm
Forum: Support and Development
Topic: Puzzle help
Replies: 9
Views: 2010

Re: Puzzle help

You could take a look at my code. Just click on the piece you want to move. If you manage to get every piece into position it shows you the complete picture. The idea is that you look at which piece a player clicks. If the empty space is next to it, then you switch the places of the clicked piece an...
by Xugro
Mon Jun 13, 2016 10:52 pm
Forum: Support and Development
Topic: Getting folder contents with lua socket?
Replies: 5
Views: 774

Re: Getting folder contents with lua socket?

You can use directory listing and parse the output. For nginx - what you are using on your server - you can use this tutorial: http://nginxlibrary.com/enable-directory-listing/ With directory listing active, you can make an HTTP-request to the folder url and parse the HTML, that the server gives you...
by Xugro
Thu May 05, 2016 9:31 pm
Forum: General
Topic: Concise game implementations
Replies: 6
Views: 1293

Re: Concise game implementations

Graphical snake in 73 lines of code. There are magic numbers in there, but it should be easily understandable. Controls: arrow keys for moving Esc or q to quit There are no borders and the game restarts itself two seconds after losing it. My trimmed down version is just 51 lines of code long.
by Xugro
Sun Apr 24, 2016 12:52 pm
Forum: Games and Creations
Topic: My Own Tile Based Game
Replies: 3
Views: 1652

Re: My Own Tile Based Game

Works nicely. :) I just looked at the code and noticed two things: You reload a lot of images every time you use them. Just load them in love.load() and use them when you need them. You could use something like this: function love.load() -- load all images once and save them player.image["up"] = lov...