Page 1 of 1

Request for testers: New particles code

Posted: Tue Feb 01, 2011 5:48 pm
by darkgod
Hello

I have committed a new version of the particle engine.
It now runs separate threads and computes all particles data there, this should make the game run much smoother, but I need testers!

So please, update, compile and test in particle intensive situations.
The current code creates only one thread but it can handle more

Re: Request for testers: New particles code

Posted: Tue Feb 01, 2011 10:06 pm
by Graziel
sometimes particle effect disappear from screen.
SVN 2600
new char, no quickbirth

Code: Select all

New particles registered on thread 0: /data/gfx/particles/light_zone.lua
Particle emitter error 71e2308 (66280168): attempt to call a table value
Particle updater error 71e2308 (301, 300): attempt to index a number value
Deleting particle from list 71e2308 :: 6e2b208
Particle updater error 6a15398 (302, 66280168): /data/gfx/particles/light.lua:45: attempt to index local 'self' (a number value)
Particle updater error 6a15398 (302, 66280168): /data/gfx/particles/light.lua:45: attempt to index local 'self' (a number value)
Particle updater error 6a15398 (302, 66280168): /data/gfx/particles/light.lua:45: attempt to index local 'self' (a number value)
Particle updater error 6a15398 (302, 66280168): /data/gfx/particles/light.lua:45: attempt to index local 'self' (a number value)
Particle updater error 6a15398 (302, 66280168): /data/gfx/particles/light.lua:45: attempt to index local 'self' (a number value)
Particle updater error 6a15398 (302, 66280168): /data/gfx/particles/light.lua:45: attempt to index local 'self' (a number value)
Particle updater error 6a15398 (302, 66280168): /data/gfx/particles/light.lua:45: attempt to index local 'self' (a number value)
Particle updater error 6a15398 (302, 66280168): /data/gfx/particles/light.lua:45: attempt to index local 'self' (a number value)
Particle updater error 6a15398 (302, 66280168): /data/gfx/particles/light.lua:45: attempt to index local 'self' (a number value)
Particle updater error 6a15398 (302, 66280168): /data/gfx/particles/light.lua:45: attempt to index local 'self' (a number value)
23 frames in 1 seconds = 23 FPS (31 keyframes)
Deleting particle from list 6a15398 :: 70477a0

Re: Request for testers: New particles code

Posted: Tue Feb 01, 2011 10:08 pm
by darkgod
Hum
I have it some few times here to but it is not enough to make them go away.

Does it feel faster ?

Re: Request for testers: New particles code

Posted: Tue Feb 01, 2011 10:56 pm
by Graziel
it felt 'smoother' didnt see much spikes of lag except when there was many enemies and i was moving, but while i was static it moved pretty nice and smooth.

Re: Request for testers: New particles code

Posted: Wed Feb 02, 2011 3:54 am
by yufra
First, it looks like Neil is using src/mac/getself.m instead of src/getself.c so I needed to add the get_number_cpus function there. The one you had didn't want to compile the first run through, and a quick google search gave me this code:

Code: Select all

#import <sys/sysctl.h>

int get_number_cpus()
{	
	int count ;
	size_t size=sizeof(count) ;
	
	if (sysctlbyname("hw.ncpu",&count,&size,NULL,0)) return 1;
	return count;
}
That seems to have worked because the first line in stdout on my dual-core is:

Code: Select all

[CPU] Detected 2 CPUs
EDIT: I previously reported a crash... it was my bad. It looks either the same (didn't feel particularly slow before on my machine) or faster!