Page 38 of 180
Re: What's everyone working on? (tigsource inspired)
Posted: Fri Sep 21, 2012 5:27 pm
by KingRecycle
I'm challenging myself in creating an item generator.
Right now I'm creating 'templates' aka functions with a lot of love.graphics.print() functions.
I wanted to use string interpolation but all that did was made me confused and I wasn't sure how I would set the position of things and it was overall confusing for me.
Got the basic layout for a weapon.
Though I still haven't perfected on the resizing when some stuff isn't included.
Re: What's everyone working on? (tigsource inspired)
Posted: Fri Sep 21, 2012 6:42 pm
by Roland_Yonaba
Great. Keep up the good job.
KingRecycle wrote:
I wanted to use string interpolation but all that did was made me confused and I wasn't sure how I would set the position of things and it was overall confusing
Well, try my
Allen. Or at least, rip the function you need (see
line 263)
Code: Select all
function _.substitute(str,value) return (str:gsub('%${*([%w]+)}*',value)) end
--Example
print(_.subtitute('value = ${value}',100))
Re: What's everyone working on? (tigsource inspired)
Posted: Sat Sep 22, 2012 3:20 am
by KingRecycle
Roland_Yonaba wrote:Great. Keep up the good job.
KingRecycle wrote:
I wanted to use string interpolation but all that did was made me confused and I wasn't sure how I would set the position of things and it was overall confusing
Well, try my
Allen. Or at least, rip the function you need (see
line 263)
Code: Select all
function _.substitute(str,value) return (str:gsub('%${*([%w]+)}*',value)) end
--Example
print(_.subtitute('value = ${value}',100))
So if I wanted to run love.graphics.setColor() to change the color of specific text. How would I go about doing that?
Re: What's everyone working on? (tigsource inspired)
Posted: Sat Sep 22, 2012 9:23 am
by coffee
KingRecycle wrote:Roland_Yonaba wrote:Great. Keep up the good job.
KingRecycle wrote:
I wanted to use string interpolation but all that did was made me confused and I wasn't sure how I would set the position of things and it was overall confusing
Well, try my
Allen. Or at least, rip the function you need (see
line 263)
Code: Select all
function _.substitute(str,value) return (str:gsub('%${*([%w]+)}*',value)) end
--Example
print(_.subtitute('value = ${value}',100))
So if I wanted to run love.graphics.setColor() to change the color of specific text. How would I go about doing that?
Look, that's the an old text problem/dilemma in LOVE. Preserve string vs divided txt strings for each color. Best way is get a to implement some instring tags in you string and parse your text for coloring changes. Not easy and require some work. But not let stay off-topic here. Open a thread for it. Also search see Robin's Rich Text and litearc message dialog lib.
Re: What's everyone working on? (tigsource inspired)
Posted: Sat Sep 22, 2012 9:31 am
by Roland_Yonaba
KingRecycle wrote:So if I wanted to run love.graphics.setColor() to change the color of specific text. How would I go about doing that?
Oh in that case, as coffee said, Robin's
richText is probably what you're looking for.
Re: What's everyone working on? (tigsource inspired)
Posted: Sat Sep 22, 2012 11:38 am
by Robin
Yeah, that seems like a job for RichText. If you decide to use it, and you find a bug, please notify me, so I can fix it.
Re: What's everyone working on? (tigsource inspired)
Posted: Sat Sep 22, 2012 6:17 pm
by jonyzz
@KingRecycle: Where did you get that font? It looks wonderful.
Re: What's everyone working on? (tigsource inspired)
Posted: Sun Sep 23, 2012 6:17 pm
by Chèvre
Hi there,
So much impressive stuff from everyone!
Here's a screenshot of my first foray into LÖVE. (It's supposed to be pixel-doubled but I shrunk it so it doesn't take up too much space.)
Re: What's everyone working on? (tigsource inspired)
Posted: Sun Sep 23, 2012 6:18 pm
by Larsii30
Chèvre wrote:Hi there,
So much impressive stuff from everyone!
Here's a screenshot of my first foray into LÖVE. (It's supposed to be pixel-doubled but I shrunk it so it doesn't take up too much space.)
Looks good, what is to do in this game ?
Re: What's everyone working on? (tigsource inspired)
Posted: Sun Sep 23, 2012 6:31 pm
by Chèvre
Larsii30 wrote:Chèvre wrote:Hi there,
So much impressive stuff from everyone!
Here's a screenshot of my first foray into LÖVE. (It's supposed to be pixel-doubled but I shrunk it so it doesn't take up too much space.)
Looks good, what is to do in this game ?
You have to make rabbit stew
Hit rabbits with your giant carrot and aim for the saucepan.