Page 3 of 3

Re: Mr. BallGuy 2!!!! ***V0.1.1 ALPHA***

Posted: Sun Jun 23, 2013 4:20 pm
by SneakySnake
For me, the game starts to become really slow when the score is higher than the highscore.
I wondered why, so I looked into the source code.

You are doing filesystem input/output every frame, which is not a good thing.

Code: Select all

function love.update(dt)
   ...
        
	if player.score > tonumber(player.highscore) then 
		player.highscore = player.score
		lf.write("highscores.lua", "player.highscore\n=\n" .. player.score)
		lf.read("highscores.lua")
	end
	lf.read("highscores.lua")
	lf.read("coin.lua")

   ...
It can be a major bottleneck, especially if the user doesn't have a really fast disk.
Ideally, you shouldn't do any filesystem operations in love.update(). It would be enough to update the high score when the player dies, for example.

Re: Mr. BallGuy 2!!!! ***V0.1.1 ALPHA***

Posted: Tue Jun 25, 2013 1:22 pm
by Eamonn
SneakySnake wrote:For me, the game starts to become really slow when the score is higher than the highscore.
I wondered why, so I looked into the source code.

You are doing filesystem input/output every frame, which is not a good thing.

Code: Select all

function love.update(dt)
   ...
        
	if player.score > tonumber(player.highscore) then 
		player.highscore = player.score
		lf.write("highscores.lua", "player.highscore\n=\n" .. player.score)
		lf.read("highscores.lua")
	end
	lf.read("highscores.lua")
	lf.read("coin.lua")

   ...
It can be a major bottleneck, especially if the user doesn't have a really fast disk.
Ideally, you shouldn't do any filesystem operations in love.update(). It would be enough to update the high score when the player dies, for example.
Lol I thought I setup a done_once variable to handle this. Thanks!

Re: Mr. BallGuy 2!!!! ***V0.1.1 ALPHA***

Posted: Wed Jun 26, 2013 12:03 am
by qaisjp
I'm not very impressed with this table-flippable !!!!!! version 2 !!!!!!.
I mean you haven't changed much, nothing new is introduced. The usage of versions in this game makes it look like its a pro game, but it's not half as good as a pro game. All I can say is that he has progressed from when he first joined.

Here is some advice: You've made your first game. You're impressed with yourself but everyone else who aren't your best friends thinks it is crap. Everyone's first game is a pile of rubbish. But you're learning. You'll improve periodically as everyone does. Try a new project. Your first project won't be a hit.

Re: Mr. BallGuy 2!!!! ***V0.1.1 ALPHA***

Posted: Wed Jun 26, 2013 12:09 am
by NightKawata
The first Mr. Ballguy was okay, especially for a first project.
This one, I don't like as much. It tries to be new but it doesn't feel fresh, more like an expansion to the first with a different perspective.