Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / AGK 2.16 is really, really stable.

Author
Message
Wilf
Valued Member
18
Years of Service
User Offline
Joined: 1st Jun 2006
Location: Gone to Unity.
Posted: 28th Jan 2016 22:24
I thought I'd try to catch some instability with a soak-test for my game Go Team Yeah. This involved 4 controller clients running a verrry simple AI (run left/right, jump randomly) on a host instance on one PC. Each character runs and jumps around, when they land on the head of a non-teammate they kill it and generate an Energon object. Each kill scores one point, displayed on the characters HUD. Uncollected energon is destroyed after a set amount of time.

Each item and character is an entity consisting of multiple sprites, Spine animations, particles and sounds. After runnng for 7 hours, scoring 4175 kills and about 8400 entities created and destroyed, it still hasn't crashed so I'm giving up.

Great job Paul and TGC!


The framerate dropped from 60fps to 6 because I don't do any cleanup on the entity array yet, destroyed entities sit in memory with an 'Alive' flag set to zero so are skipped during update.
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 28th Jan 2016 22:51
Good to hear, thanks for the stress test!
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 29th Jan 2016 10:58
Quote: " it still hasn't crashed so I'm giving up."


Pah, you are a quitter!
Good to see a stress test in action. I have been known to go overboard with my stress testing and Excel charts.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt
Wilf
Valued Member
18
Years of Service
User Offline
Joined: 1st Jun 2006
Location: Gone to Unity.
Posted: 3rd Feb 2016 12:16 Edited at: 3rd Feb 2016 12:19
You are absolutely right Batvink, so I went back in!
This time I implemented a simple garbage collection system so that dead items are removed every 5 seconds. I use AGK2s arrays within arrays feature to create game object entities consistings of a bunch of assets like so:



Which lets me add new stuff quickly. Some entities have a lot of sprites - the Player entites have sprites for stomp detection, punch detection, item pickup etc. Other entities like the bomb have more spine animations. Every asset position is slaved to the position of the physics sprite every frame. Does anyone else use a system like this?

Anyway, I went back a did a new test - one bomb generated every frame from the position of the mouse cursor. It falls down, hits a platform (which plays an animation), plays its 'bounce' animation, counts down its timer, explodes (which produces 6 explosion animations and 3 particles, and shakes nearby platforms) and is hidden. Once all the animations and particles have stopped, its deleted from the system.



I started recording the video when over 10,000 bombs had already been dropped and then dropped a few more; the framerate returns to normal after everything has been garbage collected; 60fps when Fraps isn't running, 48 when it is. This running Windows 7 in a VM on a Macbook Air!

And now, I do think I'll move on
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 3rd Feb 2016 13:58
Quote: "Does anyone else use a system like this?"


Yes indeed. I have an effects system with arrays of arrays, and it handles very well in AGK. I try to keep up with garbage collection, but at the end of each phase I do a global collection of anything that got accidentally left behind. A lot of my effects contain time delays, so I need to do the global collection for anything that didn't die before the end of the phase.

Glad to see you still didn't break it.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt

Login to post a reply

Server time is: 2024-11-25 11:20:09
Your offset time is: 2024-11-25 11:20:09