Search found 403 matches

by HugoBDesigner
Tue Sep 20, 2016 5:37 am
Forum: Support and Development
Topic: "Questions that don't deserve their own thread" thread
Replies: 905
Views: 112564

Re: "Questions that don't deserve their own thread" thread

Well, I did something that could be of use for you. Don't mind me, I always overdo things when it comes to coding (I'm looking at you Simple Path Animation):
Scroller.love
LÖVE 0.10.1
(1.59 KiB) Downloaded 58 times
EDIT: Use mouse and/or mousewheel, also click and escape
by HugoBDesigner
Mon Sep 12, 2016 1:04 am
Forum: General
Topic: Post-0.10.0 feature wishlist
Replies: 177
Views: 24318

Re: Post-0.10.0 feature wishlist

So basically the only way of doing the smoothing out would be to draw the same thing several times, one for each alpha value? EDIT: Slime beat me on posting that faster. Oh well, I could give the stencil+canvas trick a go, I guess. Thanks for the reply! It's a bit unfortunate that the GPU APIs are l...
by HugoBDesigner
Mon Sep 12, 2016 12:49 am
Forum: General
Topic: Post-0.10.0 feature wishlist
Replies: 177
Views: 24318

Re: Post-0.10.0 feature wishlist

So, I've been working with stencils quite a lot lately, and I was thinking: would it be possible for stencils to have some sort of "smoothness"? I mean, they're basically a "pixel map". If a value meets this "map", it'll be drawn full alpha (or whatever alpha value for that pixel is). But, would it ...
by HugoBDesigner
Sun Sep 11, 2016 1:16 am
Forum: Support and Development
Topic: [Solved] Differentiating 32 bits from 64 bits
Replies: 4
Views: 652

Re: [Solved] Differentiating 32 bits from 64 bits

Woah, I wrote a reply here but must have forgotten to send:

Thanks, pgimeno, for you reply! In fact, it seems like my problem is going to have a much simpler solution than what I was expecting!
by HugoBDesigner
Sun Sep 11, 2016 12:39 am
Forum: Support and Development
Topic: How to save tables in files
Replies: 10
Views: 1410

Re: How to save tables in files

Depends on the complexity of your table. Here's a small function to convert variables into string (doesn't work for self-containing tables or functions, so be aware of that!) function varToString(var) if type(var) == "string" then return "\"" .. var .. "\"" elseif type(var) ~= "table" then return to...
by HugoBDesigner
Sat Sep 10, 2016 10:45 pm
Forum: Support and Development
Topic: [Solved] Differentiating 32 bits from 64 bits
Replies: 4
Views: 652

[Solved] Differentiating 32 bits from 64 bits

Hello again! I'm making a maths program that deals with large numbers, and because of that I needed to know whether one's computer was 32 bits or 64 bits, so that way I can set myself the limit of the maximum value a number can reach. Is there a way of doing that via LÖVE or even just plain Lua?
by HugoBDesigner
Sat Sep 10, 2016 8:12 pm
Forum: General
Topic: Mini Functions Repository
Replies: 46
Views: 7248

Re: Mini Functions Repository

Yeah, it would, but it was mostly experimental. I already knew of table.sort, but figured I'd give it a try to see how it'd work. Speaking of that, I finally found the alphabetical organizer: it was in my Minigame Simulator all along :D function alphabetic_order(a, b) local g = "abcdefghijklmnopqrst...
by HugoBDesigner
Fri Sep 09, 2016 9:25 pm
Forum: General
Topic: Mini Functions Repository
Replies: 46
Views: 7248

Re: Mini Functions Repository

My bosses asked me to include Facebook and Twitter sharing stuff, and while they're mostly easy to do, I figured I'd share here so you guys can use it in your own games (they don't know I'm sharing this code shhhhh :rofl: ). function string:urlFormat() local s = string.gsub(self, " ", "%%20") s = st...
by HugoBDesigner
Thu Sep 08, 2016 3:20 am
Forum: Support and Development
Topic: [SOLVED]How to handle tile generation
Replies: 7
Views: 1149

Re: How to handle tile generation

If you want to use the 1d method suggested by Beelz, you will need to do some "converting": map = {} for i = 1, mapwidth*mapheight do map[i] = TILE end If you want to set a tile based on its coordinates, you'd do this: local i = x + (y-1)*mapwidth map[i] = PROPERTIES For the other way around (gettin...
by HugoBDesigner
Thu Sep 08, 2016 2:51 am
Forum: Support and Development
Topic: [SOLVED]How to handle tile generation
Replies: 7
Views: 1149

Re: How to handle tile generation

Before you can assign values to coordinates, you need to "lay" the ground. "map = {{}}" basically states you have a map with width 0 and height 0, which is definitely not the case. What you may want to do is assign each tile their values beforehand, that is, while loading the map: map = {} --Assigns...