Search found 62 matches

by stout
Sun Jan 05, 2014 5:26 pm
Forum: Support and Development
Topic: [SOLVED] Key rebinding issue
Replies: 4
Views: 2012

Re: Key rebinding issue

Thanks! I'm still not 100% on why it's happening that way but I can poke at it more 'til I understand it.
by stout
Sun Jan 05, 2014 5:47 am
Forum: Support and Development
Topic: [SOLVED] Key rebinding issue
Replies: 4
Views: 2012

Re: Key rebinding issue

love.keypressed is called whenever a key is pressed. It's not something that loops or runs every frame unless you tell it to. You'd want to have a separate condition to check that the next keypress is going to be stored, so when you press 'b' set a flag so that the next keypress is the one that's s...
by stout
Sun Jan 05, 2014 12:55 am
Forum: Support and Development
Topic: [SOLVED] Key rebinding issue
Replies: 4
Views: 2012

[SOLVED] Key rebinding issue

function love.load() optbox = { x = 240, y = 70, xmin = 240, xmax = 490, ymin = 70, ymax = 270 } -- ending optbox whichkey = "up" -- move these later! don't need to be global whichkeyindex = 1 -- move these later! don't need to be global rebinding = "no" rebindingState = "key" controlsGame = { key ...
by stout
Fri Jan 03, 2014 11:05 pm
Forum: General
Topic: Get all keys currently pressed
Replies: 15
Views: 3108

Re: Get all keys currently pressed

Forget about love.keyboard. Use [wiki]love.keypressed[/wiki] and [wiki]love.keyreleased[/wiki] to update a table instead. Example (download and change extension to .zip to see the contents): keys_pressed.love Note that the amount of simultaneously pressed keys is limited to between 3 and 6 - that's...
by stout
Sat Feb 02, 2013 3:37 pm
Forum: General
Topic: Recommendations for a love2d development netbook?
Replies: 4
Views: 1562

Re: Recommendations for a love2d development netbook?

Thanks for the tips! I'd heard something about netbooks being on the way out, but didn't realize it was going to be so abrupt. I'll check the links out and see what'll work for me.
by stout
Sat Feb 02, 2013 1:34 am
Forum: General
Topic: Recommendations for a love2d development netbook?
Replies: 4
Views: 1562

Recommendations for a love2d development netbook?

I'd like a small, very portable, CHEAP netbook for doing love2d development and testing on. Anyone have recommendations? I have an iPad I use for most all of my mobile needs, but I have downtime between classes and it'd be nice to work on my code. I don't really need a full-sized laptop right now, j...
by stout
Thu Jan 03, 2013 2:58 pm
Forum: Support and Development
Topic: [resolved] Simple function error
Replies: 1
Views: 366

Re: Simple function error

Still have no idea what's causing this.
by stout
Tue Jan 01, 2013 8:11 pm
Forum: Support and Development
Topic: [resolved] Simple function error
Replies: 1
Views: 366

[resolved] Simple function error

RESOLVED: was calling propulationGeneration() wrong at one point, threw things off. Thanks Boolsheet! Issue is in popgen.lua. The trip is at line 27 (the line: populationMapData[y][x][#populationMapData[y][x] + 1] = popID ) but the culprit is down in populationGeneration() function. If you collapse ...
by stout
Sat Dec 22, 2012 5:02 am
Forum: Games and Creations
Topic: Witchaven, the Roguelike
Replies: 27
Views: 8392

Re: Witchaven, the Roguelike

Yes, it could be dangerous. But the problem of making the movement in love.keypressed is that moving large corridors or places could be a bit tedious and the player would need to press the key to move a lot of times. So I decided the free movement could be better or more comfortable for moving. Hav...
by stout
Fri Nov 23, 2012 10:06 pm
Forum: Support and Development
Topic: Share your favourite helper functions
Replies: 48
Views: 6282

Re: Share your favourite helper functions

I don't know if this counts, and there is probably a better way to do this, but local total = 0 -- initialize/clear the variable for rowIndex, row in ipairs(worldMap) do for columnIndex, quadID in ipairs(row) do if quad ~= 1 then total = total + 1 -- increase total for every non-ocean tile end end e...