Posted By
|
Message
|
eyeangle
Registered 12/06/2003
Points 1683
|
28th December, 2007 at 06:23:13 -
I have finally finished my custom movement, I think, and it's a wopping 383 events. The game runs at 50 frame per second.
Is the event list read every frame?
Does this mean that evey second 19,150 events are read?
Is this too much for a platform game?
Sometimes when I play a level it starts to lag. Is this because there are too many events to read at 50fps?
Will most PCs be able to handle 383 events?
Thanks.
theonecardgame.com
|
Klikmaster Master of all things Klik
Registered 08/07/2002
Points 2599
|
28th December, 2007 at 07:03:48 -
Yes, all the events are run every event loop (50 times per second)
383 events in total isn't much so I can't imagine why it would cause lag.
Although I have to say 383 events is an awful lot for a custom movement, I'm hoping it has lots of features
n/a
|
AndyUK Mascot Maniac
Registered 01/08/2002
Points 14586
|
28th December, 2007 at 11:03:20 -
Well it doesn't act upon every event every 1/50th of a second. You can't be doing everything at once.
Say if you have 500 projectiles on screen each with their own gravity, rotation and alpha channel, it would have more work to do. Both event and graphics based.
But if you turn off groups when they're not in use. That makes things a little more efficient. Also adding events like 'only once when event loops' helps.
Ok i just had a look at Lil pirate. It currently has 699 events. and I've never seen any slowdown at all during testing.
.
|
Assault Andy Administrator
I make other people create vaporware
Registered 29/07/2002
Points 5686
|
28th December, 2007 at 18:01:27 -
Game slow down due to events doesn't really occur besides unnecessary loops. It is almost always graphics based (too many objects, too many alpha channels in use, too many transparences, rotations etc.)
So you can have thousands of events and you probably won't experience slow down as long as it isn't too graphics intense.
Creator of Faerie Solitaire:
http://www.create-games.com/download.asp?id=7792
Also creator of ZDay20 and Dungeon Dash.
http://www.Jigxor.com
http://twitter.com/JigxorAndy
|
eyeangle
Registered 12/06/2003
Points 1683
|
28th December, 2007 at 21:53:05 -
Cool, well I found that the only real time it lagged was when I was using the laser and that uses loops. So I had to shorten it to about a 5th of its original size. I just heard that the PS3 does about 2 trillion calculations per second so I'm sure a PC can handle 19 thousand.
Quote AndyUK - "Well it doesn't act upon every event every 1/50th of a second. You can't be doing everything at once."
But I think it still reads evey event per second to see if it happening or not. So it can either say 'yes' or 'no' to doing the event.
theonecardgame.com
|
Pixelthief Dedicated klik scientist
Registered 02/01/2002
Points 3419
|
28th December, 2007 at 21:56:40 -
Well, my current RPG has about 4000 events in its engine frame, and thats in TGF. While most of them don't run each frame, looping event even it out.
Basically, the amount of events wont cause lag
Gridquest V2.00 is out!!
http://www.create-games.com/download.asp?id=7456
|
|
|