Search found 192 matches

by trubblegum
Wed Apr 11, 2012 9:47 pm
Forum: Support and Development
Topic: What is the easiest/simplest gui library to implement?
Replies: 11
Views: 4166

Re: What is the easiest/simplest gui library to implement?

The two I've used are Quickie ( https://love2d.org/wiki/Quickie ) and my own ( https://github.com/trubblegum/Gspot ). I'd say they're equally easy to implement. My docs are still a little shaky on some of the finer details until I get around to updating them (basic implementation has not changed sin...
by trubblegum
Tue Apr 10, 2012 11:21 am
Forum: Games and Creations
Topic: NetWars - beta
Replies: 48
Views: 46826

Re: NetWars - beta

Sorry .. don't really have time to go into it beyond "Are you sure you want to be doing that with love.run?" and reiterating this : viewtopic.php?p=54052#p54052, substituting "events" with "states".
by trubblegum
Mon Apr 09, 2012 10:15 pm
Forum: Games and Creations
Topic: NetWars - beta
Replies: 48
Views: 46826

Re: NetWars - beta

Good to know .. I'll take a look at the code tomorrow and see if I can come up with any useful suggestions.
by trubblegum
Mon Apr 09, 2012 2:10 pm
Forum: Games and Creations
Topic: NetWars - beta
Replies: 48
Views: 46826

Re: NetWars - beta

Freezes on startup when I run in 0.8.0
by trubblegum
Thu Apr 05, 2012 1:55 pm
Forum: Support and Development
Topic: A Saving Lib? [SOLVED]
Replies: 24
Views: 10140

Re: A Saving Lib?

What's wrong with love.filesystem?
Using something like TSerial, it's as simple as :

Code: Select all

local savedata = {...}
love.filesystem.write('save.sav', TSerial:pack(savedata))
local loaddata = TSerial:unpack(love.filesystem.read('save.sav'))
by trubblegum
Thu Apr 05, 2012 7:31 am
Forum: General
Topic: Text adventures & state machines (a newb approaches!)
Replies: 16
Views: 12345

Re: Text adventures & state machines (a newb approaches!)

Very limited time today, but in short : Not worth it - try this : viewtopic.php?p=53634#p53634
by trubblegum
Thu Apr 05, 2012 7:29 am
Forum: Support and Development
Topic: Gamestate problem
Replies: 2
Views: 3465

Re: Gamestate problem

The simplest way seems to be to recreate the way LÖVE does it. Something like : state = {} state.menu = {} state.menu.load = function(this) currentstate = this end state.menu.update = function(dt) ... end state.menu.draw = function() ... end state.battle = {} state.battle.load = function(this) curre...
by trubblegum
Wed Apr 04, 2012 5:24 am
Forum: Support and Development
Topic: Metatables, getting the name of the value you set.
Replies: 6
Views: 2212

Re: Metatables, getting the name of the value you set.

Assigning globals in a constructor is bad.

Code: Select all

letters = {}

letter = {}
letter.new = function(this, character) return setmetatable({character = character}, {__index = this}) end -- presumably
setmetatable(letter, {__call = letter.new})

letters.asterisk = letter('*')
by trubblegum
Wed Apr 04, 2012 5:07 am
Forum: Support and Development
Topic: Can't make a bullet
Replies: 9
Views: 4517

Re: Can't make a bullet

I would do : actions = {} actions.shoot = {key = 'z', repeat = 0.25, dt = 0, func = function() table.insert(bullets, bullet()) end} love.update = function(dt) for i, action in pairs(actions) do action.dt = action.dt + dt if love.keyboard.isDown(action.key) and action.dt >= action.repeat then action....
by trubblegum
Tue Apr 03, 2012 10:08 pm
Forum: Libraries and Tools
Topic: Quick and dirty vector class
Replies: 10
Views: 4570

Re: Quick and dirty vector class

Not sure what you mean, but you're free to use it as you see fit.