Search found 63 matches

by Xugro
Sun Jan 31, 2016 5:07 pm
Forum: Support and Development
Topic: File I/O with bytes
Replies: 6
Views: 984

Re: File I/O with bytes

Your Code works on my machine. Have you looked in the right place (see: https://love2d.org/wiki/love.filesystem)? The file test.bin is not saved where the .love file is. You have to look in the save directory of love.
by Xugro
Tue Jan 26, 2016 8:17 pm
Forum: Support and Development
Topic: [Solved] Math.random creates a weird pattern
Replies: 5
Views: 780

Re: Math.random creates a weird pattern

Your idea of saving a sparse matrix is flawed. I just saved the full matrix and it works (see attached code). If you fill in 90% of the boxes then it is better to store the complete matrix. Edit: ipairs iterates over integer keys, starting from 1, until it finds one which is not in the table. Sourc...
by Xugro
Fri Jan 15, 2016 9:05 pm
Forum: Libraries and Tools
Topic: Graphoon (Now with online demo)
Replies: 13
Views: 3401

Re: Graphoon

It's not perfect either: First of all the runtime increases exponentially with each added node (I have an idea how to break it down using a spatial index, but haven't tried implementing one yet) and there still are some cases where the graph will "explode" or not form a nice layout. I have the same...
by Xugro
Thu Oct 29, 2015 11:49 pm
Forum: Support and Development
Topic: Detecting a mouse shake?
Replies: 3
Views: 596

Re: Detecting a mouse shake?

I wrote a small program, that should do the trick.

The idea behind it: If you are in an small enough area, then you are really shaking and not just moving the mouse around and getting back to the starting point. In my case I just made an rectangular approximation, but it does the job.
by Xugro
Sun Aug 16, 2015 1:00 am
Forum: Libraries and Tools
Topic: paintonline - online paint (for painting online)
Replies: 51
Views: 10949

Re: PENISDRAW - draw dicks with friends ONLINE!

my request: please share your custom stuff for automated drawing if you made something cool Here is my code for pasting images. Works with Version 2. Just add this to the love.keypressed function. if (not text and key=='p') then local saved_color = current_color current_width = math.max(current_wid...
by Xugro
Mon Aug 10, 2015 3:52 pm
Forum: Support and Development
Topic: Cards and tile-based playboard for rivals of catan
Replies: 5
Views: 1043

Re: Cards and tile-based playboard for rivals of catan

now i tried to include a 2-dimensional table, but i can't figure out why it doesn't work.. [...] but all they give back is "Tileset is not defined (value:nil)". You never declared the table Tileset . You must create the table first and fill it with images. also my cards have 4 sides with each a dif...
by Xugro
Sat Aug 08, 2015 6:20 pm
Forum: Support and Development
Topic: Fog of war
Replies: 3
Views: 1047

Re: Fog of war

Right now i have a working basic fog of war that light up the things around the player in a circle. But the problem is that i see thru walls. Anyone have any tips how to solve this? I have tried to loop thru all my tiles and check if they are behind the walls or not, but ended up with 1 fps. You do...
by Xugro
Mon Aug 04, 2014 7:29 pm
Forum: Libraries and Tools
Topic: Visualization of position space vs. velocity space
Replies: 1
Views: 740

Visualization of position space vs. velocity space

Hi guys, this is just a simple visualization of position space vs. velocity space. In the left side you see the balls jumping around as usual and in the right side you see their velocity. SpaceVsVelocity.png Controls: up : add a ball down : remove a ball left : slow down right : speed up s : reset s...
by Xugro
Sun Apr 20, 2014 9:41 am
Forum: General
Topic: Deriving from Löve
Replies: 6
Views: 1197

Re: Deriving from Löve

If you do not need Lua at all you should not use LÖVE as a basis. Take a look at SDL (Simple DirektMedia Layer) . Here is a overview of what SDL offers you: http://wiki.libsdl.org/Introduction#What_can_SDL_do.3F In short: You get cross-platform graphics, sound, IO, input and a few additional features.
by Xugro
Tue Feb 25, 2014 1:37 am
Forum: Support and Development
Topic: LÖVE GIF maker
Replies: 5
Views: 1463

Re: LÖVE GIF maker

Here is the official GIF specification (33 pages long): http://www.w3.org/Graphics/GIF/spec-gif89a.txt You "just" have to write an encoder. Then you can write the data to a file with love.filesystem.write . Lua-strings can handle the binary data without problems: Lua is eight-bit clean and so string...