Game behaves differently between 32bit and 64bit systems

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
User avatar
LeNitrous
Prole
Posts: 29
Joined: Tue Sep 08, 2015 3:25 am

Re: Game behaves differently between 32bit and 64bit systems

Post by LeNitrous »

pgimeno wrote:
LeNitrous wrote:32 bit Systems handles the delay correctly while 64 bit Systems completely ignore the delay.
I see a very similar density in my 32 bit screenshot and in your 64-bit screenshot, so I still don't see the problem.

What are the FPS of the 32-bit and the 64-bit machine? I'm currently using 60. Switching to 75 I don't see much of a change, though, but the pieces fall a bit faster, causing the impression of a reduced density.
The spawn density is one thing. Try moving the player (using Left and Right Arrow keys and Left Shift to Dash). The player moves fine in 32 bit but sloppy in 64 bit.
User avatar
zorg
Party member
Posts: 3465
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: Game behaves differently between 32bit and 64bit systems

Post by zorg »

Okay, so the very first issue i found is that you force full-screen at startup. (AT LEAST have the common courtesy of using "desktop" fullscreen instead of exclusive...) This is an issue, especially when asking others to test, since you can't know whether it'll mess up their multi-monitor desktops or not.
Second thing, if you choose to force that path, at least set up the keypressed callback to quit when i mashpress the escape button. It's not fun to alt-tab out of anything, hoping that clicking the tray to exit the game won't actually make it come back up.



That said, the updated .love file still has some positioning issues when playing it in 2560x1440, which is to be expected, as you stated above.
I edited conf.lua so it works in a window with the intended resolution, and on a 64bit win7, i can show you what i experience:
splash_.png
splash_.png (507.88 KiB) Viewed 2885 times
Even with the base resolution you have set in conf.lua, it's a bit off to the right.
gameplay.png
gameplay.png (1.46 MiB) Viewed 2885 times
That's how it looks ingame. I haven't yet checked anything else though, might dwelve just a bit deeper to see why it seems that architecture affects the game.

Edit: One potential mistake i might have found is that in game.lua, you call the entity update like this:

Code: Select all

ents:update(dt)
but in the entities file, the function has only one parameter, dt, but this way, you're passing ents itself as that argument. Fix is to just do

Code: Select all

ents.update(dt)
instead... though it's a bit more involved why it's wrong and how it could be fixed better.

Edit #2: The below code in your object.lua

Code: Select all

function ent:update(dt)
	--self.y = self.y + (self.multiplier/2)*2.5
	self.y = self.y + 50*love.timer.getDelta()
	if (self.y >= 768+64) then
		ents.remove( self.id )
	end
end
With the fix i wrote above in my first edit, you can use dt instead of love.timer.getDelta() there, since, that's kinda the whole point of it :3

...and you still dont multiply the player(.lua) values with dt in its own update function.
Me and my stuff :3True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
User avatar
LeNitrous
Prole
Posts: 29
Joined: Tue Sep 08, 2015 3:25 am

Re: Game behaves differently between 32bit and 64bit systems

Post by LeNitrous »

zorg wrote:-snipped
EDIT: That fixes the game update part. As for the system architecture thing to why the game runs slow... No progress.
Included an update for testing. ESC to quit the game. ENTER to start.
EDIT: Sent out a wrong update. Fixed it.
Attachments
Catch_71016d.love
(6.86 MiB) Downloaded 89 times
User avatar
zorg
Party member
Posts: 3465
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: Game behaves differently between 32bit and 64bit systems

Post by zorg »

As i said before,
zorg wrote: Edit: One potential mistake i might have found is that in game.lua, you call the entity update like this:

Code: Select all

ents:update(dt)
but in the entities file, the function has only one parameter, dt, but this way, you're passing ents itself as that argument. Fix is to just do

Code: Select all

ents.update(dt)
instead... though it's a bit more involved why it's wrong and how it could be fixed better.
That was the cause of that problem.

Edited .love:
Catch_71016c.love
(6.86 MiB) Downloaded 101 times
Me and my stuff :3True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
User avatar
LeNitrous
Prole
Posts: 29
Joined: Tue Sep 08, 2015 3:25 am

Re: Game behaves differently between 32bit and 64bit systems

Post by LeNitrous »

zorg wrote:As i said before,
zorg wrote: Edit: One potential mistake i might have found is that in game.lua, you call the entity update like this:

Code: Select all

ents:update(dt)
but in the entities file, the function has only one parameter, dt, but this way, you're passing ents itself as that argument. Fix is to just do

Code: Select all

ents.update(dt)
instead... though it's a bit more involved why it's wrong and how it could be fixed better.
That was the cause of that problem.

Edited .love:
Catch_71016c.love
I did replace it in my game.lua. No progress.
I'm more concerened about to why 32 bit system handle the spawning of falling objects better than 64 bit systems.
I tested it on both architectures, 32 bit runs fine but 64 bit runs slow.
User avatar
ivan
Party member
Posts: 1915
Joined: Fri Mar 07, 2008 1:39 pm
Contact:

Re: Game behaves differently between 32bit and 64bit systems

Post by ivan »

Code: Select all

Timer.every(0.05, function() ents.Create( "object", math.random(bounds.x1+16,bounds.x2-16), -100 ) end)
No way to guarantee that this function would be called every 0.05 seconds.
The smaller the timer interval gets, the greater the percentage of error.
Again, you have to use "dt" if you want to be 100% sure that the effects look the same on all platforms.
An alternative would be to create all of your objects at once and add a small "delay" to each one.
Post Reply

Who is online

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