Search found 36 matches

by rok
Sat Aug 27, 2016 7:53 pm
Forum: Libraries and Tools
Topic: LuaTable A small library to convert tables back to lua code
Replies: 5
Views: 8500

Re: LuaTable A small library to convert tables back to lua code

For table.concat you insert all the strings you'd like to combine in a table and do one concatenation at the end instead of many in between using .. It is a BIG performance booster in case you do lots of string merging. I've tried both in a compression algorithm and using table.concat it was a lot f...
by rok
Sat Aug 27, 2016 7:45 pm
Forum: Support and Development
Topic: mousepressed and print
Replies: 6
Views: 4221

Re: mousepressed and print

Works great on 0.10.1 on Linux.

Did you run the game via the console to see the output?
by rok
Fri Jun 24, 2016 8:08 pm
Forum: Support and Development
Topic: Android SDK Installation
Replies: 4
Views: 3775

Re: Android SDK Installation

So I've tried building again after installing a few more packages. If I check "Obsolete" the "Android Support Library" shows up under Extras. The current build files from the repository want me to use API 23, so 19 seems to be outdated as stated in the guide. I am also getting an...
by rok
Fri Jun 24, 2016 6:19 pm
Forum: Support and Development
Topic: Android SDK Installation
Replies: 4
Views: 3775

Android SDK Installation

The Linux guide for Android (https://bitbucket.org/MartinFelis/love-android-sdl2/wiki/Building_L%C3%96VE_for_Android_-_Linux) seems to be a bit outdated (Updated 2015-12-01) so I have some questions. I am using Arch Linux. I've already installed: - Java SDK - Android SDK - Apache Ant I also have tho...
by rok
Thu Dec 17, 2015 8:36 pm
Forum: General
Topic: Serial Communication > String to Array of Floats
Replies: 6
Views: 4291

Re: Serial Communication > String to Array of Floats

Damn, how that I didn't try this before :o:

Thank you :ultrahappy:
by rok
Thu Dec 17, 2015 8:00 pm
Forum: General
Topic: Serial Communication > String to Array of Floats
Replies: 6
Views: 4291

Re: Serial Communication > String to Array of Floats

Doesn't seem to be working :cry:

I took an example from Wikipedia which should give 0.15625

00111110 00100000 00000000 00000000 or in character numbers 62 32 0 0

My own function gives me the right number, ffi.cast("float *", x) does not.
by rok
Thu Dec 17, 2015 4:41 pm
Forum: General
Topic: Serial Communication > String to Array of Floats
Replies: 6
Views: 4291

Re: Serial Communication > String to Array of Floats

Could work. I'm trying something with ffi.cast . For example I'd like to convert "aabb" to a float. ffi.cast("float", "aabb") does not work, ffi.cast("float*", "aabb") gives me a cdata float pointer, for which I don't know how to get the value from. ...
by rok
Thu Dec 17, 2015 11:14 am
Forum: General
Topic: Serial Communication > String to Array of Floats
Replies: 6
Views: 4291

Serial Communication > String to Array of Floats

I'm using https://github.com/vsergeev/lua-periphery to read serial data received from a microcontroller which sends float data. However lua-periphery only enables me to receive data in a string format (as far as I know). Currently I'm 1. receiving those characters 2. spliting them in strings of 4 (a...
by rok
Fri Dec 04, 2015 5:26 pm
Forum: Support and Development
Topic: Negative color
Replies: 4
Views: 4975

Re: Negative color

You could maybe achieve something like this using two images for example. One for the background and one for the text or whatever. ImageData has https://love2d.org/wiki/ImageData:setPixel and https://love2d.org/wiki/ImageData:getPixel If you keep the starting position of both images (top left corner...