Page 2 of 2
Re: Rants + suggestions
Posted: Sat Jun 29, 2013 6:19 pm
by spectralcanine
If your code is too slow to process X seconds of game logic in less than X real seconds, then your code is bad, so I don't see how that's related.
You did not read that article, nor did you read the code example, apparently, because what you are writing just isn't correct.
My baseless assumptions were that I can count seconds with delta time. I think that's kind of /the point/ of it existing - measuring time. Having a higher resolution timer has nothing to do with this, it would still change over time.
Re: Rants + suggestions
Posted: Sat Jun 29, 2013 6:42 pm
by raidho36
Okay, I actually read the article. Before I did to me it looked like you propose some advanced overblown methods to deal with simple problems, just not good enough. Now, to me it looks that you had zero knowledge on the topic in question and then read some random-noname-man's-on-the-internet article and now you're super-convenient that your (his) points are super-valid.
Danning - Kruger effect.
Re: Rants + suggestions
Posted: Sat Jun 29, 2013 6:49 pm
by markgo
I personally never felt the need to do all that fancy stuff with fixed timestep. I just set a timestep limit to prevent things flying offscreen. Something as simple as dt = math.max(dt,1/30) usually does the job.
As for the tile map thing. Why not use tables so you can access like tile = map[x][y]? Your method makes it difficult to iterate through a map because the coordinates are stored as "x,y".
Re: Rants + suggestions
Posted: Sat Jun 29, 2013 7:14 pm
by raidho36
OMFG WOW. I didn't payed any attention to that code, but now I did, and OMG is it ineffective.
Now I'm completely convenient about Dunning-Kruger thing.
Re: Rants + suggestions
Posted: Sat Jun 29, 2013 8:27 pm
by spectralcanine
markgo wrote:As for the tile map thing. Why not use tables so you can access like tile = map[x][y]? Your method makes it difficult to iterate through a map because the coordinates are stored as "x,y".
You can do that.
raidho36 wrote:Okay, I actually read the article. Before I did to me it looked like you propose some advanced overblown methods to deal with simple problems, just not good enough. Now, to me it looks that you had zero knowledge on the topic in question and then read some random-noname-man's-on-the-internet article and now you're super-convenient that your (his) points are super-valid.
Danning - Kruger effect.
raidho36 wrote:OMFG WOW. I didn't payed any attention to that code, but now I did, and OMG is it ineffective.
Now I'm completely convenient about Dunning-Kruger thing.
What a funny guy. Do explain yourself, because so far you didn't make much sense (and no, trying to troll online isn't validating anything).
It's not advanced and not overblown, but it does deal with a simple problem.
Re: Rants + suggestions
Posted: Sat Jun 29, 2013 8:56 pm
by raidho36
Dude, seriously. I wasn't meant to get your butt hurt, but it just looks like what I said. Besides, you didn't even make a slightest attempt at getting my points, which are 1) perfectly valid and 2) make reasonable argument against. Approach you suggested has big flaws, too, and using it is a subject for big all-around debate, not just "it's cooler that way, let's employ it".
Re: Rants + suggestions
Posted: Sat Jun 29, 2013 11:33 pm
by spectralcanine
raidho36 wrote:Dude, seriously. I wasn't meant to get your butt hurt, but it just looks like what I said. Besides, you didn't even make a slightest attempt at getting my points, which are 1) perfectly valid and 2) make reasonable argument against. Approach you suggested has big flaws, too, and using it is a subject for big all-around debate, not just "it's cooler that way, let's employ it".
I wrote multiple times already, I don't understand the flaws you keep writing. Can you give an example?
It's not "cooler", it solves a problem that I faced, and that lurks in any time based movement.
Using a high resolution timer here doesn't change the fact that some X time passed between frames, and this X is just not the same on every frame.
Re: Rants + suggestions
Posted: Tue Jul 16, 2013 4:55 pm
by Ref
[quote="Santos"]Oops, sorry about that!
quote]
Your code is really quite nice.
Makes creating and using a spritesheet (atlas) really easy.
Rearranged things a bit so that to create an atlas all that is needed is:
Code: Select all
local at = require 'atlas'
function love.load()
at.make( 'stickmen' )
end
function love.update()
at.update()
end
function love.draw()
love.graphics.draw( at.sheet )
end
function love.keypressed( key )
if key == 'escape' then love.event.push( 'quit' ) end
at.keypressed( key ) -- save spritesheet when 's' key pressed
end
and to draw a selected (sel) image from the atlas:
Code: Select all
at.load('spritesheet2.png','geometry2.txt')
love.graphics.drawq( at.sheet, at.geometries[sel], 730, 530, 0, 1, 1, at.size[sel][1]/2, at.size[sel][2]/2 )
Really neat code - good work Santos!