Roid Rage

Show off your games, demos and other (playable) creations.
help computer
Prole
Posts: 15
Joined: Tue Sep 20, 2011 1:07 pm

Re: Roid Rage

Post by help computer » Fri Sep 23, 2011 11:51 am

JDFight wrote:Yep - Changing line 15 of explosion.lua to :

Code: Select all

self.ps = lg.newParticleSystem(IMG, size * 100)
makes the game play much better on my machine - The framerate stays around 30fps when explosions are rendered on screen - (not optimal - but certainly playable - it is basically double the framerate I had before)
That... is not great. I haven't optimised anything yet though, so there is plenty of room for improvement yet.

I've added an options screen to change the size of explosions. Is it possible to change v-sync while running? I noticed turning this off gives a big boost, and I'd like to add an option in-game. Or otherwise, is there any downside to having v-sync disabled by default for everyone?
Furiously typing ned.
Roid Rage

Rad3k
Citizen
Posts: 69
Joined: Mon Aug 08, 2011 12:28 pm

Re: Roid Rage

Post by Rad3k » Fri Sep 23, 2011 1:31 pm

help computer wrote:I noticed turning this off gives a big boost, and I'd like to add an option in-game. Or otherwise, is there any downside to having v-sync disabled by default for everyone?
There are. VSync's main purpose is to avoid tearing, which happens when the game switches to the next frame, when the current one is just being drawn. It just looks ugly (upper part of the screen belongs to one frame and lower part to the next one, often with a visible seam between). As a side effect, VSync also binds your framerate to refresh rate of your screen (usually 60 Hz), so that may be the reason of the "boost" you get after turning it off.

help computer
Prole
Posts: 15
Joined: Tue Sep 20, 2011 1:07 pm

Re: Roid Rage

Post by help computer » Fri Sep 23, 2011 6:23 pm

I've updated the game and first post with all the suggestions so far, thanks for all the feedback guys.

V-sync I've disabled by default for now, but can be re-enabled easily in conf.lua.
Furiously typing ned.
Roid Rage

User avatar
tsturzl
Party member
Posts: 161
Joined: Fri Apr 08, 2011 3:24 am

Re: Roid Rage

Post by tsturzl » Fri Sep 23, 2011 9:29 pm

I'm using a total of 20 particle system in my game, as well as Box2D physics. The game never exceeds 10% CPU usage on my computer even if all systems are firing at once, and there are several collisions. Nor does the game ever swoop below 60FPS(which is the fps limit).

My artist, who is running at significantly lower specs, reported that he experiences no lag either.

Perhaps you could try and recycle objects rather than recreating them?

Also, I didn't experience any lag while playing it.

help computer
Prole
Posts: 15
Joined: Tue Sep 20, 2011 1:07 pm

Re: Roid Rage

Post by help computer » Fri Sep 23, 2011 10:20 pm

tsturzl wrote:I'm using a total of 20 particle system in my game, as well as Box2D physics. The game never exceeds 10% CPU usage on my computer even if all systems are firing at once, and there are several collisions. Nor does the game ever swoop below 60FPS(which is the fps limit).

My artist, who is running at significantly lower specs, reported that he experiences no lag either.

Perhaps you could try and recycle objects rather than recreating them?

Also, I didn't experience any lag while playing it.
Good idea. Recyling is definitely something I'll try with the asteroids once I start optimising.

BTW I added a video in the first post of me playing. Badly. :crazy:
Furiously typing ned.
Roid Rage

User avatar
kraftman
Party member
Posts: 277
Joined: Sat May 14, 2011 10:18 am

Re: Roid Rage

Post by kraftman » Sat Sep 24, 2011 4:29 pm

What version of love is this meant for? I get an error (attempt to index setColor line 17 explosions.lua) after a couple of seconds of playing it using both 0.72 and 0.8.

help computer
Prole
Posts: 15
Joined: Tue Sep 20, 2011 1:07 pm

Re: Roid Rage

Post by help computer » Sat Sep 24, 2011 6:41 pm

kraftman wrote:What version of love is this meant for? I get an error (attempt to index setColor line 17 explosions.lua) after a couple of seconds of playing it using both 0.72 and 0.8.
For 0.7.2, it's the only version I have.

Does it say where the previous calls comes from?
Furiously typing ned.
Roid Rage

User avatar
kraftman
Party member
Posts: 277
Joined: Sat May 14, 2011 10:18 am

Re: Roid Rage

Post by kraftman » Sat Sep 24, 2011 9:27 pm

Image

help computer
Prole
Posts: 15
Joined: Tue Sep 20, 2011 1:07 pm

Re: Roid Rage

Post by help computer » Sun Sep 25, 2011 8:11 am

Thanks kraftman.

I'm stumped. I can't repeat it and I'm not sure how it could happen. I assume you're trying it on 0.7.2?

Does it happen in the options menu too? That has quite a few continuous explosions, but not created from asteroids.
Furiously typing ned.
Roid Rage

help computer
Prole
Posts: 15
Joined: Tue Sep 20, 2011 1:07 pm

Re: Roid Rage

Post by help computer » Mon Sep 26, 2011 10:52 pm

I've (oh noes) attempted to optimise the table insertions and access a little bit.

It could be sped up more by changing how the asteroids are managed but, to be honest, would take a lot more work than I'm willing to put into rewriting what would be a large percentage of the game anyway. Yea, I'm pretty lazy. I'd rather take what I've learned and move on.

Anyway I'm happy with how it turned out for what it is, and I hope some people enjoy playing it.

I've updated the source and first post with the beta3 download.
Furiously typing ned.
Roid Rage

Post Reply

Who is online

Users browsing this forum: No registered users and 40 guests