Rants + suggestions

General discussion about LÖVE, Lua, game development, puns, and unicorns.
spectralcanine
Citizen
Posts: 65
Joined: Sat Dec 22, 2012 8:17 am

Re: Rants + suggestions

Post 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.
User avatar
raidho36
Party member
Posts: 2063
Joined: Mon Jun 17, 2013 12:00 pm

Re: Rants + suggestions

Post 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.
User avatar
markgo
Party member
Posts: 190
Joined: Sat Jan 05, 2013 12:21 am
Location: USA

Re: Rants + suggestions

Post 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".
User avatar
raidho36
Party member
Posts: 2063
Joined: Mon Jun 17, 2013 12:00 pm

Re: Rants + suggestions

Post by raidho36 »

OMFG WOW. I didn't payed any attention to that code, but now I did, and OMG is it ineffective. :rofl: Now I'm completely convenient about Dunning-Kruger thing.
spectralcanine
Citizen
Posts: 65
Joined: Sat Dec 22, 2012 8:17 am

Re: Rants + suggestions

Post 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. :rofl: 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.
User avatar
raidho36
Party member
Posts: 2063
Joined: Mon Jun 17, 2013 12:00 pm

Re: Rants + suggestions

Post 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".
spectralcanine
Citizen
Posts: 65
Joined: Sat Dec 22, 2012 8:17 am

Re: Rants + suggestions

Post 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.
User avatar
Ref
Party member
Posts: 702
Joined: Wed May 02, 2012 11:05 pm

Re: Rants + suggestions

Post 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!
Attachments
atlas_demo.love
An example of Santos' atlas code
(152.07 KiB) Downloaded 124 times
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 2 guests